When I need to use apt-get to install somethings.
$sudo apt-get install autoconf automake libtool curl make g++ unzip
Reading package lists... Done
Building dependency tree
Reading state information... Done
make is already the newest version (4.1-9.1ubuntu1).
unzip is already the newest version (6.0-21ubuntu1).
unzip set to manually installed.
curl is already the newest version (7.58.0-2ubuntu3.8).
g++ is already the newest version (4:7.4.0-1ubuntu2.3).
g++ set to manually installed.
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
autoconf : Depends: m4 (>= 1.4.13)
automake : Depends: autotools-dev (>= 20020320.1) but it is not going to be installed
libtool : Depends: autotools-dev but it is not going to be installed
Recommends: libltdl-dev but it is not going to be installed
nvidia-cuda-toolkit : Depends: nvidia-cuda-dev (= 9.1.85-3ubuntu1) but it is not going to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
After I got this error message, I tried to fix it.
However, when I typed 'sudo apt --fix-broken install', I got this error below.
$sudo apt --fix-broken install
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following additional packages will be installed:
nvidia-cuda-dev
Recommended packages:
libnvcuvid1
The following NEW packages will be installed:
nvidia-cuda-dev
0 upgraded, 1 newly installed, 0 to remove and 14 not upgraded.
38 not fully installed or removed.
Need to get 0 B/263 MB of archives.
After this operation, 734 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
(Reading database ... 222357 files and directories currently installed.)
Preparing to unpack .../nvidia-cuda-dev_9.1.85-3ubuntu1_amd64.deb ...
Unpacking nvidia-cuda-dev (9.1.85-3ubuntu1) ...
dpkg: error processing archive /var/cache/apt/archives/nvidia-cuda-dev_9.1.85-3ubuntu1_amd64.deb (--unpack):
trying to overwrite '/usr/include/cublas.h', which is also in package libcublas-dev 10.2.2.89-1
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Errors were encountered while processing:
/var/cache/apt/archives/nvidia-cuda-dev_9.1.85-3ubuntu1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
In here, I already faced this problem many times about nvidia-cuda-dev. I installed cuda 10.2 version. But I don't know why it wanna use version 9? But I need this version(10.2), and I don't want to change it that I am afraid of my environment which will get wrong.
$nvcc --version
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2019 NVIDIA Corporation
Built on Wed_Oct_23_19:24:38_PDT_2019
Cuda compilation tools, release 10.2, V10.2.89
Sorry I am not familiar with setting of environment here. Is there any suggestion about this situation?
Thank you very much!
The package
nvidia-cuda-toolkit
depends onnvidia-cuda-dev
.nvidia-cuda-dev
contains the file/usr/include/cublas.h
which is also in packagelibcublas-dev
so only one of those two packages can be installed at the same time, and currently that'slibcublas-dev
.So basically you can have either
nvidia-cuda-toolkit
orlibcublas-dev
but not both. Remove one of them.It seems
libcublas-dev
is made for another distro or Ubuntu version and not compatible with Ubuntu 18.04.