ubuntu 16.04 add multiarch armhf

Asked by clonephone82

Hello,

Today I tried to add multiarch armhf to my ubunt 16.04 installation. I followed that guide here https://wiki.debian.org/Multiarch/HOWTO

so I try:

sudo dpkg --add-architecture armhf
sudo apt-get update

Then I get a lot off update errors so nothing for armhf is installed. What is the right way to add multiarch armhf on ubuntu 16.04 ?
My system is up to date.

many thanks
cheers
mathias

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
clonephone82
Solved:
Last query:
Last reply:
Revision history for this message
Manfred Hampl (m-hampl) said :
#1

What do you want to achieve with adding armhf multiarch?

What errors do you get?

Please provide the full output of the commands

uname -a
lsb_release -crid
dpkg --print-architecture
dpkg --print-foreign-architectures
sudo apt-get update

Revision history for this message
clonephone82 (ecam) said :
#2

I want to do some cross compiling for Beagle Bone Black. I followed that tutorial here http://exploringbeaglebone.com/chapter7/
But the guy from the webpage do not use Ubuntu but I think it should be work or I am wrong here.

It would be great if you can help me.

uname -a:
Linux mgiaco-laptop 4.4.0-78-generic #99-Ubuntu SMP Thu Apr 27 15:29:09 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

lsb_release -crid:
Distributor ID: Ubuntu
Description: Ubuntu 16.04.2 LTS
Release: 16.04
Codename: xenial

dpkg --print-architecture:
amd64

dpkg --print-foreign-architectures
i386
armhf

sudo apt-get update:
Get:1 http://security.ubuntu.com/ubuntu xenial-security InRelease [102 kB]
Hit:2 http://ppa.launchpad.net/mystic-mirage/pycharm/ubuntu xenial InRelease
Hit:3 http://ports.ubuntu.com/ubuntu-ports xenial InRelease
Hit:4 http://ppa.launchpad.net/thopiekar/cura/ubuntu xenial InRelease
Hit:5 http://at.archive.ubuntu.com/ubuntu xenial InRelease
Hit:6 http://at.archive.ubuntu.com/ubuntu xenial-updates InRelease
Hit:7 http://at.archive.ubuntu.com/ubuntu xenial-backports InRelease
Hit:8 http://packages.microsoft.com/repos/vscode stable InRelease
Ign:9 http://security.ubuntu.com/ubuntu xenial-security/main armhf Packages
Get:10 http://security.ubuntu.com/ubuntu xenial-security/main amd64 DEP-11 Metadata [54,5 kB]
Get:11 http://security.ubuntu.com/ubuntu xenial-security/main DEP-11 64x64 Icons [50,2 kB]
Ign:12 http://at.archive.ubuntu.com/ubuntu xenial/main armhf Packages
Ign:13 http://security.ubuntu.com/ubuntu xenial-security/restricted armhf Packages
Ign:14 http://security.ubuntu.com/ubuntu xenial-security/universe armhf Packages
Get:15 http://security.ubuntu.com/ubuntu xenial-security/universe amd64 DEP-11 Metadata [32,2 kB]
Get:16 http://security.ubuntu.com/ubuntu xenial-security/universe DEP-11 64x64 Icons [37,0 kB]
Ign:17 http://at.archive.ubuntu.com/ubuntu xenial/restricted armhf Packages
Ign:18 http://at.archive.ubuntu.com/ubuntu xenial/universe armhf Packages
Ign:19 http://at.archive.ubuntu.com/ubuntu xenial/multiverse armhf Packages
Ign:20 http://at.archive.ubuntu.com/ubuntu xenial-updates/main armhf Packages
Ign:21 http://at.archive.ubuntu.com/ubuntu xenial-updates/restricted armhf Packages
Ign:22 http://at.archive.ubuntu.com/ubuntu xenial-updates/universe armhf Packages
Ign:23 http://at.archive.ubuntu.com/ubuntu xenial-updates/multiverse armhf Packages
Ign:24 http://security.ubuntu.com/ubuntu xenial-security/multiverse armhf Packages
Ign:9 http://security.ubuntu.com/ubuntu xenial-security/main armhf Packages
Ign:13 http://security.ubuntu.com/ubuntu xenial-security/restricted armhf Packages
Ign:12 http://at.archive.ubuntu.com/ubuntu xenial/main armhf Packages
Ign:14 http://security.ubuntu.com/ubuntu xenial-security/universe armhf Packages
Ign:25 http://at.archive.ubuntu.com/ubuntu xenial-backports/main armhf Packages
Ign:26 http://at.archive.ubuntu.com/ubuntu xenial-backports/universe armhf Packages
Ign:17 http://at.archive.ubuntu.com/ubuntu xenial/restricted armhf Packages
Ign:24 http://security.ubuntu.com/ubuntu xenial-security/multiverse armhf Packages
Ign:9 http://security.ubuntu.com/ubuntu xenial-security/main armhf Packages
Ign:18 http://at.archive.ubuntu.com/ubuntu xenial/universe armhf Packages
Ign:19 http://at.archive.ubuntu.com/ubuntu xenial/multiverse armhf Packages
Ign:20 http://at.archive.ubuntu.com/ubuntu xenial-updates/main armhf Packages
Ign:21 http://at.archive.ubuntu.com/ubuntu xenial-updates/restricted armhf Packages
Ign:22 http://at.archive.ubuntu.com/ubuntu xenial-updates/universe armhf Packages
Ign:13 http://security.ubuntu.com/ubuntu xenial-security/restricted armhf Packages
Ign:14 http://security.ubuntu.com/ubuntu xenial-security/universe armhf Packages
Ign:24 http://security.ubuntu.com/ubuntu xenial-security/multiverse armhf Packages
Ign:23 http://at.archive.ubuntu.com/ubuntu xenial-updates/multiverse armhf Packages
Ign:12 http://at.archive.ubuntu.com/ubuntu xenial/main armhf Packages
Ign:25 http://at.archive.ubuntu.com/ubuntu xenial-backports/main armhf Packages
Ign:26 http://at.archive.ubuntu.com/ubuntu xenial-backports/universe armhf Packages
Err:9 http://security.ubuntu.com/ubuntu xenial-security/main armhf Packages
  404 Not Found [IP: 91.189.88.161 80]
Ign:17 http://at.archive.ubuntu.com/ubuntu xenial/restricted armhf Packages
Ign:18 http://at.archive.ubuntu.com/ubuntu xenial/universe armhf Packages
Ign:19 http://at.archive.ubuntu.com/ubuntu xenial/multiverse armhf Packages
Ign:20 http://at.archive.ubuntu.com/ubuntu xenial-updates/main armhf Packages
Ign:21 http://at.archive.ubuntu.com/ubuntu xenial-updates/restricted armhf Packages
Ign:13 http://security.ubuntu.com/ubuntu xenial-security/restricted armhf Packages
Ign:14 http://security.ubuntu.com/ubuntu xenial-security/universe armhf Packages
Ign:22 http://at.archive.ubuntu.com/ubuntu xenial-updates/universe armhf Packages
Ign:23 http://at.archive.ubuntu.com/ubuntu xenial-updates/multiverse armhf Packages
Err:12 http://at.archive.ubuntu.com/ubuntu xenial/main armhf Packages
  404 Not Found [IP: 83.164.133.196 80]
Ign:25 http://at.archive.ubuntu.com/ubuntu xenial-backports/main armhf Packages
Ign:24 http://security.ubuntu.com/ubuntu xenial-security/multiverse armhf Packages
Ign:26 http://at.archive.ubuntu.com/ubuntu xenial-backports/universe armhf Packages
Ign:17 http://at.archive.ubuntu.com/ubuntu xenial/restricted armhf Packages
Ign:18 http://at.archive.ubuntu.com/ubuntu xenial/universe armhf Packages
Ign:19 http://at.archive.ubuntu.com/ubuntu xenial/multiverse armhf Packages
Err:20 http://at.archive.ubuntu.com/ubuntu xenial-updates/main armhf Packages
  404 Not Found [IP: 83.164.133.196 80]
Ign:21 http://at.archive.ubuntu.com/ubuntu xenial-updates/restricted armhf Packages
Ign:22 http://at.archive.ubuntu.com/ubuntu xenial-updates/universe armhf Packages
Ign:23 http://at.archive.ubuntu.com/ubuntu xenial-updates/multiverse armhf Packages
Err:25 http://at.archive.ubuntu.com/ubuntu xenial-backports/main armhf Packages
  404 Not Found [IP: 83.164.133.196 80]
Ign:26 http://at.archive.ubuntu.com/ubuntu xenial-backports/universe armhf Packages
Fetched 276 kB in 0s (323 kB/s)
Reading package lists... Done
E: Failed to fetch http://security.ubuntu.com/ubuntu/dists/xenial-security/main/binary-armhf/Packages 404 Not Found [IP: 91.189.88.161 80]
E: Failed to fetch http://at.archive.ubuntu.com/ubuntu/dists/xenial/main/binary-armhf/Packages 404 Not Found [IP: 83.164.133.196 80]
E: Failed to fetch http://at.archive.ubuntu.com/ubuntu/dists/xenial-updates/main/binary-armhf/Packages 404 Not Found [IP: 83.164.133.196 80]
E: Failed to fetch http://at.archive.ubuntu.com/ubuntu/dists/xenial-backports/main/binary-armhf/Packages 404 Not Found [IP: 83.164.133.196 80]
E: Some index files failed to download. They have been ignored, or old ones used instead.

If I remove the armhf architecture everything works fine when i use apt-get update. So the errors are only from that foreign arch I think

thx

Revision history for this message
Manfred Hampl (m-hampl) said :
#3

Your approach is not wrong. The only problem is that the .deb package files for architectures different from amd64 and i386 are not available in the standard archives, but on a special repository server.

Try the following modification in the sources.list file(s):

Each line such as
deb http://at.archive.ubuntu.com/ubuntu/ xenial main universe

has to be converted into these two lines:
deb [arch=amd64,i386] http://at.archive.ubuntu.com/ubuntu/ xenial main universe
deb [arch=armhf] http://ports.ubuntu.com/ubuntu-ports xenial main universe

(similar for security.ubuntu.com, also here the armhf .deb files need the ports.ubuntu.com server)

Revision history for this message
clonephone82 (ecam) said :
#4

So I think it is better to use a docker container for that because other wise i crash my system because I am not a pro in reading that source.list stuff

many thanks