Search code examples
pythonapache-superset

Installing superset: error: command 'gcc' failed with exit status 1


I'm trying to install Superset on CentOS 7, I've followed the official site Apache Superset

and I've installed all required dependencies:

sudo yum upgrade python-setuptools
Plugin abilitati:fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirror.inode.at
 * centosplus: mirror.inode.at
 * epel: mirror.inode.at
 * extras: mirror.nextlayer.at
 

No packages marked for update
The gcc-4.8.5-39.el7.x86_64 package is already installed and updated to the latest version
The gcc-c ++ - 4.8.5-39.el7.x86_64 package is already installed and updated to the latest version
The libffi-devel-3.0.13-18.el7.x86_64 package is already installed and updated to the latest version
The python-devel-2.7.5-86.el7.x86_64 package is already installed and updated to the latest version
The python2-pip-8.1.2-12.el7.noarch package is already installed and updated to the latest version
The python2-wheel-0.29.0-2.el7.noarch package is already installed and updated to the latest version
Package 1: openssl-devel-1.0.2k-19.el7.x86_64 is already installed and updated to the latest version
The cyrus-sasl-devel-2.1.26-23.el7.x86_64 package is already installed and updated to the latest version
The openldap-devel-2.4.44-21.el7_6.x86_64 package is already installed and updated to the latest version

But I've this error when execute

pip install apache-superset

for python-geohash

   ERROR: Command errored out with exit status 1:
     command: /home/mik/supersetvenv/bin/python3.6 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-6xsufws2/python-geohash/setup.py'"'"'; __file__='"'"'/tmp/pip-install-6xsufws2/python-geohash/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-rvrvxjco/install-record.txt --single-version-externally-managed --compile --install-headers /home/mik/supersetvenv/include/site/python3.6/python-geohash
         cwd: /tmp/pip-install-6xsufws2/python-geohash/
    Complete output (16 lines):
    running install
    running build
    running build_py
    creating build
    creating build/lib.linux-x86_64-3.6
    copying geohash.py -> build/lib.linux-x86_64-3.6
    copying quadtree.py -> build/lib.linux-x86_64-3.6
    copying jpgrid.py -> build/lib.linux-x86_64-3.6
    copying jpiarea.py -> build/lib.linux-x86_64-3.6
    running build_ext
    building '_geohash' extension
    creating build/temp.linux-x86_64-3.6
    creating build/temp.linux-x86_64-3.6/src
    gcc -pthread -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -stdlib=libc++ -fPIC -DPYTHON_MODULE=1 -I/home/mik/supersetvenv/include -I/usr/include/python3.6m -c src/geohash.cpp -o build/temp.linux-x86_64-3.6/src/geohash.o
    gcc: error: unrecognized command line option ‘-stdlib=libc++’
    error: command 'gcc' failed with exit status 1
    ----------------------------------------
ERROR: Command errored out with exit status 1: /home/mik/supersetvenv/bin/python3.6 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-6xsufws2/python-geohash/setup.py'"'"'; __file__='"'"'/tmp/pip-install-6xsufws2/python-geohash/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-rvrvxjco/install-record.txt --single-version-externally-managed --compile --install-headers /home/mik/supersetvenv/include/site/python3.6/python-geohash Check the logs for full command output.

Can someone help me?


Solution

  • In addition to Mik's answer: The python-devel is now 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