apt-get安装失败,并显示“未找到"错误,因为软件包已从存储库中删除 [英] apt-get install fails with Not Found error because package removed from repository

查看:236
本文介绍了apt-get安装失败,并显示“未找到"错误,因为软件包已从存储库中删除的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在尝试在Ubuntu Trusty Tahr上安装软件包r-base,并且在上个星期有一个软件包依赖性被破坏了.

I've been attempting to install the package r-base on Ubuntu Trusty Tahr and there's a package dependency that became broken in the last week.

我的命令如下:

apt-get update -y
apt-get dist-upgrade -y
apt-get install -y r-base-dev
...
Err http://archive.ubuntu.com/ubuntu/ trusty-security/main libpng12-dev amd64 1.2.50-1ubuntu2.14.04.1
  404  Not Found [IP: 91.189.91.23 80]
Fetched 92.8 MB in 28s (3262 kB/s)
E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/libp/libpng/libpng12-dev_1.2.50-1ubuntu2.14.04.1_amd64.deb  404  Not Found [IP: 91.189.91.23 80]

E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
The command '/bin/sh -c sudo apt-get install -y r-base-dev' returned a non-zero code: 100

我尝试通过--fix-missing--ignore-missing,但仍然失败.

I have attempted to pass --fix-missing and --ignore-missing but it still fails.

由于安全补丁,该软件包似乎已于2016年1月8日被删除:

It appears that the package was removed on Jan 8, 2016 due to a security patch: https://launchpad.net/ubuntu/+archive/primary/+sourcepub/5711916/+listing-archive-extra

查看 http://archive.ubuntu.com/ubuntu/pool/main/libp/libpng/确认不存在ubuntu2.14.04. 1 文件,但存在1.2.50-1ubuntu2.14.04. 2 .

Looking at http://archive.ubuntu.com/ubuntu/pool/main/libp/libpng/ confirms that the ubuntu2.14.04.1 file is not there but 1.2.50-1ubuntu2.14.04.2 is present.

该如何解决? 我的目标是安装r-base.

How do I fix that? My goal is to get r-base to install.

如果我能以某种方式使它使用版本"2"而不是"1",它大概会找到该文件并愉快地进行,但是我不确定如何使apt-get做到这一点.

If I could somehow make it use the version "2" file instead of "1" it would presumably find the file and proceed happily, but I'm not sure how to make apt-get do that.

或者,也许可以更新我这一边的依赖项列表吗?还是由r-base维护者来决定?

Alternatively, maybe it's possible to update the dependency list on my side? Or is it up to the r-base maintainers to do so?

或者第三,是否可以添加仍具有旧软件包的存储库?我不是在AMD处理器上运行,因此无论如何我都不需要在运行时使用这个特殊的程序包.

Or third, is it possible to add a repository that still has the old package? I'm not running on an AMD processor, so I shouldn't need this particular package at runtime anyway.

更新: 对我有用的解决方案是在运行apt-get update之前显式删除依赖关系已损坏的软件包,下载更新的版本,然后重新安装.

Update: The solution that worked for me was to explicitly remove the package with the broken dependency, download the updated version, and re-install it before running apt-get update.

$ apt-get remove -y libpng12-0
$ curl -O http://archive.ubuntu.com/ubuntu/pool/main/libp/libpng/libpng12-0_1.2.50-1ubuntu2.14.04.2_amd64.deb
$ dpkg -i libpng12-0_1.2.50-1ubuntu2.14.04.2_amd64.deb
$ apt-get update -y

即使r-base-dev偶然依赖于libpng12,问题显然也与r-baser-base-dev包无关.

The problem apparently doesn't have much to do with the r-base or r-base-dev packages, even though r-base-dev incidentally depends on libpng12.

推荐答案

在我看来,此问题可能会在几天后解决.但是,如果等不及了,这就是您可以做的.

In my opinion this problem will probably fix itself in a couple of days. However if you can't wait, here's what you can do.

首先,找出要安装的软件包所依赖的libpng版本.

First, find out which version of libpng the package you want to install depends on.

$ apt-cache depends r-base
r-base
  Depends: r-base-core
  Depends: r-recommended
  Recommends: r-base-html
  Recommends: r-doc-html
  Suggests: ess
 |Suggests: r-doc-info
  Suggests: r-doc-pdf

r-base本身不依赖于libpng,但是可能依赖r-base-core.

r-base itself does not depend on libpng but r-base-core probably does.

$ apt-cache depends r-base-core | grep png
  Depends: libpng12-0

现在我们想知道libpng的哪个特定版本

Now we want to know which specific version of libpng

$ apt-cache show r-base-core
... libpng12-0 (>= 1.2.13-4) ...

如果您在Ubuntu的存储库中找到此软件包,则可以 下载并尝试手动安装.

If you locate this package in Ubuntu's repositories, you can download it and try to install it manually.

$ wget <url>
$ sudo dpkg -i <filename>

,然后将r-baseapt-get install r-base一起安装.但是如果dpkg 拒绝安装libpng,您不应强行安装它,因为这意味着 该软件包不可安装,并且会破坏其他依赖性.

and then install r-base with apt-get install r-base. However if dpkg refuses to install libpng you should not force it, because it means the package is not installable and it would break other dependencies.

这篇关于apt-get安装失败,并显示“未找到"错误,因为软件包已从存储库中删除的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆