安装 curl 依赖项错误

安装 curl 依赖项错误

我想安装 curl 来用 C 语言编程。但是,遇到了依赖问题:

$ sudo apt-get install libcurl4-openssl-dev
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:
 libcurl4-openssl-dev : Depends: librtmp-dev but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

我尝试安装依赖项并收到此错误:

$ sudo apt-get install libgnutls-dev
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:
 libgnutls-dev : Depends: libgnutls-openssl27 (= 2.12.23-12ubuntu2.1) but 3.2.16-1ubuntu2.1ppa1~trusty is to be installed
E: Unable to correct problems, you have held broken packages.

我已检查libgnutls-openssl27版本为 3.2.16-1ubuntu2.1ppa1~trusty。

有什么帮助吗?

答案1

我通过这样做解决了这个问题:

sudo aptitude install libcurl4-openssl-dev

它首先给了我一个很简单的解决方案,但我没有接受。(因为这个解决方案上没有安装任何东西!)然后它给了我一个解决方案降级一些软件包。我接受了这个解决方案。现在,我不知道我是否做对了!降级可能会带来一些安全问题。如果有人能对此发表评论,那就太好了。

相关内容