The error message told us, that the build-time dependency (in this case it is cc1
) was not found, so all we need — install the appropriate package to the system (using package manager // from sources // another way)
What is cc1
:
cc1
is the internal command which takes preprocessed C-language files and converts them to assembly. It's the actual part that compiles C. For C++, there's cc1plus, and other internal commands for different languages.
taken from this answer by Alan Shutko.
sudo apt-get update
sudo apt-get install --reinstall build-essential
If you are in docker-alpine environment install the build-base package by adding this to your Dockerfile
:
RUN apk add build-base
Better package name provided by Pablo Castellano. More details here.
If you need more packages for building purposes, consider adding of the alpine-sdk package:
RUN apk add alpine-sdk
Taken from github
This answer contains instructions for CentOS and Fedora Linux
sudo yum install gcc72-c++
Taken from this comment by CoderChris
You could also try to install missed dependencies by this (though, it is said to not to solve the issue):
sudo yum install gcc-c++.noarch
Taken from this answer
On CentOS or Fedora
yum install gcc-c++
On debian / ubuntu I fixed this problem by reinstalling build-essential
:
sudo apt-get update
sudo apt-get install --reinstall build-essential
This is because gcc
calls many other executables to complete the processing of the input, and cc1
is not in the included path.
On shell type whereis cc1
. If cc1
is found, it's better go ahead and create a softlink in the directory of gcc
; otherwise, cc1
is not installed and you have to install gcc-c++ using the package manager.
Amazon Linux: fixing GCC issue
Since this comes up as the first result on Google, I just wanted to document my experience with Amazon Linux. Installing gcc-c++.noarch
fixed the problem:
sudo yum install gcc-c++.noarch
Some people also reported this alternative as a solution:
sudo yum install gcc72-c++
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With