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
share|improve this question
    
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. – nwildner Mar 29 '16 at 16:33
up vote 8 down vote accepted

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
share|improve this answer
    
That was indeed the problem. With this fix the repository was accepted and updated. Thanks. – Tyler Durden Mar 29 '16 at 16:56
    
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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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