web-dev-qa-db-fra.com

Pourquoi ne puis-je pas installer ces paquets?

Je veux installer la bibliothèque curl dans Ubuntu 12.04 LTS. Pour cela, j'utilise la commande suivante Sudo apt-get install libcurl4-openssl-dev. mais j'ai eu les erreurs comme

    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.

Chaque fois que j'essaye d'installer ces dépendances, cela montre que les paquets déjà installés:

   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.

Qu'est-ce que je dois faire?

J'ai essayé de suivre la commande

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

et il me donne la sortie comme:

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
2
User007

Le résultat que vous avez fourni sur apt-cache policy confirme mes soupçons concernant les listes obsolètes.

Pour l'exemple de krb5-multidev dans 12.04, vous devriez voir la version 1.10+dfsg~beta1-2ubuntu0.3 en tant que candidat fourni par 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

Ainsi, comme je l'ai déjà suggéré dans les commentaires, exécutez

Sudo apt-get update

Et vous devriez être prêt (réessayez l'installation et mettez correctement à jour votre système!).

2
gertvdijk