I have a new build PC with Ubuntu 18.04.1 and anaconda 4.5.8, and I'm attempting to install tensorflow_gpu. The graphics card is in place on the motherboard but the drivers have not been installed yet.
I was attempting to follow this tutorial to install tensorflow_gpu in Ubuntu 18.04.1.
https://medium.com/@taylordenouden/installing-tensorflow-gpu-on-ubuntu-18-04-89a142325138
The first step is to type:
$ nvidia-smi
From this I got:
Command 'nvidia-smi' not found, but can be installed with:
sudo apt install nvidia-340
sudo apt install nvidia-utils-390
So I typed them in thinking this would allow the nvidia-smi would work.
Command 'nvidia-smi' not found, but can be installed with:
$sudo apt install nvidia-340
This installed OK
But when I ran sudo apt install nvidia-utils-390:
desktop:~$ sudo apt install nvidia-utils-390
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
libnvidia-compute-390
Suggested packages:
nvidia-driver-390
The following packages will be REMOVED
libcuda1-340 nvidia-opencl-icd-340
The following NEW packages will be installed
libnvidia-compute-390 nvidia-utils-390
0 to upgrade, 2 to newly install, 2 to remove and 0 not to upgrade.
Need to get 20.9 MB of archives.
After this operation, 30.4 MB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Get:1 http://gb.archive.ubuntu.com/ubuntu bionic/restricted amd64 libnvidia-compute-390 amd64 390.48-0ubuntu3 [20.6 MB]
Get:2 http://gb.archive.ubuntu.com/ubuntu bionic/restricted amd64 nvidia-utils-390 amd64 390.48-0ubuntu3 [321 kB]
Fetched 20.9 MB in 7s (2,861 kB/s)
(Reading database ... 138972 files and directories currently installed.)
Removing libcuda1-340 (340.106-0ubuntu3) ...
Removing nvidia-opencl-icd-340 (340.106-0ubuntu3) ...
Selecting previously unselected package libnvidia-compute-390:amd64.
(Reading database ... 138957 files and directories currently installed.)
Preparing to unpack .../libnvidia-compute-390_390.48-0ubuntu3_amd64.deb ...
Unpacking libnvidia-compute-390:amd64 (390.48-0ubuntu3) ...
dpkg: error processing archive /var/cache/apt/archives/libnvidia-compute-390_390.48-0ubuntu3_amd64.deb (--unpack):
trying to overwrite '/usr/lib/x86_64-linux-gnu/libnvidia-ml.so', which is also in package nvidia-340 340.106-0ubuntu3
Selecting previously unselected package nvidia-utils-390.
Preparing to unpack .../nvidia-utils-390_390.48-0ubuntu3_amd64.deb ...
Unpacking nvidia-utils-390 (390.48-0ubuntu3) ...
dpkg: error processing archive /var/cache/apt/archives/nvidia-utils-390_390.48-0ubuntu3_amd64.deb (--unpack):
trying to overwrite '/usr/bin/nvidia-bug-report.sh', which is also in package nvidia-340 340.106-0ubuntu3
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Errors were encountered while processing:
/var/cache/apt/archives/libnvidia-compute-390_390.48-0ubuntu3_amd64.deb
/var/cache/apt/archives/nvidia-utils-390_390.48-0ubuntu3_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
Now when I try nvidia-smi I get:
desktop:~$ nvidia-smi
NVIDIA-SMI has failed because it couldn't communicate with the NVIDIA driver. Make sure that the latest NVIDIA driver is installed and running.
Q1.) How do I undo/fix this broken install?
Q2.) What should I install so that when I type nvidia-smi it gives me the output as shown in the tutorial so that I can then follow the rest of the tutorial!
sudo reboot
. – karel Jul 30 '18 at 13:58sudo apt-get purge
for this command. – karel Jul 30 '18 at 14:14sudo apt remove nvidia-smi
and reboot. – karel Jul 30 '18 at 15:03