24

I am trying to use a file repository for updating linux/ubuntu on a non-connected machine. The architecture for this machine (uname -a):

x86_64 GNU/Linux

The results of dpkg --printarchitecture are:

amd64

It is a Trusty Tahr amd64 machine, and it specifically says this, for example, in the aptitude sources.list file. Also, the "About this Computer" in ubuntu specifically says the machine is 64-bit. So, I installed the amd64 packages on the machine. However, when I try to do apt-get update, I get errors such as:

W: Failed to fetch file:/var/spool/apt-mirror-trusty/mirror/archive.ubuntu.com/ubuntu/dists/trusty/main/binary-i386/Packages  File not found

So, in other words, even though it is a 64-bit machine, apt is inexplicably trying to read i386 packages. Why is it doing this and how can I make it use the 64-bit packages?

Note that there is nothing in sources.list that specifies i386.

The only uncommented line in the sources.list file is:

deb file:///var/spool/apt-mirror-trusty/mirror/archive.ubuntu.com/ubuntu trusty main restricted universe multiverse
1
  • Maybe this multiarch support is enabled by default on Ubuntu because there are some partner software providers(Skype, cof, cof..) that are lazy enough to not compile things on i386 and amd64. Since multiarch libraries will be needed, dpkg is configured by default to accept amd64 and it's 32bit sibling. I say "maybe" because i have not found any official documentation with this information. Just my 2 cents. – user34720 Mar 29 '16 at 16:33
34

On Ubuntu amd64 installations, i386 is enabled as an additional architecture by default. apt & co. expect repositories to provide all configured architectures, which causes the error you're seeing.

Since your mirror only has amd64 packages, you should mark it as such:

deb [ arch=amd64 ] file:///var/spool/apt-mirror-trusty/mirror/archive.ubuntu.com/ubuntu trusty main restricted universe multiverse
3
  • 2
    dpkg --print-foreign-architectures will show any architecture for which multiarch support is enabled; I had the same problem and (probably unsurprisingly) the above command reported: i386 – sxc731 Feb 25 '17 at 16:41
  • 2
    This doesn't explain how to disable additional architecture by default. Putting [arch=amd64] to each deb line is not a good solution. This explains how to do it: superuser.com/a/714392/376867 – midenok Oct 6 '18 at 21:29
  • 2
    @midenok Where did I suggest adding an arch qualifier to every repository descriptor? Completely disabling i386 to deal with one troublesome repository is rather overkill. Note that if you have multiple repositories causing the problem described in the question, that indicates a problem with the repositories’ Architectures field, not with the local configuration. – Stephen Kitt Oct 7 '18 at 8:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.