Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

g++: error trying to exec 'cc1plus': execvp: No such file or directory

Tags:

g++

ubuntu

execvp

I am using ubuntu 12.04. I'm trying to "make" a project.

I get this error:

g++: error trying to exec 'cc1plus': execvp: No such file or directory

I have g++ installed.

like image 577
user2824393 Avatar asked Mar 14 '14 19:03

user2824393


3 Answers

I faced the same issue after upgrading gcc to 4.8
sudo apt-get install gcc-4.8 (mind the package name)
Then I manually changed the g++ link to a renamed copy of gcc-4.8

My fix was a proper g++ installation
sudo apt-get install g++-4.8

For clarity you should use g++-4.8 instead of gcc-4.8

like image 44
MonoThreaded Avatar answered Oct 22 '22 11:10

MonoThreaded


I tried the command @MonoThreaded gave but it failed. I tried below and it works.

sudo apt-get install g++

Please don't include any version after the g++.

like image 138
Evan Hu Avatar answered Oct 22 '22 10:10

Evan Hu


I have g++ and gcc installed.

sudo find / -name "cc1plus"

Gave me something like /usr/lib/gcc/x86_64-linux-gnu/<version>/cc1plus

So I added it to the $PATH

export PATH="/usr/lib/gcc/x86_64-linux-gnu/<version>:$PATH"
like image 10
Etienne Gautier Avatar answered Oct 22 '22 12:10

Etienne Gautier