J'ai un système Nvidia 1070 avec Ubuntu 18.04, le pilote Nvidia 396.37, CUDA 9.0, puis TensorFlow et Keras fonctionnant dessus.
Après avoir exécuté Sudo apt update
, quand je lance Sudo apt upgrade
, J'obtiens ce qui suit:
$ Sudo apt upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies.
libglx-mesa0 : Depends: libglapi-mesa (= 18.0.5-0ubuntu0~18.04.1) but 18.2.8-0ubuntu0~18.04.2 is installed
Breaks: libglx-mesa0:i386 (!= 18.0.5-0ubuntu0~18.04.1) but 18.2.8-0ubuntu0~18.04.2 is installed
libglx-mesa0:i386 : Breaks: libglx-mesa0 (!= 18.2.8-0ubuntu0~18.04.2) but 18.0.5-0ubuntu0~18.04.1 is installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
Lorsque j'essaie la suggestion de Sudo apt --fix-broken install
Je vois ce qui suit:
$ Sudo apt --fix-broken installReading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following packages were automatically installed and are no longer required:
libllvm6.0 libllvm6.0:i386 x11proto-dri2-dev x11proto-gl-dev
Use 'Sudo apt autoremove' to remove them.
The following additional packages will be installed:
libglx-mesa0
The following packages will be upgraded:
libglx-mesa0
1 to upgrade, 0 to newly install, 0 to remove and 256 not to upgrade.
155 not fully installed or removed.
Need to get 0 B/135 kB of archives.
After this operation, 9216 B of additional disk space will be used.
Do you want to continue? [Y/n] y
(Reading database ... 591832 files and directories currently installed.)
Preparing to unpack .../libglx-mesa0_18.2.8-0ubuntu0~18.04.2_AMD64.deb ...
Unpacking libglx-mesa0:AMD64 (18.2.8-0ubuntu0~18.04.2) over (18.0.5-0ubuntu0~18.04.1) ...
dpkg: error processing archive /var/cache/apt/archives/libglx-mesa0_18.2.8-0ubuntu0~18.04.2_AMD64.deb (--unpack):
trying to overwrite '/usr/lib/x86_64-linux-gnu/libGLX_indirect.so.0', which is also in package nvidia-396 396.37-0ubuntu1
Errors were encountered while processing:
/var/cache/apt/archives/libglx-mesa0_18.2.8-0ubuntu0~18.04.2_AMD64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
Sur la base de mes recherches, je suis invité par this et this , à exécuter la commande suivante:
Sudo apt-get -o Dpkg::Options::="--force-overwrite" install --fix-broken
Cependant, je préfère vraiment ne pas bousiller ma configuration (car il était difficile de faire fonctionner les versions compatibles de CUDA, TensorFlow, Keras, etc.), donc j'apprécierais de savoir si c'est une approche sûre.
EDIT: Suite à cette suggestion par @Jos, j'ai fait une sauvegarde de /usr/lib/x86_64-linux-gnu/libGLX_indirect.so.0
et a procédé à la --force-overwrite
approche. Suite à cela, l'infrastructure de TensorFlow, Keras et ainsi de suite semble bien fonctionner.
$ Sudo apt-get -o Dpkg::Options::="--force-overwrite" install --fix-broken
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following packages were automatically installed and are no longer required:
libllvm6.0 libllvm6.0:i386 x11proto-dri2-dev x11proto-gl-dev
Use 'Sudo apt autoremove' to remove them.
The following additional packages will be installed:
libglx-mesa0
The following packages will be upgraded:
libglx-mesa0
1 to upgrade, 0 to newly install, 0 to remove and 256 not to upgrade.
155 not fully installed or removed.
Need to get 0 B/135 kB of archives.
After this operation, 9216 B of additional disk space will be used.
Do you want to continue? [Y/n] y
(Reading database ... 591832 files and directories currently installed.)
Preparing to unpack .../libglx-mesa0_18.2.8-0ubuntu0~18.04.2_AMD64.deb ...
Unpacking libglx-mesa0:AMD64 (18.2.8-0ubuntu0~18.04.2) over (18.0.5-0ubuntu0~18.04.1) ...
dpkg: warning: overriding problem because --force enabled:
dpkg: warning: trying to overwrite '/usr/lib/x86_64-linux-gnu/libGLX_indirect.so.0', which is also in package nvidia-396 396.37-0ubuntu1
TL; DR
Attention, la solution ci-dessous utilise --force-overwrite
, cela viendra avec des mises en garde.
Du commentaire @Jos:
Sudo apt-get -o Dpkg::Options::="--force-overwrite" install --fix-broken
Les conflits entre les pilotes Nvidia, CUDA et libglx sur Ubuntu sont toujours trop compliqués -_- |||