g++: error trying to exec 'cc1plus': execv

2019-01-25 02:24发布

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.

5条回答
兄弟一词,经得起流年.
2楼-- · 2019-01-25 02:33

you need to install the bundle of developer tools

sudo apt-get install build-essential

which includes g++ and the entire make toolchain utils

查看更多
戒情不戒烟
3楼-- · 2019-01-25 02:37

I have g++ installed.

You do, but you don't have it installed correctly.

First run which g++ -- it's likely that your PATH is pointing at something other than /usr/bin/g++, and that version is not properly installed.

查看更多
forever°为你锁心
4楼-- · 2019-01-25 02:46

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++.

查看更多
相关推荐>>
5楼-- · 2019-01-25 02:47

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"
查看更多
做个烂人
6楼-- · 2019-01-25 02:56

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

查看更多
登录 后发表回答