[SOLVED] 'apt-get update' errors finding 'armhf' packages after JetPack 1.1 install on Ubuntu 14.04

Hello to all,

I have recently installed JetPack-1.1 on my Jetson-TK1 using a x86_64 computer running Ubuntu 14.04 LTS. While JetPack´s installation and TK1´s flashing worked flawlessly, I was left with many errors on the host PC when using apt-get update.

These errors relate to armhf packages, which are not found on the server. However, there are no specific instructions within /etc/apt/source.list for apt-get to search for the armhf packages. Where are these definitions located? How can I resolve these issues?

Err http://extras.ubuntu.com trusty/main armhf Packages                        
  404  Not Found [IP: 91.189.92.152 80]
Err http://security.ubuntu.com trusty-security/main armhf Packages             
  404  Not Found [IP: 91.189.91.24 80]
Err http://security.ubuntu.com trusty-security/restricted armhf Packages       
  404  Not Found [IP: 91.189.91.24 80]
Err http://security.ubuntu.com trusty-security/universe armhf Packages         
  404  Not Found [IP: 91.189.91.24 80]
Err http://security.ubuntu.com trusty-security/multiverse armhf Packages       
  404  Not Found [IP: 91.189.91.24 80]
Err http://archive.ubuntu.com trusty/main armhf Packages                       
  404  Not Found [IP: 91.189.91.14 80]
Err http://archive.ubuntu.com trusty/restricted armhf Packages                 
  404  Not Found [IP: 91.189.91.14 80]
Err http://archive.ubuntu.com trusty/universe armhf Packages                   
  404  Not Found [IP: 91.189.91.14 80]
Err http://archive.ubuntu.com trusty/multiverse armhf Packages                 
  404  Not Found [IP: 91.189.91.14 80]
Err http://archive.ubuntu.com trusty-updates/main armhf Packages               
  404  Not Found [IP: 91.189.91.14 80]
Err http://archive.ubuntu.com trusty-updates/restricted armhf Packages         
  404  Not Found [IP: 91.189.91.14 80]
Err http://archive.ubuntu.com trusty-updates/universe armhf Packages           
  404  Not Found [IP: 91.189.91.14 80]
Err http://archive.ubuntu.com trusty-updates/multiverse armhf Packages         
  404  Not Found [IP: 91.189.91.14 80]
Err http://archive.ubuntu.com trusty-backports/main armhf Packages             
  404  Not Found [IP: 91.189.91.14 80]
Err http://archive.ubuntu.com trusty-backports/restricted armhf Packages       
  404  Not Found [IP: 91.189.91.14 80]
Err http://archive.ubuntu.com trusty-backports/universe armhf Packages         
  404  Not Found [IP: 91.189.91.14 80]
Err http://archive.ubuntu.com trusty-backports/multiverse armhf Packages       
  404  Not Found [IP: 91.189.91.14 80]

W: Failed to fetch http://extras.ubuntu.com/ubuntu/dists/trusty/main/binary-armhf/Packages
  404  Not Found [IP: 91.189.92.152 80]

W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/trusty/main/binary-armhf/Packages
  404  Not Found [IP: 91.189.91.14 80]

W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/trusty/restricted/binary-armhf/Packages
  404  Not Found [IP: 91.189.91.14 80]

W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/trusty/universe/binary-armhf/Packages
  404  Not Found [IP: 91.189.91.14 80]

W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/trusty/multiverse/binary-armhf/Packages
  404  Not Found [IP: 91.189.91.14 80]

W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/trusty-security/main/binary-armhf/Packages
  404  Not Found [IP: 91.189.91.24 80]

W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/trusty-security/restricted/binary-armhf/Packages
  404  Not Found [IP: 91.189.91.24 80]

W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/trusty-security/universe/binary-armhf/Packages
  404  Not Found [IP: 91.189.91.24 80]

W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/trusty-security/multiverse/binary-armhf/Packages
  404  Not Found [IP: 91.189.91.24 80]

W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/trusty-updates/main/binary-armhf/Packages
  404  Not Found [IP: 91.189.91.14 80]

W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/trusty-updates/restricted/binary-armhf/Packages
  404  Not Found [IP: 91.189.91.14 80]

W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/trusty-updates/universe/binary-armhf/Packages
  404  Not Found [IP: 91.189.91.14 80]

W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/trusty-updates/multiverse/binary-armhf/Packages
  404  Not Found [IP: 91.189.91.14 80]

W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/trusty-backports/main/binary-armhf/Packages
  404  Not Found [IP: 91.189.91.14 80]

W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/trusty-backports/restricted/binary-armhf/Packages
  404  Not Found [IP: 91.189.91.14 80]

W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/trusty-backports/universe/binary-armhf/Packages
  404  Not Found [IP: 91.189.91.14 80]

W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/trusty-backports/multiverse/binary-armhf/Packages
  404  Not Found [IP: 91.189.91.14 80]

W: Failed to fetch http://dl.google.com/linux/chrome/deb/dists/stable/Release
Unable to find expected entry 'main/binary-armhf/Packages' in Release file (Wrong sources.list entry or malformed file)

Any help is deeply appreciated.

Thank you for your time,
Gunnar

Here is a solution to the apt-get update problem.

The main issue is that apt searches all architectures defined by APT::Architectures when downloading repository data. Installing JetPack 1.1 automatically defined armhf as an additional architecture in order to utilize cross-compilers and other packages targeted at the Jetson TK1 processor.

Therefore, it is necessary to limit the architectures each repository provides, and point apt to the proper URI containing the armhf packages.

This solution assumes a computer running an x86_64 architecture, as required by the JetPack 1.1 installer, and Ubuntu 14.04 LTS Trusty Tahr.

Lets get started:

  1. Open the sources.list file using nano or your preferred text editor.
sudo nano /etc/apt/sources.list
  1. Add the following lines to the beginning of sources.list:
# Add PORTS repository to resolve TK1 errors in 'apt' by pointing
# to the proper packages for ARM hard-float architectures.
deb [arch=armhf] http://ports.ubuntu.com/ trusty main universe
deb-src [arch=armhf] http://ports.ubuntu.com/ trusty main universe

An [arch=armhf] option before the URI defines that only ARM packages should be downloaded from this repository. The http://ports.ubuntu.com URI defines where armhf packages can be found. Also, information for both main and universe components are downloaded.

  1. Next, limit the architectures for all other repository definitions. This means adding an [arch=i386,amd64] option before the URI of all other repositories defined in the sources.list file. For example:
deb [arch=i386,amd64] http://archive.ubuntu.com/ubuntu/ trusty main

By doing so, apt will no longer search for the armhf architecture within these repositories.

Just remember that if any application automatically edits the sources.list file, or adds a repository under the /etc/apt/sources.list.d/ directory, the new repository definitions will not have such limitations and will continue to search for armhf packages. Consequently, apt-get update will start reporting errors related to not finding armhf packages again.

Fix these errors by performing steps 1 and 3 over again.