Hello,I run ubuntu 20.04 on my laptop. It has a mobile GPU :
nl37@nl37-Aspire-VX5-591G:~$ lspci | grep -i nvidia
01:00.0 3D controller: NVIDIA Corporation GP107M [GeForce GTX 1050 Mobile] (rev a1)
The last driver is installed :
nl37@nl37-Aspire-VX5-591G:~$ modinfo nvidia
filename: /lib/modules/5.8.0-41-generic/updates/dkms/nvidia.ko
alias: char-major-195-*
version: 460.32.03
[…]
Using sudo apt install nvidia-cuda-toolkit , the 10.2 version is installed. I need the version 11.2 for some IA application. Thereby, I have followed the folllowging procedure:
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/cuda-ubuntu2004.pin
sudo mv cuda-ubuntu2004.pin /etc/apt/preferences.d/cuda-repository-pin-600wget https://developer.download.nvidia.com/compute/cuda/11.2.0/local_installers/cuda-repo-ubuntu2004-11-2-local_11.2.0-460.27.04-1_amd64.debsudo
dpkg -i cuda-repo-ubuntu2004-11-2-local_11.2.0-460.27.04-1_amd64.deb
sudo apt-key add /var/cuda-repo-ubuntu2004-11-2-local/7fa2af80.pub
sudo apt-get updatesudo apt-get -y install cuda
When I try to run a sample, I have the follwing error:
nl37@nl37-Aspire-VX5-591G:/usr/local/cuda-11.2/samples/3_Imaging/imageDenoising$ sudo make
[sudo] password for nl37:
/usr/local/cuda-11.2/bin/nvcc -ccbin g++ -I…/…/common/inc -m64 --threads 0 -gencode arch=compute_35,code=sm_35 -gencode arch=compute_37,code=sm_37 -gencode arch=compute_50,code=sm_50 -gencode arch=compute_52,code=sm_52 -gencode arch=compute_60,code=sm_60 -gencode arch=compute_61,code=sm_61 -gencode arch=compute_70,code=sm_70 -gencode arch=compute_75,code=sm_75 -gencode arch=compute_80,code=sm_80 -gencode arch=compute_86,code=sm_86 -gencode arch=compute_86,code=compute_86 -o bmploader.o -c bmploader.cpp
make: /usr/local/cuda-11.2/bin/nvcc: Command not found
Thank you for your help,
Please check if the package is installed:
dpkg -l |grep “cuda-nvcc”
Hello,
To complete my previsous post, at the end of sudo apt-get -y install cuda, I got the following message :>
Errors were encountered while processing:
/tmp/apt-dpkg-install-TgfrVo/00-cuda-cudart-11-2_11.2.72-1_amd64.deb
/tmp/apt-dpkg-install-TgfrVo/01-cuda-nvrtc-11-2_11.2.67-1_amd64.deb
/tmp/apt-dpkg-install-TgfrVo/02-libcublas-11-2_11.3.1.68-1_amd64.deb
/tmp/apt-dpkg-install-TgfrVo/09-cuda-driver-dev-11-2_11.2.72-1_amd64.deb
/tmp/apt-dpkg-install-TgfrVo/10-cuda-cudart-dev-11-2_11.2.72-1_amd64.deb
/tmp/apt-dpkg-install-TgfrVo/11-cuda-nvcc-11-2_11.2.67-1_amd64.deb
/tmp/apt-dpkg-install-TgfrVo/14-cuda-nvrtc-dev-11-2_11.2.67-1_amd64.deb
/tmp/apt-dpkg-install-TgfrVo/15-libcublas-dev-11-2_11.3.1.68-1_amd64.deb
/tmp/apt-dpkg-install-TgfrVo/17-cuda-cupti-11-2_11.2.67-1_amd64.deb
/tmp/apt-dpkg-install-TgfrVo/18-cuda-cupti-dev-11-2_11.2.67-1_amd64.deb
/tmp/apt-dpkg-install-TgfrVo/22-cuda-nvprof-11-2_11.2.67-1_amd64.deb
/tmp/apt-dpkg-install-TgfrVo/23-cuda-nvtx-11-2_11.2.67-1_amd64.deb
/tmp/apt-dpkg-install-TgfrVo/31-cuda-nvml-dev-11-2_11.2.67-1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
To answer your question, dpkg -l | grep “cuda-nvcc” doesn’t return anything.
Thank you
Seems something is wrong with your package database, try
sudo dpkg ––configure –a
sudo apt autoremove
I got the following message:
nl37@nl37-Aspire-VX5-591G:~$ sudo dpkg ––configure –a
dpkg: error: need an action option
Type dpkg --help for help about installing and uninstalling packages [*];
Use ‘apt’ or ‘aptitude’ for user-friendly package management;
Type dpkg -Dhelp for a list of dpkg debug flag values;
Type dpkg --force-help for a list of forcing options;
Type dpkg-deb --help for help about manipulating *.deb files;
Options marked [*] produce a lot of output - pipe it through ‘less’ or ‘more’ !
Odd message.
Another idea: maybe you ran out of tmpfs space while installing, cuda 11.2 is quite large. please check the available space.
Looks like you have on-disk /tmp and enough space.
Ok and do you have any idea to solve it ? Because I am able to install 10.2 version.
Thank you
generix
February 4, 2021, 9:27am
10
Not really, did you uninstall cuda 10 beforehand? IIRC, some libs are installed into system paths. Otherwise, you could try to use the online repo instead of the offline download or try to use the .run installer, skipping driver install.
Yes I uninstalled all cuda components using:
sudo apt-get --purge remove “cublas ” “cuda*” “nsight*”
I tried the .run installer, and I also had a error. Maybe the problem is from the kernel version? I know that some people have been coping with the 5.9 version, but I use the 5.8.0…
Thanks for trying!