1

I wanted to install curl to program in C. However, I encountered a dependency problem:

$ 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.

I tried to install the dependencies and received this error:

$ 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.

I have checked libgnutls-openssl27 version to be 3.2.16-1ubuntu2.1ppa1~trusty.

Any help?

  • Instead of downgrading the package, I would suggest you to disable third part ppa. – g_p Jan 27 '15 at 9:42
  • Yeah! I might accidentally added that. However, how do I know which one is causing problem? – soham Jan 27 '15 at 14:55
  • Post the output of apt-cache policy libgnutls-openssl27 – g_p Jan 27 '15 at 14:57
  • I don't know whether that would be helpful because already I have downgraded the package: $:apt-cache policy libgnutls-openssl27 libgnutls-openssl27: Installed: 2.12.23-12ubuntu2.1 Candidate: 2.12.23-12ubuntu2.1 Version table: *** 2.12.23-12ubuntu2.1 0 500 http://us.archive.ubuntu.com/ubuntu/ trusty-security/main amd64 Packages 500 http://us.archive.ubuntu.com/ubuntu/ trusty-updates/main amd64 Packages 100 /var/lib/dpkg/status 2.12.23-12ubuntu2 0 500 http://us.archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages – soham Jan 28 '15 at 9:34
  • 1
    Sorry it was a type. Ubuntu official repository does not contain libgnutls-openssl27 version 3.2.16-1ubuntu2.1ppa1~trusty. It means it was coming from some third part PPA which you might have added earlier(probably this). You can use apt-cache policy command to find the source of a specific package. But in the output of this command I can see that version 3.2.16-1ubuntu2.1ppa1~trusty is not listed. It means somehow it is disabled. – g_p Jan 28 '15 at 10:07
2

I solved the problem by doing this:

sudo aptitude install libcurl4-openssl-dev

It firstly gave me one naive solution to accept which I didn't take. (Because nothing was to be installed on that solution!) Then it gave a solution to downgrade some packages. I accepted the solution. Now, I don't know whether I did it right! The downgrading may come with some security problem. It would be great if anyone can comment on that.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.