我无法在 Ubuntu 14.04 上安装 curl。
sudo apt-get install curl
错误:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
curl : Depends: libcurl3 (= 7.34.0-1ubuntu1) but 7.35.0-1ubuntu2.5 is to be installed
E: Unable to correct problems, you have held broken packages.
我该如何解决这个问题?
答案1
就我而言,我添加了这一行/etc/apt/sources.list
nano /etc/apt/sources.list
把这两行:
deb http://bg.archive.ubuntu.com/ubuntu/ trusty-security main
deb-src http://bg.archive.ubuntu.com/ubuntu/ trusty-updates main
在那之后
apt-get update
此后我就可以安装curl
。
答案2
运行 apt-get update。如果不起作用,则 /etc/apt/sources.list 中的存储库可能有误
答案3
我解决了安装 aptitude 的问题。
sudo apt-get update
sudo apt-get install aptitude
然后尝试使用 aptitude 安装 curl:
sudo aptitude install grive-tools
之后,它会提示解决未满足的依赖关系(可能是一开始就有问题的依赖关系)的解决方案。