web-dev-qa-db-fra.com

Comment installer "libboost-all-dev" sur Ubuntu 16.04 LTS x64 avec apt-get

Je suis en train de créer un script personnel de configuration automatique WoW de mangues et j'ai besoin de libboost pour compiler l'application car il s'agit désormais d'une exigence. Ma distribution est:

mangos@mangos-VB:~/Documents/setup/UbuntuBatches/MaNGOS$ uname -a
Linux mangos-VB 4.4.0-66-lowlatency #87-Ubuntu SMP PREEMPT Fri Mar 3 `16:43:09 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux`

J'ai la sortie suivante lorsque j'ai essayé de l'installer:

mangos@mangos-VB:~/Documents/setup/UbuntuBatches/MaNGOS$ Sudo apt-get install libboost-all-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:
 libboost-all-dev : Depends: libboost-date-time-dev but it is not going to be installed
                    Depends: libboost-filesystem-dev but it is not going to be installed
                    Depends: libboost-iostreams-dev but it is not going to be installed
                    Depends: libboost-log-dev but it is not going to be installed
                    Depends: libboost-python-dev but it is not going to be installed
                    Depends: libboost-regex-dev but it is not going to be installed
                    Depends: libboost-system-dev but it is not going to be installed
                    Depends: libboost-thread-dev but it is not going to be installed
                    Depends: libboost-wave-dev but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
mangos@mangos-VB:~/Documents/setup/UbuntuBatches/MaNGOS$

mangos@mangos-VB:~/Documents/setup/UbuntuBatches/MaNGOS$ Sudo apt-cache policy libboost-all-dev

libboost-all-dev:
  Installed: (none)
  Candidate: 1.58.0.1ubuntu1
  Version table:
     1.58.0.1ubuntu1 500
        500 http://bg.archive.ubuntu.com/ubuntu xenial/universe AMD64 Packages

Comme @fkraiem a dit, ma liste apt-get était obsolète et, pour cette raison, apt ne pouvait pas obtenir les dépendances en question. Mon serveur de mise à jour a été défini sur Bulgaria, car il s'agit du serveur le plus proche. Le problème a été résolu lorsque je suis allé à Software and updates -> Ubuntu software -> Drop down /Download from:/ -> Select /Main server/. Après cela, les boutons Close et Reload ont été cliqués. Ouvrez le terminal (Ctrl + Alt + T) et entrez Sudo apt-get update. Et voila, c'est réparé!