Q&A
前提・実現したいこと
CUDAとcudnnをインストールして使いたいようにしたい。
chainerとcupyを使用したい。
はじめanacondaを使用して、tensorflowとkerasをが使えるようにしました。その段階でCUDAとcudnnが入っていました。
しかし、chainer環境をanacondaだと構築できないようなので、
https://docs.nvidia.com/deeplearning/sdk/cudnn-install/index.htmlにそって、手で入れることにしました。
その結果CUDA 10.1を入れたはずなのにnvcc -Vしたら 9が出てきます。(これはanacondaで入れたもののように思います)
anaconda環境から出ても、anacondaで入れたものが有効になるのでしょうか?
前のものをアンインストールして、新しいものにしたいと思うのですが、アンインストールできません。
またsudo apt-get install でCUDAを入れる方法、anacondaで入れる方法、nvidiaの手順、どれで入れるのが一番かんたんですか。
■■な機能を実装中に以下のエラーメッセージが発生しました。
発生している問題・エラーメッセージ
sudo apt autoremove
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:
cuda-libraries-dev-10-1 : Depends: libcublas-dev (>= 10.2.0.168) but it is not installed
cuda-samples-10-1 : Depends: libcublas-dev (>= 10.2.0.168) but it is not installed
cuda-visual-tools-10-1 : Depends: libcublas-dev (>= 10.2.0.168) but it is not installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
該当のソースコード
補足情報(FW/ツールのバージョンなど
os Ubuntu
alps@Alps:~$ uname -r
4.18.0-20-generic
(base) alps@Alps:$ cat /proc/driver/nvidia/version18.04)
NVRM version: NVIDIA UNIX x86_64 Kernel Module 430.14 Wed May 8 01:10:53 UTC 2019
GCC version: gcc version 7.3.0 (Ubuntu 7.3.0-27ubuntu1
alps@Alps:~$ nvcc -V
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2017 NVIDIA Corporation
Built on Fri_Nov__3_21:07:56_CDT_2017
Cuda compilation tools, release 9.1, V9.1.85
alps@Alps:~$ sudo dpkg --audit
The following packages have been unpacked but not yet configured.
They must be configured using dpkg --configure or the configure
menu option in dselect for them to work:
cuda CUDA meta-package
cuda-10-1 CUDA 10.1 meta-package
cuda-documentation-10-1 CUDA documentation
cuda-libraries-dev-10-1 CUDA Libraries 10.1 development meta-package
cuda-samples-10-1 CUDA example applications
cuda-toolkit-10-1 CUDA Toolkit 10.1 meta-package
cuda-tools-10-1 CUDA Tools meta-package
cuda-visual-tools-10-1 CUDA visual tools
(base) alps@Alps:~$ sudo apt --fix-broken install
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:
linux-headers-4.18.0-16 linux-headers-4.18.0-16-generic linux-image-4.18.0-16-generic linux-modules-4.18.0-16-generic
linux-modules-extra-4.18.0-16-generic
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
libcublas-dev
The following NEW packages will be installed:
libcublas-dev
0 upgraded, 1 newly installed, 0 to remove and 159 not upgraded.
8 not fully installed or removed.
Need to get 0 B/39.1 MB of archives.
After this operation, 112 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 file:/var/cuda-repo-10-1-local-10.1.168-418.67 libcublas-dev 10.2.0.168-1 [39.1 MB]
(Reading database ... 246256 files and directories currently installed.)
Preparing to unpack .../libcublas-dev_10.2.0.168-1_amd64.deb ...
Unpacking libcublas-dev (10.2.0.168-1) ...
dpkg: error processing archive /var/cuda-repo-10-1-local-10.1.168-418.67/./libcublas-dev_10.2.0.168-1_amd64.deb (--unpack):
trying to overwrite '/usr/lib/x86_64-linux-gnu/libcublas_static.a', which is also in package nvidia-cuda-dev 9.1.85-3ubuntu1
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Errors were encountered while processing:
/var/cuda-repo-10-1-local-10.1.168-418.67/./libcublas-dev_10.2.0.168-1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
下記のような回答は推奨されていません。
このような回答には修正を依頼しましょう。