Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I want to install curl library in ubuntu 12.04 LTS. For that i use the following command sudo apt-get install libcurl4-openssl-dev. but i got the errors as

    ajay@ajay-K54L:~$ sudo apt-get install libcurl4-openssl-dev
    [sudo] password for ajay: 
    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: 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.

Whenever i try to install thee dependencies, it shows that packages already installed:

   ajay@ajay-K54L:~$ sudo apt-get install -f libkrb5-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:
     libkrb5-dev : Depends: krb5-multidev (= 1.10+dfsg~beta1-2) but it is not going to be installed
    E: Unable to correct problems, you have held broken packages.
    ajay@ajay-K54L:~$ sudo apt-get install -f krb5-multidev
    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:
     krb5-multidev : Depends: libkrb5-3 (= 1.10+dfsg~beta1-2) but 1.10+dfsg~beta1-2ubuntu0.3 is to be installed
                     Depends: libk5crypto3 (= 1.10+dfsg~beta1-2) but 1.10+dfsg~beta1-2ubuntu0.3 is to be installed
                     Depends: libgssapi-krb5-2 (= 1.10+dfsg~beta1-2) but 1.10+dfsg~beta1-2ubuntu0.3 is to be installed
    E: Unable to correct problems, you have held broken packages.
    ajay@ajay-K54L:~$ sudo apt-get install -f libkrb5-3
    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    libkrb5-3 is already the newest version.
    0 upgraded, 0 newly installed, 0 to remove and 3 not upgraded.

What do I need to do?

I have tried following command

apt-cache policy libkrb5-3 krb5-multidev libk5crypto3 libgssapi-krb5-2 libcurl4-openssl-dev

and it gives me output as:

ibkrb5-3:
  Installed: 1.10+dfsg~beta1-2ubuntu0.3
  Candidate: 1.10+dfsg~beta1-2ubuntu0.3
  Version table:
 *** 1.10+dfsg~beta1-2ubuntu0.3 0
        100 /var/lib/dpkg/status
     1.10+dfsg~beta1-2 0
        500 http://in.archive.ubuntu.com/ubuntu/ precise/main amd64 Packages
krb5-multidev:
  Installed: (none)
  Candidate: 1.10+dfsg~beta1-2
  Version table:
     1.10+dfsg~beta1-2 0
        500 http://in.archive.ubuntu.com/ubuntu/ precise/main amd64 Packages
libk5crypto3:
  Installed: 1.10+dfsg~beta1-2ubuntu0.3
  Candidate: 1.10+dfsg~beta1-2ubuntu0.3
  Version table:
 *** 1.10+dfsg~beta1-2ubuntu0.3 0
        100 /var/lib/dpkg/status
     1.10+dfsg~beta1-2 0
        500 http://in.archive.ubuntu.com/ubuntu/ precise/main amd64 Packages
libgssapi-krb5-2:
  Installed: 1.10+dfsg~beta1-2ubuntu0.3
  Candidate: 1.10+dfsg~beta1-2ubuntu0.3
  Version table:
 *** 1.10+dfsg~beta1-2ubuntu0.3 0
        100 /var/lib/dpkg/status
     1.10+dfsg~beta1-2 0
        500 http://in.archive.ubuntu.com/ubuntu/ precise/main amd64 Packages
libcurl4-openssl-dev:
  Installed: (none)
  Candidate: 7.22.0-3ubuntu4
  Version table:
     7.22.0-3ubuntu4 0
        500 http://in.archive.ubuntu.com/ubuntu/ precise/main amd64 Packages
share|improve this question
1  
Welcome to Ask Ubuntu! Could you try to update your package lists? sudo apt-get update and then re-attempt the installation. It appears yours are out of date. If that still fails, please provide the output of apt-cache policy libkrb5-3 krb5-multidev libk5crypto3 libgssapi-krb5-2 libcurl4-openssl-dev. –  gertvdijk Feb 4 '13 at 7:58
    
I think this is relevant to this post http://askubuntu.com/questions/140246/how-do-i-resolve-unmet-dependencies –  efthialex Feb 4 '13 at 13:30

1 Answer 1

up vote 0 down vote accepted

The output you provided on apt-cache policy confirms my suspicion about outdated lists.

For the example of krb5-multidev in 12.04 you should see version 1.10+dfsg~beta1-2ubuntu0.3 as a candidate provided through precise-updates.

krb5-multidev:
  Installed: 1.10+dfsg~beta1-2ubuntu0.3
  Candidate: 1.10+dfsg~beta1-2ubuntu0.3
  Version table:
 *** 1.10+dfsg~beta1-2ubuntu0.3 0
        500 http://nl.archive.ubuntu.com/ubuntu/ precise-updates/main amd64 Packages
        500 http://security.ubuntu.com/ubuntu/ precise-security/main amd64 Packages
        100 /var/lib/dpkg/status
     1.10+dfsg~beta1-2 0
        500 http://nl.archive.ubuntu.com/ubuntu/ precise/main amd64 Packages

So, as I already suggested in the comments, run

sudo apt-get update

And you should be all set (retry the installation and also properly update your system!).

share|improve this answer
    
gertvdijk thank for your reply.. I have also tried with "sudo apt-get update" but the same problem exist –  Ajay Tanpure Feb 4 '13 at 13:32
    
@ajaytanpure In that case provide the output of apt-cache policy (no further arguments appended to that command) in your question. I believe you've got a mixed up APT sources configuration. –  gertvdijk Feb 4 '13 at 13:40

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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