arm-linux-gnueabihf-g++: error trying to exec 'cc1plus': execvp: No such file or directory

created at 10-19-2021 views: 34


ubuntu: 18.04 version, cross-compiled code error report arm-linux-gnueabihf-g++: error trying to exec'cc1plus': execvp: No such file or directory


You can see that I am here with a cross-compilation tool. For similar situations, you can look at the cross-compilation tool folder and export the environment variable PATH.

Like mine

export PATH=$PATH:/opt/gcc-linaro-7.3.1-2018.05-x86_64_arm-linux-gnueabihf/bin

In order to take effect permanently, you can modify the /etc/profile or ~/.brashrc file. There should be an introduction to the article about the difference between the two to search for Linux environment variables to take effect permanently

[Key points] The cross-compilation tool chain must be decompressed and copied to the specified path (or directly decompressed to the specified path). Don’t copy only part of the tool to your own tool chain path after decompression. It is easy to be inexplicable. Impossible mistake! ! !

If it is not cross-compilation, the solution is simple, just install the g++ tool!

created at:10-19-2021
edited at: 10-19-2021: