更新apt仓库时,Ubuntu 64位“无法获取文件[..] binary-i386 / Packages”错误


12

我在64位计算机上的Ubuntu 12.04 LTS上遇到以下问题:每当我尝试更新aptitude存储库时,更新都会奇怪地失败,并显示i386相关错误。我认为这不应该在64位系统上发生。

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.

我尝试恢复status-old时没有运气:

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

我也尝试过:

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.

但这似乎并没有做或报告任何有用的东西。随后的每一个都apt-get update以错误结束。

作为记录,我的/etc/apt/sources.list文件如下所示:

# 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

使用的内核是:

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

有什么问题,我该如何解决?


从谷歌的修复是在它的途中(错误这里
törzsmókus


@törzsmókus这个问题与Google无关,并且比链接的问题早了大约两年。如果有的话,您链接到的问题与当前问题重复。
landroni

好吧,我接受你的推理。我只想指出,解决这两个问题的方法基本相同。
törzsmókus

@törzsmókus这就是IMO为什么要将另一个问题标记为与此问题重复的原因,因为这个问题更笼统。
landroni

Answers:


27

使用自己的apt-mirror服务器更新git-core软件包时,我遇到了同样的问题。

就我而言,我通过在中添加[arch=amd64]原始条目解决了该问题/etc/apt/sources.list

示例:
原始文件:deb http://192.168.111.222/mirror/git-core precise main
解决方案:deb [arch=amd64] http://192.168.111.222/mirror/git-core precise main

可以在以下位置找到详细信息:https : //wiki.ubuntu.com/MultiarchSpec#apt_sources

在您的情况下,您需要进行编辑/etc/apt/sources.list.d/apt-build.list


1
现在工作了。我只需要在上使用[arch=amd64]技巧/etc/apt/sources.list.d/apt-build.list
landroni 2014年

(Mint-64)我的问题与google-chrome有关,因此我必须修改的文件不同,但编辑相同。不过,正如文件警告我所述的那样,后来编辑被生成文件的系统还原。一个reddit线程指示我直接使用Update Manager客户端(“编辑”->“软件源”->“其他存储库”->“编辑URL ...”)。我还没有看到这是否能确保变更坚持下去,但我怀疑会这样。
jgreen

5

如已接受的答案所建议,我必须编辑以下内容:

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

从:

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

至:

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

请注意,错误仅来自apt-build.list。无需进行任何更改即可/etc/apt/sources.list解决此问题。


1

我不得不再做一点更正,即:

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

在apt停止抱怨之前-我以前从未处理过source.list的[options],因此花了几分钟的时间进行谷歌搜索和反复试验才能使它正确。

By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.