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

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


You need to install gcc-c++ package.

yum install gcc-c++


I don't know why but i just renamed my source file COLARR.C to colarr.c and the error vanished!probably you need this

sudo apt-get install g++


This problem can happen if different versions of g++ and gcc are installed.

   g++ --version   gcc --version

If these don't give the result, you probably have multiple versions of gcc installed. You can check by using:

    dpkg -l | grep gcc | awk '{print $2}'

Usually, /usr/bin/gcc will be sym-linked to /etc/alternatives/gcc which is again sym-linked to say /usr/bin/gcc-4.6 or /usr/bin/gcc-4.8 (In case you have gcc-4.6, gcc-4.8 installed.)

By changing this link you can make gcc and g++ run in the same version and this may resolve your issue!