Yocto apt config sources.list - apt

I have been trying lately to set up a package feed from my host machine for the yocto distrib running on a qemu on the host machine.
I added as told "apt" to the IMAGE_INSTALL and added the package-managment in the EXTRA_FEATURE
Then I setted up an Apache 2 http server with the following the config:
Alias /deb ~/yocto/build-qemuarm/tmp-glibc/deploy/deb
<Directory "~/yocto/build-qemuarm/tmp-glibc/deploy/deb">
Options +Indexes
</Directory>
Then I tried without success to set up the sources.list on the target (qemu)
I looked over the Internet but no way to find a concrete example for apt set-up, only for ipk/rpm. I don't see how to set up the mandatory suite option and components.
Here is the listing of the deploy/deb dir without all the *.dev packages:
tree -I *.deb
.
--- all
| Packages
| Packages.gz
| Release
--- armv5te
| Packages
| Packages.gz
| Release
--- qemuarm
| Packages
| Packages.gz
| Release
Here is my sources.list up to now:
deb http://192.168.7.1:8000/all all all
Here is the log of apt-get update :
root#qemuarm:/etc/apt/sources.list.d# apt-get update
Ign http://192.168.7.1:8000 all InRelease
Ign http://192.168.7.1:8000 all Release.gpg
Ign http://192.168.7.1:8000 all Release
Err http://192.168.7.1:8000 all/all armel Packages
404 File not found
Ign http://192.168.7.1:8000 all/all Translation-en
W: Failed to fetch http://192.168.7.1:8000/all/dists/all/all/binary-armel/Packages 404 File not found
E: Some index files failed to download. They have been ignored, or old ones used instead.
root#qemuarm:/etc/apt/sources.list.d# apt-get update
Err http://192.168.7.1:8000 all InRelease
Err http://192.168.7.1:8000 all Release.gpg
Unable to connect to 192.168.7.1:8000:
Reading package lists... Done
W: Failed to fetch http://192.168.7.1:8000/all/dists/all/InRelease
W: Failed to fetch http://192.168.7.1:8000/all/dists/all/Release.gpg Unable to connect to 192.168.7.1:8000:
W: Some index files failed to download. They have been ignored, or old ones used instead.
I tried for my sources.list:
deb http://192.168.7.1:8000 all
But got:
E: Malformed line 1 in source list /etc/apt/sources.list.d/oe.list (dist parse)
E: The list of sources could not be read.
So if anybody got more debian package experience than me, and/or has already tried to do the same as me, I would be happy yo have some clues.
Thanks,

By default apt expects a more complex directory structure but adding a '/' to the suite name should tell it that what we have is just a simple directory:
deb http://192.168.7.1:8000/ all/
deb http://192.168.7.1:8000/ armv5te/

Related

How can I install Canon scanner/libpango

I am installing Canon MG3650S printer/scanner on Ubuntu 22.04. It looks like something is wrong with installing libpango. I discovered that it was missing from the dependency list. However, after installing it, something is still missing. I noticed that "libpango-1.0-0 set to manually installed", but could not figure out what does it mean. Below you find the screen log.
~/Downloads/scangearmp2-3.20-1-deb$ sudo apt-get install libpango-1.0-0
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
libpango-1.0-0 is already the newest version (1.50.6+ds-2).
libpango-1.0-0 set to manually installed.
0 upgraded, 0 newly installed, 0 to remove and 150 not upgraded.
~/Downloads/scangearmp2-3.20-1-deb$ sudo ./install.sh
==================================================
ScanGear MP
Version 3.20
Copyright CANON INC. 2007-2015
==================================================
Command executed = sudo dpkg -iG ./packages/scangearmp2_3.20-1_amd64.deb
Selecting previously unselected package scangearmp2.
(Reading database ... 272630 files and directories currently installed.)
Preparing to unpack .../scangearmp2_3.20-1_amd64.deb ...
Unpacking scangearmp2 (3.20-1) ...
dpkg: dependency problems prevent configuration of scangearmp2:
scangearmp2 depends on libpango1.0-0 (>= 1.14.0); however:
Package libpango1.0-0 is not installed.
dpkg: error processing package scangearmp2 (--install):
dependency problems - leaving unconfigured
Errors were encountered while processing:
scangearmp2
Command executed = sudo dpkg -P scangearmp2
(Reading database ... 272652 files and directories currently installed.)
Removing scangearmp2 (3.20-1) ...
Purging configuration files for scangearmp2 (3.20-1) ...
BTW: On another copy of the same Ubuntu, I did not notice this issue. What could be the cause?
You need the Package libpango1.0-0 - which can be install with Synaptic. That was my problem too. After that everything OK.
dpkg -L libpango1.0-0
dpkg -L libpango-1.0-0

Error compiling with polyc on Debian 10 Buster

"/usr/bin/ld: cannot find -lpolyml"
I received this error when compiling a source sml file with polyc on Debian 10.
polyc requires the deb package 'libpolyml-dev', even though it is not installed by default when installing the deb package 'polyml'.
So, 'apt install libpolyml-dev' resolved the issue.

Bash on Ubuntu on Windows can't use `sudo apt-get install <packagename>`

I was excited to use bash on windows but quickly ran into an issue. I am trying to install build-essential, but I get a dependency issue. Upon trying to resolve with sudo apt-get install -f, I run into another error that doesn't make much sense. I've tried update and upgrade, but that didn't work either. F
barzevp#UK-LT-8356:~$ sudo apt-get install build-essential
Reading package lists... Done
Building dependency tree
Reading state information... Done
build-essential is already the newest version.
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies.
libc6-dev : Depends: linux-libc-dev but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
barzevp#UK-LT-8356:~$ sudo apt-get -f install
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following packages were automatically installed and are no longer required:
libfreetype6 os-prober
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
linux-libc-dev
The following NEW packages will be installed
linux-libc-dev
0 to upgrade, 1 to newly install, 0 to remove and 43 not to upgrade.
5 not fully installed or removed.
Need to get 0 B/767 kB of archives.
After this operation, 3,946 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
(Reading database ... 28660 files and directories currently installed.)
Preparing to unpack .../linux-libc-dev_3.13.0-123.172_amd64.deb ...
Unpacking linux-libc-dev:amd64 (3.13.0-123.172) ...
dpkg: error processing archive /var/cache/apt/archives/linux-libc-dev_3.13.0-123.172_amd64.deb (--unpack):
unable to install new version of /usr/include/linux/netfilter_ipv6/ip6t_hl.h': File exists
E: Sub-process /usr/bin/dpkg returned an error code (1)
Full log of what led to the error in Bash on Ubuntu on Windows terminal is here:
https://pastebin.com/dq2D2Gtz
I don't have a solution, but I see the root of the problem. It seems to have to do with case sensitivity on the filesystem. The package for linux-libc-dev puts two copies of a file in /usr/include/linux/netfilter_ipv6 with only a difference in case; ip6t_HL.h, and ip6t_hl.h. After placing ip6t_HL.h, it attempts to rename ip6t_hl.h.dpkg-new to ip6t_hl.h. The system call to rename the file fails, claiming that ip6t_hl.h already exists
On a "real" linux system, ip6t_HL.h and ip6t_hl.h would clearly be different files. Under WSL they probably had some strange incompatibilities to work out between NTFS's default case insensitive FS and unix's default case sensitivity.
You can duplicate the problem by hand e.g., with
echo hi > foo.H
echo hi > foo.h-new
mv foo.h-new foo.h
mv: cannot move 'foo.h-new' to 'foo.h': File exists
strace output:
rename("/usr/include/linux/netfilter_ipv6/ip6t_HL.h.dpkg-new", "/usr/include/linux/netfilter_ipv6/ip6t_HL.h") = 0
open("/usr/include/linux/netfilter_ipv6/ip6t_hl.h.dpkg-new", O_WRONLY) = 10
fsync(10) = 0
close(10) = 0
rename("/usr/include/linux/netfilter_ipv6/ip6t_hl.h.dpkg-new", "/usr/include/linux/netfilter_ipv6/ip6t_hl.h") = -1 EEXIST (File exists)
write(2, "dpkg: error processing archive /"..., 199dpkg: error processing archive /var/cache/apt/archives/linux-libc-dev_4.4.0-98.121_amd64.deb (--install):
unable to install new version of '/usr/include/linux/netfilter_ipv6/ip6t_hl.h': File exists
) = 199
I had the same problem. Like #dmattp I found that it this is because, unfortunately, the package contains some (header) files with names that are distinct only by letter case, and that the wonderful WSL file system has an inconsistency regarding case sensitiveness.
Here is a workaround, assuming that the package has name linux-libc-dev_3.13.0-123.172_amd64.deb:
cd any-temp-dir
apt-get download linux-libc-dev
ar x linux-libc-dev_3.13.0-123.172_amd64.deb
tar xJf data.tar.xz # ignore all erors like ./usr/include/linux/netfilter_ipv4/ipt_ttl.h: Cannot open: Input/output error
tar cJf data.tar.xz ./usr
ar rcs linux-libc-dev_3.13.0-123.172_amd64-patched.deb debian-binary control.tar.gz data.tar.xz
sudo dpkg -i linux-libc-dev_3.13.0-123.172_amd64-patched.deb
It says dependencies aren't being installed, so try:
sudo apt-get install linux-libc-dev
If that doesn't work try:
sudo apt-get install --reinstall build-essential
This will reinstall build-essential. Hope this helps, cheers!

Why is /var/lib/dpkg/status missing on a BitBake-generated OS?

I have installed apt onto a system built by BitBake by adding the apt package to the IMAGE_INSTALL variable in my recipe.
apt-get and apt-cache now execute on the built system, but if I try to do anything useful with them (such as apt-get update or apt-cache search), I get the following error:
E: Could not open file /var/lib/dpkg/status - open (2: No such file or directory)
E: The package lists or status file could not be parsed or opened
After some preliminary searching, I found this exchange on the Yocto Project mailing list:
Hi,
I have some requirement with apt-get in yocto genearted rootfs.
I built the yocto source code with enabling the apt package.
But after booting the image on my machine and run the "apt-get" command for installing some package it gives the following error.
Could not open the file /var/lib/dpkg/status open(2: no such a file or directory).
The package lists or status files could not be parsed or opened.
This error is because you need to add package-management to EXTRA_IMAGE_FEATURES in local.conf,
PACKAGE_CLASSES ?= "package_deb"
EXTRA_IMAGE_FEATURES = "debug-tweaks package-management"
I've added package-management but don't see any different output.
After a touch /var/lib/dpkg/status, apt-get update returns the following:
Reading package lists...Done
How can I get apt into a functioning state through the use of BitBake metadata?
I have found a similar thread from the NXP website.
You would need to set up your own web server and provide all those packages and add the server URL to the source list. SourceList
In addition, you have to update the package manifest by running bitbake package-index and add PACKAGE_CLASSES ?= " package_deb" to conf/local.conf
I have successfully set up OPKG before. The steps are similar, you can find it here

Requirements Error while installing Ruby using RVM

I'm getting the following error while trying to install Ruby 2.0.0 with RVM (Linux Mint 17)
A previous answer here recommends that I "Remove broken or 404 repos from my sources list /etc/apt/sources.list"
The problem is that on Linux Mint 17, my sources list has only one line #deb cdrom:[Linux Mint 17 _Qiana_ - Release amd64 2xxxxxxx]/ trusty contrib main non-free.
Therefore,the three broken 404 repos:
http://ppa.launchpad.net/w-vollprecht/ppa/ubuntu/dists/trusty/main/source/Sources 404 not found
http://ppa.launchpad.net/w-vollprecht/ppa/ubuntu/dists/trusty/main/binary-amd64/Packages 404 not found
http://ppa.launchpad.net/w-vollprecht/ppa/ubuntu/dists/trusty/main/binary-i386/Packages 404 not found
are not in this sources.list file
Can you help me on this?
$ rvm install ruby 2.0.0
Searching for binary rubies, this might take some time.
No binary rubies available for: mint/17/x86_64/ruby-2.0.0-p481.
Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies.
Checking requirements for mint.
Installing requirements for mint.
Updating system................
Error running 'requirements_debian_update_system ruby-2.0.0-p481',
showing last 15 lines of /home/james/.rvm/log/1xxxxxxxxx_ruby-2.0.0-p481/update_system.log
++ case "${TERM:-dumb}" in
++ case "$1" in
++ [[ -t 2 ]]
++ return 1
++ printf %b 'There has been error while updating '\''apt-get'\'', please give it some time and try again later.
For 404 errors check your sources configured in:
/etc/apt/sources.list
/etc/apt/sources.list.d/*.list
\n'
There has been error while updating 'apt-get', please give it some time and try again later.
For 404 errors check your sources configured in:
/etc/apt/sources.list
/etc/apt/sources.list.d/*.list
++ return 100
Requirements installation failed with status: 100.
As it says in the answer I linked to in my question,
RVM will fail if you don't remove or comment out any broken or 404 Repos from your sources list /etc/apt/sources.list
The problem is that for some reason, you cant get direct access to all the repos on LinuxMint 17... unlike Ubuntu.
I ran sudo apt-get update:
This will show you the broken packages at the end... For me, this was:
http://ppa.launchpad.net/w-vollprecht/ppa/ubuntu/dists/trusty/main/source/Sources
404 not found
http://ppa.launchpad.net/w-vollprecht/ppa/ubuntu/dists/trusty/main/binary-amd64/Packages
404 not found
http://ppa.launchpad.net/w-vollprecht/ppa/ubuntu/dists/trusty/main/binary-i386/Packages
404 not found
Since I cant just comment it out because I don't have access to the full source.list (or I cant find it), I found out that in Linux Mint 17, you can use the GUI.
So I went to Menu >> Software >> Software Sources >> PPA to un-tick the broken Launchpad Repos.
After doing this, I ran rvm install 2.0.0 again and everything worked as expected.
The new standard sources.list moved to
/etc/apt/sources.list.d/official-package-repositories.list
And before modifications of it try to run
sudo apt-get update

Resources