This is a follow up question on Cross-compile for armhf and install a static library
In the accepted answer following is mentioned at the end,
Clarification: Multiarch packages need to be installed with the same version on all architectures. So, you should have libudev-dev:armhf with version 229-4ubuntu21.4, but your current repository configuration does not include this version. So, you should add the line with xenial-updates where this version is supported.
I want to know how exactly I can do following?
So, you should add the line with xenial-updates where this version is supported.
I am new to this so elaborated answer with examples will be helpful.
Update 1 (trials as per comments )
with sources.list shown below I tried "apt-cache policy libudev-dev:{amd64,armhf}" its output is shown below. Error of "sudo apt install libudev-dev:armhf" is below.
sources.list file contents
deb [arch=amd64] http://archive.ubuntu.com/ubuntu xenial-updates main multiverse restricted universe
deb [arch=armhf] http://ports.ubuntu.com/ubuntu-ports xenial-updates main multiverse restricted universe
output of apt-cache policy libudev-dev:{amd64,armhf}
root@ajey-HP-Laptop-15t-dy100:/etc/apt# apt-cache policy libudev-dev:{amd64,armhf}
libudev-dev:
Installed: (none)
Candidate: 229-4ubuntu21.29
Version table:
229-4ubuntu21.29 500
500 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages
libudev-dev:armhf:
Installed: (none)
Candidate: 229-4ubuntu21.29
Version table:
229-4ubuntu21.29 500
500 http://ports.ubuntu.com/ubuntu-ports xenial-updates/main armhf Packages
output of sudo apt install libudev-dev:armhf
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
libudev-dev:armhf : Depends: libacl1:armhf (>= 2.2.51-8) but it is not installable
Depends: libblkid1:armhf (>= 2.19.1) but it is not going to be installed
Depends: libc6:armhf (>= 2.17) but it is not going to be installed
Depends: libgcc1:armhf (>= 1:3.5) but it is not installable
Depends: libkmod2:armhf (>= 5~) but it is not going to be installed
Depends: libselinux1:armhf (>= 2.0.65) but it is not installable
Depends: libudev1:armhf (= 229-4ubuntu21.29) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
Update 2
Tried with following in sources.list
deb [arch=amd64] http://archive.ubuntu.com/ubuntu/ xenial main multiverse restricted universe
deb [arch=armhf] http://ports.ubuntu.com/ubuntu-ports/ xenial main multiverse restricted universe
deb [arch=armhf] http://ports.ubuntu.com/ubuntu-ports/ xenial-updates main multiverse restricted universe
deb [arch=amd64] http://archive.ubuntu.com/ubuntu/ xenial-updates main multiverse restricted universe
deb [arch=amd64] http://security.ubuntu.com/ubuntu/ xenial-security main multiverse restricted universe
still getting error as below for sudo apt install libudev-dev:armhf
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
libudev-dev:armhf : Depends: libacl1:armhf (>= 2.2.51-8) but it is not going to be installed
Depends: libblkid1:armhf (>= 2.19.1) but it is not going to be installed
Depends: libc6:armhf (>= 2.17) but it is not going to be installed
Depends: libgcc1:armhf (>= 1:3.5) but it is not going to be installed
Depends: libkmod2:armhf (>= 5~) but it is not going to be installed
Depends: libselinux1:armhf (>= 2.0.65) but it is not going to be installed
Depends: libudev1:armhf (= 229-4ubuntu21.29) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
Update -3
Tried with following sources.list but no use, problem not solved yet
deb [arch=armhf] http://ports.ubuntu.com/ubuntu-ports/ xenial main multiverse restricted universe
deb [arch=armhf] http://ports.ubuntu.com/ubuntu-ports/ xenial-updates main multiverse restricted universe
deb [arch=armhf] http://ports.ubuntu.com/ubuntu-ports/ xenial-security main multiverse restricted universe
deb [arch=amd64] http://archive.ubuntu.com/ubuntu/ xenial main multiverse restricted universe
deb [arch=amd64] http://archive.ubuntu.com/ubuntu/ xenial-updates main multiverse restricted universe
deb [arch=amd64] http://archive.ubuntu.com/ubuntu/ xenial-security main multiverse restricted universe
deb [arch=amd64] http://security.ubuntu.com/ubuntu/ xenial main multiverse restricted universe
deb [arch=amd64] http://security.ubuntu.com/ubuntu/ xenial-updates main multiverse restricted universe
deb [arch=amd64] http://security.ubuntu.com/ubuntu/ xenial-security main multiverse restricted universe
sources.list
shouldn't contain onlyxenial-updates
. It should containxenial
andxenial-security
as well. – muru Jan 21 '21 at 05:30xenial-security
for armhf as well. Things inxenial-updates
can depend onxenial-security
, andxenial-security
can depend onxenial
. So if you use-updates
, you need both the other two. – muru Jan 21 '21 at 06:43xenial
, and remove bothxenial-updates
andxenial-security
. This might break things, so I suggest using a fresh install of Ubuntu for that. – muru Jan 21 '21 at 07:09