更新时无法获取某些软件包

更新时无法获取某些软件包

我想在 ubuntu 12.04 上获取 ruby​​ on rails,但我遇到了错误,提示我需要更新。我复制了更新结束时的结果,但没有包含前面的部分。如果需要,我可以添加。

Hit http://us.archive.ubuntu.com precise-backports/restricted Translation-en
Hit http://us.archive.ubuntu.com precise-backports/universe Translation-en
Fetched 2,916 kB in 4s (663 kB/s)
W: Failed to fetch http://ppa.launchpad.net/gijzelaar/opencv2/ubuntu/dists/precise/main/source/Sources  404  Not Found

W: Failed to fetch http://ppa.launchpad.net/gijzelaar/opencv2/ubuntu/dists/precise/main/binary-amd64/Packages  404  Not Found

W: Failed to fetch http://ppa.launchpad.net/gijzelaar/opencv2/ubuntu/dists/precise/main/binary-i386/Packages  404  Not Found

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

当我运行 rvm requirements 时,这是我看到的错误。

Checking requirements for ubuntu.
Installing requirements for ubuntu.
Updating system..................
Error running 'requirements_debian_update_system ',
showing last 15 lines of /home/charles/.rvm/log/1397254493/update_system.log
+ case "${TERM:-dumb}" in
+ case "$1" in
+ [[ -t 2 ]]
+ return 1
+ printf %b 'There has been error while updating '\''apt-get'\'', please give it some time and try again later.
For 404 errors check your sources configured in:
    /etc/apt/sources.list
    /etc/apt/sources.list.d/*.list
\n'
There has been error while updating 'apt-get', please give it some time and try again later.
For 404 errors check your sources configured in:
    /etc/apt/sources.list
    /etc/apt/sources.list.d/*.list

+ return 100
Requirements installation failed with status: 100.

我正在遵循 https://www.digitalocean.com/community/articles/how-to-install-ruby-on-rails-on-ubuntu-12-04-lts-precise-pangolin-with-rvm

答案1

此 PPA 已在某个时间点重命名,实际上可能对 Launchpad 造成问题。浏览器可能会重定向,但文件不会。

目前,“opencv2” repo 重定向到“opencv2.2”。2.4 实际上更新。如果您想要 2.2,则 repo 可能因此而“失效”。这将安装 2.4。

  • 删除 PPA

sudo apt-add-repository --remove ppa:gijzelaar/opencv2

  • 直接安装 PPA

sudo apt-add-repository ppa:gijzelaar/opencv2.4 -y

  • 更新您的来源

sudo apt-get 更新

  • 重试您的命令。

相关内容