2017-02-26 179 views
-2

我想升級我的cuda庫最新的Cuda 8.0.61。 我開始刪除cuda 7.5。 後來我已經下載CUDA 8.0.61的deb的文件並運行以下命令:Ubuntu 14.04 CUDA 8.0未滿足依賴

  1. sudo dpkg -i cuda-repo-ubuntu1404-8-0-local-ga2_8.0.61-1_amd64.deb
  2. sudo apt-get update
  3. sudo apt-get install cuda

期間,我收到一個錯誤,當安裝我嘗試運行sudo apt-get install -f,我得到以下依賴性錯誤:

The following packages have unmet dependencies: 
cuda-cublas-dev-8-0 : Depends: cuda-cublas-8-0 (>= 8.0.61) but 8.0.34-1 is installed 
cuda-cudart-dev-8-0 : Depends: cuda-cudart-8-0 (>= 8.0.61) but 8.0.34-1 is installed 
cuda-cufft-dev-8-0 : Depends: cuda-cufft-8-0 (>= 8.0.61) but 8.0.34-1 is installed 
cuda-curand-dev-8-0 : Depends: cuda-curand-8-0 (>= 8.0.61) but 8.0.34-1 is installed 
cuda-cusolver-dev-8-0 : Depends: cuda-cusolver-8-0 (>= 8.0.61) but 8.0.34-1 is installed 
cuda-cusparse-dev-8-0 : Depends: cuda-cusparse-8-0 (>= 8.0.61) but 8.0.34-1 is installed 
cuda-npp-dev-8-0 : Depends: cuda-npp-8-0 (>= 8.0.61) but 8.0.34-1 is installed 
cuda-nvgraph-dev-8-0 : Depends: cuda-nvgraph-8-0 (>= 8.0.61) but 8.0.34-1 is installed 
cuda-nvrtc-dev-8-0 : Depends: cuda-nvrtc-8-0 (>= 8.0.61) but 8.0.34-1 is installed 
cuda-runtime-8-0 : Depends: cuda-nvrtc-8-0 (>= 8.0.61) but 8.0.34-1 is installed 
        Depends: cuda-nvgraph-8-0 (>= 8.0.61) but 8.0.34-1 is installed 
        Depends: cuda-cusolver-8-0 (>= 8.0.61) but 8.0.34-1 is installed 
        Depends: cuda-cublas-8-0 (>= 8.0.61) but 8.0.34-1 is installed 
        Depends: cuda-cufft-8-0 (>= 8.0.61) but 8.0.34-1 is installed 
        Depends: cuda-curand-8-0 (>= 8.0.61) but 8.0.34-1 is installed 
        Depends: cuda-cusparse-8-0 (>= 8.0.61) but 8.0.34-1 is installed 
        Depends: cuda-npp-8-0 (>= 8.0.61) but 8.0.34-1 is installed 
        Depends: cuda-cudart-8-0 (>= 8.0.61) but 8.0.34-1 is installed 
cuda-toolkit-8-0 : Depends: cuda-nvml-dev-8-0 (>= 8.0.61) but 8.0.34-1 is installed 
        Depends: cuda-driver-dev-8-0 (>= 8.0.61) but 8.0.34-1 is installed 
E: Unmet dependencies. Try using -f. 

我不確定8.0.34從哪裏來,但現在我無法安裝任何東西(我的意思是任何東西!!!),我無法刪除Cuda? 有什麼建議嗎?

感謝,

+2

這種類型的問題在http://askubuntu.com/ –

+0

有更好的機會得到答案當你試圖首先刪除安裝的'cuda' 8.0.34-1'版本時會發生什麼? – cfromme

+0

建議如何做?這不是一攬子計劃,我不知道.34-1從哪裏來 – Odedy

回答

3

首先,你需要刪除CUDA的舊安裝目錄:

sudo rm -r /usr/local/cuda* 

然後,進入NVIDIA網站上下載。運行文件。

與安裝:

sh cuda_8.0.27_linux.run --override 

你或許應該得到CudNN文件藏漢,如果你打算做一些深層次的學習: 如果是這種情況下,作爲可選的步驟,你可以安裝CudNN在解壓文件夾會做:

sudo cp lib64/* /usr/local/cuda/lib64/ 
sudo cp include/* /usr/local/cuda/include/ 

接下來,設置的.bashrc環境路徑變量:

export PATH=/usr/local/cuda-8.0/bin:$PATH 
export LD_LIBRARY_PATH=/usr/local/cuda-8.0/lib64:$LD_LIBRARY_PATH