当我跑步时:
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: libcurl3 (= 7.35.0-1ubuntu2) but 7.35.0-1ubuntu2.8 is to be installed
Depends: libkrb5-dev but it is not going to be installed
Depends: librtmp-dev but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
如果我尝试手动安装每个依赖项,它会给我一个类似的错误,即依赖项的另一个依赖项......依赖地狱,我以为 apt-get 就是为了避免这种情况而创建的。
为什么它没有自动安装依赖项?
我正在运行 Ubuntu 14.04。
答案1
当我运行时,sudo apt-get install libcurl4-openssl-dev
我得到以下信息:
$ sudo apt-get install libcurl4-openssl-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
libcurl3
Suggested packages:
libcurl4-doc libcurl3-dbg libidn11-dev libkrb5-dev libldap2-dev librtmp-dev
libssh2-1-dev libssl-dev pkg-config zlib1g-dev
The following NEW packages will be installed:
libcurl3 libcurl4-openssl-dev
0 upgraded, 2 newly installed, 0 to remove and 1 not upgraded.
Need to get 639 kB of archives.
After this operation, 1,745 kB of additional disk space will be used.
Do you want to continue? [Y/n]
我怀疑您的问题可能是“损坏的软件包”。我会运行sudo apt-get autoremove
并sudo apt-get install -f
查看是否有任何问题。然后再次运行您的安装。