当我尝试在 Ubuntu 16.04 上安装 curl 时,它给出了以下错误消息:
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-gnutls (= 7.47.0-1ubuntu2) but 7.47.0-1ubuntu2.6 is to be installed
E: Unable to correct problems, you have held broken packages.
怎么修?
答案1
更新:我通过恢复到旧版本的 libcurl3-gnutls 解决了该问题。
对于遇到同样问题的人,我通过列出缓存来做到这一点:
apt-cache showpkg libcurl3-gnutls
这给了我很长的输出,但重要的部分是最后三行:
Provides:
7.47.0-1ubuntu2.6 -
7.47.0-1ubuntu2 -
Reverse Provides:
我使用以下命令下载旧版本:
sudo apt-get install libcurl3-gnutls=7.47.0-1ubuntu2
然后我sudo apt install curl
正常跑步。
谢谢您的帮助!
答案2
我遇到了类似的事情,但上面建议的修复方法不起作用。最终为我修复了这个问题的方法是:sudo apt remove libcurl4 然后我可以执行 sudo apt upgrade 而不会收到有关 libcurl 依赖项未满足的错误消息。