I'm trying to compile a simple .cu file with CUDA 5 and gcc 4.7.3 on Ubuntu 13.0 but I'm getting
gcc: error trying to exec 'cc1plus': execvp: No such file or directory
How can I fix this?
I'm trying to compile a simple .cu file with CUDA 5 and gcc 4.7.3 on Ubuntu 13.0 but I'm getting
gcc: error trying to exec 'cc1plus': execvp: No such file or directory
How can I fix this?
I also had this problem. And I checked my g++ it works well. Finally I found the problem and solved it, I hope I can help those who have the same problem.
If you do not has g++ installed, try install it.
If you had a valid g++ and problem still exists, try two command respectively
gcc --version
g++ --version
If the output gcc version is different, that is the problem.
In my case the version of gcc is 7.4, g++ is 5.5. I want to use 7.4 so I run those command:
cd /usr/bin/
sudo rm gcc
sudo rm g++
sudo ln -s gcc-7 gcc
sudo ln -s g++-7 g++
And the problem disappeared.
If you want to use other versions, just change '7' to the version you want (may be '5').