Skip to content

Instantly share code, notes, and snippets.

@hitorilabs
Created November 26, 2023 20:22
Show Gist options
  • Save hitorilabs/fa485212f38d446250cb6a9d525287d3 to your computer and use it in GitHub Desktop.
Save hitorilabs/fa485212f38d446250cb6a9d525287d3 to your computer and use it in GitHub Desktop.

If you are seeing this error, it's likely because you are using an incompatible version of gcc/g++. Currently (2023/11/26), you need to have gcc-12 and g++-12.

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

Make sure to install and point your symlinks for gcc and g++ to the right versions.

sudo apt install gcc-12 g++-12

sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-12 100
sudo update-alternatives --config /usr/bin/gcc gcc

sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-12 100
sudo update-alternatives --config g++
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment