libcurl4-openssl-dev的未满足依赖项

提问

我需要在Ubuntu 14.04上安装libcurl4-openssl-dev

我已经尝试了sudo apt-get install libcurl4-openssl-dev和sudo apt-get install -f libcurl4-openssl-dev,但是返回:

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 librtmp-dev,它返回:

The following packages have unmet dependencies:
librtmp-dev : Depends: libgnutls-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,返回:

The following packages have unmet dependencies:
libgnutls-dev : Depends: libgcrypt11-dev (>= 1.4.0) but it is not going to be installed
Depends: libtasn1-6-dev but it is not going to be installed
Depends: libp11-kit-dev (>= 0.4) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

依赖是无止境的…

最佳答案

在Ubuntu 14.04上的R中安装RCurl时遇到了完全相同的问题.
问题在于libcurl4-openssl-dev依赖于librtmp-dev,后者依赖于libgnutls-dev,后者依赖于libgcrypt11-dev(> = 1.4.0).

Ubuntu 14.04(至少是我的发行版)具有libgcrypt20-dev,并且它不允许在同一环境中使用版本20和版本11.但是,您可以使用

sudo apt-get build-dep libcurl4-openssl-dev
sudo apt-get install libcurl4-openssl-dev

但是它将用版本11替换libgcrypt20-dev.