在 ubuntu 14.04 上,我遵循http://mirror.its.dal.ca/cran/bin/linux/ubuntu/README意思是
Installation and compilation of R or some of its packages may require Ubuntu packages from the "backports" repositories. In particular, this is the case for Tcl/Tk 8.5 on Hardy. Therefore, it is suggested to activate the backports repositories with an entry like
deb http://<my.favorite.ubuntu.mirror>/ raring-backports main restricted universe
in your /etc/apt/sources.list file. See https://launchpad.net/ubuntu/+archivemirrors for the list of Ubuntu mirrors.
因此https://launchpad.net/ubuntu/+archivemirrors,我选择了“加州大学伯克利分校开放计算设施”,并复制了链接(http://mirrors.ocf.berkeley.edu/ubuntu/) 的“http”,并添加到我的/etc/apt/sources.list
:
deb http://mirrors.ocf.berkeley.edu/ubuntu/ raring-backports main restricted universe
当我运行时sudo apt-get update
,遇到以下错误:
Err http://mirrors.ocf.berkeley.edu raring-backports/main amd64 Packages
404 Not Found
Err http://mirrors.ocf.berkeley.edu raring-backports/restricted amd64 Packages
404 Not Found
Err http://mirrors.ocf.berkeley.edu raring-backports/universe amd64 Packages
404 Not Found
Err http://mirrors.ocf.berkeley.edu raring-backports/main i386 Packages
404 Not Found
Err http://mirrors.ocf.berkeley.edu raring-backports/restricted i386 Packages
404 Not Found
Err http://mirrors.ocf.berkeley.edu raring-backports/universe i386 Packages
404 Not Found
Ign http://mirrors.ocf.berkeley.edu raring-backports/main Translation-en_US
Ign http://mirrors.ocf.berkeley.edu raring-backports/main Translation-en
Ign http://mirrors.ocf.berkeley.edu raring-backports/restricted Translation-en_US
Ign http://mirrors.ocf.berkeley.edu raring-backports/restricted Translation-en
Ign http://mirrors.ocf.berkeley.edu raring-backports/universe Translation-en_US
Ign http://mirrors.ocf.berkeley.edu raring-backports/universe Translation-en
W: Failed to fetch http://mirrors.ocf.berkeley.edu/ubuntu/dists/raring-backports/main/binary-amd64/Packages 404 Not Found
W: Failed to fetch http://mirrors.ocf.berkeley.edu/ubuntu/dists/raring-backports/restricted/binary-amd64/Packages 404 Not Found
W: Failed to fetch http://mirrors.ocf.berkeley.edu/ubuntu/dists/raring-backports/universe/binary-amd64/Packages 404 Not Found
W: Failed to fetch http://mirrors.ocf.berkeley.edu/ubuntu/dists/raring-backports/main/binary-i386/Packages 404 Not Found
W: Failed to fetch http://mirrors.ocf.berkeley.edu/ubuntu/dists/raring-backports/restricted/binary-i386/Packages 404 Not Found
W: Failed to fetch http://mirrors.ocf.berkeley.edu/ubuntu/dists/raring-backports/universe/binary-i386/Packages 404 Not Found
E: Some index files failed to download. They have been ignored, or old ones used instead.
整个输出在这篇文章的末尾。我想知道为什么会出现这个问题以及如何解决它?谢谢!
$ sudo apt-get update
Ign http://us.archive.ubuntu.com trusty InRelease
Ign http://security.ubuntu.com trusty-security InRelease
Ign http://us.archive.ubuntu.com trusty-updates InRelease
Hit http://security.ubuntu.com trusty-security Release.gpg
Ign http://dl.google.com stable InRelease
Ign http://us.archive.ubuntu.com trusty-backports InRelease
Hit http://security.ubuntu.com trusty-security Release
Hit http://us.archive.ubuntu.com trusty Release.gpg
Hit http://us.archive.ubuntu.com trusty-updates Release.gpg
Hit http://security.ubuntu.com trusty-security/main Sources
Hit http://us.archive.ubuntu.com trusty-backports Release.gpg
Hit http://security.ubuntu.com trusty-security/restricted Sources
Hit http://us.archive.ubuntu.com trusty Release
Hit http://security.ubuntu.com trusty-security/universe Sources
Hit http://us.archive.ubuntu.com trusty-updates Release
Hit http://us.archive.ubuntu.com trusty-backports Release
Hit http://security.ubuntu.com trusty-security/multiverse Sources
Ign http://archive.canonical.com trusty InRelease
Hit http://us.archive.ubuntu.com trusty/main Sources
Hit http://security.ubuntu.com trusty-security/main amd64 Packages
Hit http://us.archive.ubuntu.com trusty/restricted Sources
Ign http://extras.ubuntu.com trusty InRelease
Hit http://security.ubuntu.com trusty-security/restricted amd64 Packages
Hit http://us.archive.ubuntu.com trusty/universe Sources
Hit http://security.ubuntu.com trusty-security/universe amd64 Packages
Hit http://us.archive.ubuntu.com trusty/multiverse Sources
Ign http://stat.ethz.ch trusty/ InRelease
Hit http://security.ubuntu.com trusty-security/multiverse amd64 Packages
Hit http://us.archive.ubuntu.com trusty/main amd64 Packages
Hit http://security.ubuntu.com trusty-security/main i386 Packages
Hit http://us.archive.ubuntu.com trusty/restricted amd64 Packages
Hit http://security.ubuntu.com trusty-security/restricted i386 Packages
Ign http://archive.canonical.com trusty InRelease
Hit http://us.archive.ubuntu.com trusty/universe amd64 Packages
Hit http://security.ubuntu.com trusty-security/universe i386 Packages
Hit http://extras.ubuntu.com trusty Release.gpg
Hit http://us.archive.ubuntu.com trusty/multiverse amd64 Packages
Hit http://security.ubuntu.com trusty-security/multiverse i386 Packages
Hit http://us.archive.ubuntu.com trusty/main i386 Packages
Hit http://security.ubuntu.com trusty-security/main Translation-en
Ign http://mirrors.ocf.berkeley.edu raring-backports InRelease
Hit http://us.archive.ubuntu.com trusty/restricted i386 Packages
Hit http://security.ubuntu.com trusty-security/multiverse Translation-en
Ign http://dl.google.com stable InRelease
Hit http://security.ubuntu.com trusty-security/restricted Translation-en
Hit http://archive.canonical.com trusty Release.gpg
Hit http://stat.ethz.ch trusty/ Release.gpg
Hit http://extras.ubuntu.com trusty Release
Hit http://us.archive.ubuntu.com trusty/universe i386 Packages
Ign http://mirrors.ocf.berkeley.edu raring-backports Release.gpg
Hit http://us.archive.ubuntu.com trusty/multiverse i386 Packages
Hit http://dl.google.com stable Release.gpg
Hit http://security.ubuntu.com trusty-security/universe Translation-en
Hit http://archive.canonical.com trusty Release.gpg
Hit http://us.archive.ubuntu.com trusty/main Translation-en
Hit http://dl.google.com stable Release.gpg
Hit http://stat.ethz.ch trusty/ Release
Hit http://us.archive.ubuntu.com trusty/multiverse Translation-en
Hit http://extras.ubuntu.com trusty/main Sources
Hit http://dl.google.com stable Release
Ign http://mirrors.ocf.berkeley.edu raring-backports Release
Hit http://us.archive.ubuntu.com trusty/restricted Translation-en
Hit http://archive.canonical.com trusty Release
Hit http://dl.google.com stable Release
Hit http://us.archive.ubuntu.com trusty/universe Translation-en
Hit http://us.archive.ubuntu.com trusty-updates/main Sources
Hit http://us.archive.ubuntu.com trusty-updates/restricted Sources
Hit http://dl.google.com stable/main amd64 Packages
Hit http://us.archive.ubuntu.com trusty-updates/universe Sources
Hit http://extras.ubuntu.com trusty/main amd64 Packages
Hit http://stat.ethz.ch trusty/ Packages
Hit http://us.archive.ubuntu.com trusty-updates/multiverse Sources
Hit http://archive.canonical.com trusty Release
Hit http://us.archive.ubuntu.com trusty-updates/main amd64 Packages
Hit http://dl.google.com stable/main i386 Packages
Hit http://us.archive.ubuntu.com trusty-updates/restricted amd64 Packages
Hit http://us.archive.ubuntu.com trusty-updates/universe amd64 Packages
Hit http://us.archive.ubuntu.com trusty-updates/multiverse amd64 Packages
Hit http://extras.ubuntu.com trusty/main i386 Packages
Hit http://us.archive.ubuntu.com trusty-updates/main i386 Packages
Hit http://archive.canonical.com trusty/partner Sources
Hit http://dl.google.com stable/main amd64 Packages
Hit http://us.archive.ubuntu.com trusty-updates/restricted i386 Packages
Hit http://us.archive.ubuntu.com trusty-updates/universe i386 Packages
Hit http://dl.google.com stable/main i386 Packages
Hit http://us.archive.ubuntu.com trusty-updates/multiverse i386 Packages
Hit http://archive.canonical.com trusty/partner amd64 Packages
Hit http://us.archive.ubuntu.com trusty-updates/main Translation-en
Hit http://us.archive.ubuntu.com trusty-updates/multiverse Translation-en
Hit http://us.archive.ubuntu.com trusty-updates/restricted Translation-en
Hit http://us.archive.ubuntu.com trusty-updates/universe Translation-en
Hit http://us.archive.ubuntu.com trusty-backports/main Sources
Ign https://private-ppa.launchpad.net precise InRelease
Hit http://us.archive.ubuntu.com trusty-backports/restricted Sources
Hit http://archive.canonical.com trusty/partner i386 Packages
Hit http://us.archive.ubuntu.com trusty-backports/universe Sources
Hit http://us.archive.ubuntu.com trusty-backports/multiverse Sources
Hit http://us.archive.ubuntu.com trusty-backports/main amd64 Packages
Hit http://us.archive.ubuntu.com trusty-backports/restricted amd64 Packages
Hit http://us.archive.ubuntu.com trusty-backports/universe amd64 Packages
Hit https://private-ppa.launchpad.net precise Release.gpg
Hit http://us.archive.ubuntu.com trusty-backports/multiverse amd64 Packages
Hit http://us.archive.ubuntu.com trusty-backports/main i386 Packages
Hit http://us.archive.ubuntu.com trusty-backports/restricted i386 Packages
Hit http://archive.canonical.com trusty/partner Sources
Hit https://private-ppa.launchpad.net precise Release
Hit http://us.archive.ubuntu.com trusty-backports/universe i386 Packages
Hit http://us.archive.ubuntu.com trusty-backports/multiverse i386 Packages
Hit http://us.archive.ubuntu.com trusty-backports/main Translation-en
Hit http://us.archive.ubuntu.com trusty-backports/multiverse Translation-en
Hit http://archive.canonical.com trusty/partner amd64 Packages
Hit http://us.archive.ubuntu.com trusty-backports/restricted Translation-en
Hit http://us.archive.ubuntu.com trusty-backports/universe Translation-en
Hit https://private-ppa.launchpad.net precise/main amd64 Packages
Hit http://archive.canonical.com trusty/partner i386 Packages
Hit https://private-ppa.launchpad.net precise/main i386 Packages
Ign http://us.archive.ubuntu.com trusty/main Translation-en_US
Ign http://us.archive.ubuntu.com trusty/multiverse Translation-en_US
Ign http://us.archive.ubuntu.com trusty/restricted Translation-en_US
Ign http://us.archive.ubuntu.com trusty/universe Translation-en_US
Ign http://dl.google.com stable/main Translation-en_US
Ign http://extras.ubuntu.com trusty/main Translation-en_US
Ign http://dl.google.com stable/main Translation-en
Ign http://dl.google.com stable/main Translation-en_US
Ign http://dl.google.com stable/main Translation-en
Ign http://archive.canonical.com trusty/partner Translation-en
Ign http://extras.ubuntu.com trusty/main Translation-en
Ign http://stat.ethz.ch trusty/ Translation-en_US
Ign http://archive.canonical.com trusty/partner Translation-en
Ign http://stat.ethz.ch trusty/ Translation-en
Ign https://private-ppa.launchpad.net precise/main Translation-en_US
Ign https://private-ppa.launchpad.net precise/main Translation-en
Err http://mirrors.ocf.berkeley.edu raring-backports/main amd64 Packages
404 Not Found
Err http://mirrors.ocf.berkeley.edu raring-backports/restricted amd64 Packages
404 Not Found
Err http://mirrors.ocf.berkeley.edu raring-backports/universe amd64 Packages
404 Not Found
Err http://mirrors.ocf.berkeley.edu raring-backports/main i386 Packages
404 Not Found
Err http://mirrors.ocf.berkeley.edu raring-backports/restricted i386 Packages
404 Not Found
Err http://mirrors.ocf.berkeley.edu raring-backports/universe i386 Packages
404 Not Found
Ign http://mirrors.ocf.berkeley.edu raring-backports/main Translation-en_US
Ign http://mirrors.ocf.berkeley.edu raring-backports/main Translation-en
Ign http://mirrors.ocf.berkeley.edu raring-backports/restricted Translation-en_US
Ign http://mirrors.ocf.berkeley.edu raring-backports/restricted Translation-en
Ign http://mirrors.ocf.berkeley.edu raring-backports/universe Translation-en_US
Ign http://mirrors.ocf.berkeley.edu raring-backports/universe Translation-en
W: Failed to fetch http://mirrors.ocf.berkeley.edu/ubuntu/dists/raring-backports/main/binary-amd64/Packages 404 Not Found
W: Failed to fetch http://mirrors.ocf.berkeley.edu/ubuntu/dists/raring-backports/restricted/binary-amd64/Packages 404 Not Found
W: Failed to fetch http://mirrors.ocf.berkeley.edu/ubuntu/dists/raring-backports/universe/binary-amd64/Packages 404 Not Found
W: Failed to fetch http://mirrors.ocf.berkeley.edu/ubuntu/dists/raring-backports/main/binary-i386/Packages 404 Not Found
W: Failed to fetch http://mirrors.ocf.berkeley.edu/ubuntu/dists/raring-backports/restricted/binary-i386/Packages 404 Not Found
W: Failed to fetch http://mirrors.ocf.berkeley.edu/ubuntu/dists/raring-backports/universe/binary-i386/Packages 404 Not Found
E: Some index files failed to download. They have been ignored, or old ones used instead.
答案1
对 Ubuntu 13.04“Raring Ringtail”的支持已于 2014-01-27 结束,因此大多数镜像不再提供raring-backports
任何支持。
由于您使用的是 Ubuntu 14.04 并且已经trusty-backports
激活,因此没有任何理由使用软件包源。只需将其删除即可。
答案2
README 似乎已过时(您不希望进行反向移植)。只需为 CRAN 镜像添加一行,例如维也纳的 CRAN 主服务器:
deb http://cran.at.r-project.org/bin/linux/ubuntu trusty/
或者你可以使用Ubuntu R PPA,可以使用以下语法添加:
sudo add-apt-repository ppa:marutter/rrutter
答案3
删除此行:
deb http://mirrors.ocf.berkeley.edu/ubuntu/ raring-backports main restricted universe
并使用这列表选择一个镜像。
正如 Florian Diesch 已经回答的那样:
对 Ubuntu 13.04“Raring Ringtail”的支持已于 2014-01-27 结束,因此大多数镜像不再提供 raring-backports。