I have a CUDA setup problem. My nvcc is short-lived. It not permanently anchors in the Ubuntu terminal.
I successfully installed Graphics Card with the version of NVIDIA-Linux-x86_64–415.25.run. While I input the command nvidia-smi, it shows the right configuration of RTX 2060. Then I installed CUDA 10.0.130 and set Environment Variable in both the X server terminal and the Ubuntu terminal. Please see the following descriptions.
- Sett up environment in X server.
After switching from Ubuntu user interface to X server terminal with Ctrl+Alt+F1, I made the setup as follows.
export PATH=$PATH:/usr/local/cuda-10.0/bin
export LD_LIBRARY_PATH=/usr/local/cuda-10.0/lib64
echo ‘PATH=$PATH:/usr/local/cuda-10.0/bin’ >> ~/.bash_profile
echo ‘LD_LIBRARY_PATH=/usr/local/cuda-10.0/lib64’ >> ~/.bash_profile
After I input the command vncc -V, it shown a correct configuration in the X server terminal. It was good each time when I input nvcc -V.
- Set up environment variables in the Ubuntu Terminal.
However, while I switch from the X server terminal to the Ubuntu terminal by Ctrl+Alt+F7, I could not find out CUDA Compiler 10.0.130. The Ununtu Terminal shows the message as follows.
The program ‘nvcc’ is not installed. You can install it by typing sudo apt-get nvidia-cuda-toolkit.
I had to set the following environment variables in the Ubuntu terminal every time. It worked while I was working on the terminal. However, while I opened a new Ubuntu terminal or restart my computer, I could not find out nvcc by the command nvcc -V.
sudo subl ~/.bashrc
export PATH=$PATH:/usr/local/cuda-10.0/bin
export LD_LIBRARY_PATH=/usr/local/cuda-10.0/lib64
echo ‘PATH=$PATH:/usr/local/cuda-10.0/bin’ >> ~/.bash_profile
echo ‘LD_LIBRARY_PATH=/usr/local/cuda-10.0/lib64’ >> ~/.bash_profile
source ~/.bashrc
I need to set the following commands again in order to find nvcc. However, while I opened a new Ubuntu terminal or restart my computer, I could not find out nvcc by the command nvcc -V. I had to set the above-mentioned environment variables again and again in order to find nvcc. Why the environment variables are short-lived?
Please help me solve the problem.
Thanks in advance,
Mike