error: command 'gcc' failed with exit status 1 on CentOS
Is gcc installed?
sudo yum install gcc
error: command 'gcc' failed with exit status 1 while installing eventlet
Your install is failing because you don't have the python development headers installed. You can do this through apt on ubuntu/debian with:
sudo apt-get install python-dev
for python3 use:
sudo apt-get install python3-dev
For eventlet
you might also need the libevent
libraries installed so if you get an error talking about that you can install libevent with:
sudo apt-get install libevent-dev
error: command 'gcc' failed with exit status 1 when trying to install python-language-server
If you read the word message, it tells you what is wrong
./python/py_defines.h:39:10: fatal error: Python.h: No such file or directory
It says it can't find the header file. Ask dnf
about what provides it:
sudo dnf provides '*/Python.h'
Then install that package (sudo dnf install ...
) and retry your original command.
Installing superset: error: command 'gcc' failed with exit status 1
Same issue, and Mik's answer is the solution.
But in addition to his answer: Now the python-devel
is called python36-devel
. Use this to check the correct name if someone had the problem about "can't find python-devel".
# check the name of python.devel
> sudo yum search python3 | grep devel
# install the python36.devel
> sudo yum install python36.devel
error: command 'gcc' failed with exit status 1 when installing pip packages on alpine docker image
Missing the header file Python.h
, this file is provide by python2-dev
( -dev
mean package for doing development with ) .
With this https://pkgs.alpinelinux.org/contents you can search all packages that have Python.h
I was able to run pip install pygpgme
by adding these 3 packages :
- python2-dev
- gpgme-dev
- libc-dev
And the Dockerfile
will be :
FROM alpine:latest
RUN apk update && apk upgrade
RUN apk add --no-cache bash\
python \
pkgconfig \
git \
gcc \
openldap \
libcurl \
python2-dev \
gpgme-dev \
libc-dev \
&& rm -rf /var/cache/apk/*
RUN wget https://bootstrap.pypa.io/get-pip.py && python get-pip.py
RUN pip install setuptools==30.1.0
pip install pyhs2 error: command 'gcc' failed with exit status 1
You should try installing the package cyrus-sasl
and the development headers cyrus-sasl-devel
.
sudo yum install cyrus-sasl cyrus-sasl-devel
Related Topics
Why Is My Python App Stalled with 'System'/Kernel CPU Time
How to Import Lldb in a Python Script
Python: Complexity of Os.Path.Exists with a Ext4 Filesystem
How to Limit the Amount of Time a Function Can Run for (Add a Timeout)
Auto Executable Python File Without Opening from Terminal
Sharing Psycopg2/Libpq Connections Across Processes
How to Split My 800X480 5-Inch Screen into 2 Parts
Modulenotfounderror: No Module Named 'Pydip', Although It's Installed
Launch Default Image Viewer from Pygtk Program
Faster Way to Find Large Files with Python
How to Send Input on Stdin to a Python Script Defined Inside a Makefile
Virtualenv Uses Wrong Python, Even Though It Is First in $Path
Importerror: No Module Named 'Pysqlite2'
How to Get an Windows Executable from My Kivy App (Pyinstaller)