12

I have the following issue on Ubuntu 12.04 LTS on a 64-bit machine: Whenever I try to update the aptitude repos, the update will strangely fail with a i386-related error. I assume that this shouldn't be happening on a 64-bit system.

root@liv-HP-Compaq-dc7900:/home/liv# apt-get update
Ign file: apt-build Release.gpg
Get:1 file: apt-build Release [107 B]                                          
Ign file: apt-build/main TranslationIndex                                      
Err file: apt-build/main i386 Packages                                         
  File not found
[..]
W: Failed to fetch file:/var/cache/apt-build/repository/dists/apt-build/main/binary-i386/Packages  File not found

E: Some index files failed to download. They have been ignored, or old ones used instead.

I tried to restore status-old with no luck:

sudo cp /var/lib/dpkg/status-old /var/lib/dpkg/status

I also tried:

root@liv-HP-Compaq-dc7900:/home/liv# apt-get -f install
Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 90 not upgraded.

But it doesn't seem to do or report anything useful. Each subsequent apt-get update ends up in an error.

For the record, my /etc/apt/sources.list file looks like this:

# deb cdrom:[Xubuntu 12.04 LTS _Precise Pangolin_ - Release amd64 (20120425)]/ dists/precise/main/binary-i386/

# deb cdrom:[Xubuntu 12.04 LTS _Precise Pangolin_ - Release amd64 (20120425)]/ dists/precise/multiverse/binary-i386/
# deb cdrom:[Xubuntu 12.04 LTS _Precise Pangolin_ - Release amd64 (20120425)]/ dists/precise/restricted/binary-i386/
# deb cdrom:[Xubuntu 12.04 LTS _Precise Pangolin_ - Release amd64 (20120425)]/ dists/precise/universe/binary-i386/
# deb cdrom:[Xubuntu 12.04 LTS _Precise Pangolin_ - Release amd64 (20120425)]/ precise main multiverse restricted universe

# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://nl.archive.ubuntu.com/ubuntu/ precise main restricted
deb-src http://nl.archive.ubuntu.com/ubuntu/ precise main restricted

## Major bug fix updates produced after the final release of the
## distribution.
deb http://nl.archive.ubuntu.com/ubuntu/ precise-updates main restricted
deb-src http://nl.archive.ubuntu.com/ubuntu/ precise-updates main restricted

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb http://nl.archive.ubuntu.com/ubuntu/ precise universe
deb-src http://nl.archive.ubuntu.com/ubuntu/ precise universe
deb http://nl.archive.ubuntu.com/ubuntu/ precise-updates universe
deb-src http://nl.archive.ubuntu.com/ubuntu/ precise-updates universe

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu 
## team, and may not be under a free licence. Please satisfy yourself as to 
## your rights to use the software. Also, please note that software in 
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://nl.archive.ubuntu.com/ubuntu/ precise multiverse
deb-src http://nl.archive.ubuntu.com/ubuntu/ precise multiverse
deb http://nl.archive.ubuntu.com/ubuntu/ precise-updates multiverse
deb-src http://nl.archive.ubuntu.com/ubuntu/ precise-updates multiverse

## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
deb http://nl.archive.ubuntu.com/ubuntu/ precise-backports main restricted universe multiverse
deb-src http://nl.archive.ubuntu.com/ubuntu/ precise-backports main restricted universe multiverse

deb http://security.ubuntu.com/ubuntu precise-security main restricted
deb-src http://security.ubuntu.com/ubuntu precise-security main restricted
deb http://security.ubuntu.com/ubuntu precise-security universe
deb-src http://security.ubuntu.com/ubuntu precise-security universe
deb http://security.ubuntu.com/ubuntu precise-security multiverse
deb-src http://security.ubuntu.com/ubuntu precise-security multiverse

## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
deb http://archive.canonical.com/ubuntu precise partner
# deb-src http://archive.canonical.com/ubuntu precise partner

## This software is not part of Ubuntu, but is offered by third-party
## developers who want to ship their latest software.
deb http://extras.ubuntu.com/ubuntu precise main
deb-src http://extras.ubuntu.com/ubuntu precise main
deb http://cran.at.r-project.org/bin/linux/ubuntu precise/
# deb-src http://cran.at.r-project.org/bin/linux/ubuntu precise/
# deb http://archive.canonical.com/ precise partner
# deb-src http://archive.canonical.com/ precise partner

And the kernel in use is:

liv@liv-HP-Compaq-dc7900:~$ uname -a
Linux liv-HP-Compaq-dc7900 3.2.0-57-generic #87-Ubuntu SMP Tue Nov 12 21:35:10 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux

What is wrong and how can I fix it?

5
  • a fix from Google is on its way (bug here) Mar 10, 2016 at 17:34
  • Possible duplicate of No more updates for Google Chrome | apt-get update error Mar 10, 2016 at 17:38
  • @törzsmókus This question has nothing to do with Google in particular, and has preceded the linked question by some 2 years. If anything, the question you link to is a duplicate of the present question.
    – landroni
    Mar 10, 2016 at 21:10
  • OK, I accept your reasoning. I just wanted to note that the solution to the two problems is essentially the same. Mar 12, 2016 at 12:25
  • @törzsmókus Which is why IMO the other question should be marked as a duplicate of this one, as this one is more general.
    – landroni
    Mar 12, 2016 at 17:57

4 Answers 4

28

I had the same issue using my own apt-mirror server to update the git-core package.

In my case, I resolved the issue by adding [arch=amd64] in the original entry in the /etc/apt/sources.list.

Example:
Original: deb http://192.168.111.222/mirror/git-core precise main
Solution: deb [arch=amd64] http://192.168.111.222/mirror/git-core precise main

The details can be found at: https://wiki.ubuntu.com/MultiarchSpec#apt_sources

In your case, you need to edit /etc/apt/sources.list.d/apt-build.list.

2
  • 1
    It worked now. I only had to use the [arch=amd64] trick on /etc/apt/sources.list.d/apt-build.list.
    – landroni
    Mar 20, 2014 at 16:40
  • (Mint-64) My issue was with google-chrome so the file I had to modify was different but the edit was the same. Though, as the file warned me, the edit was later reverted by the system that generates the file. A reddit thread pointed me to using the Update Manager client directly (Edit-> Software sources -> Additional repositories -> Edit URL...). I have yet to see whether this will ensure the change sticks, but I suspect it will.
    – jgreen
    Mar 4, 2016 at 19:34
5

As suggested by the accepted answer, I had to edit the contents of:

/etc/apt/sources.list.d/apt-build.list

From:

deb file:/var/cache/apt-build/repository apt-build main

to:

deb [arch=amd64] file:/var/cache/apt-build/repository apt-build main

Note that the error came solely from apt-build.list. No changes to /etc/apt/sources.list were needed to fix the problem.

1

I had to make one more slight correction, i.e.:

deb [arch=amd64 trusted=yes]  file:/var/cache/apt-build/repository apt-build main

before apt stopped complaining - I've never dealt with the sources.list's [options] before, so it took me a few minutes of googling and trial/errorring to get it right...

0

Basically, if you want to keep a mess with your OS and different architecture repositories, then you can add [arch=amd64] as a one-off fix (you will need to do it for each repository, which is annoying)

Especially, whenever you need to do it at the company level, it is easier to do like this:

sudo dpkg --remove-architecture i386

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .