Error while trying to install pycurl in Synology NAS - python

I am using synology NAS and python(installed 2.7, 3.5)
when I try to install via PIP, I encounter this error message.
(the first time, I met curl-config not found error.
but now with several entware packages, I met with the message below)
----------
python3 -m pip install pycurl
Collecting pycurl
Using cached pycurl-7.43.0.tar.gz
Building wheels for collected packages: pycurl
Running setup.py bdist_wheel for pycurl ... error
Complete output from command /usr/local/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-79dqoc3v/pycurl/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/tmpa8e0oiyqpip-wheel- --python-tag cp35:
Using curl-config (libcurl 7.55.0)
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.5
creating build/lib.linux-x86_64-3.5/curl
copying python/curl/__init__.py -> build/lib.linux-x86_64-3.5/curl
running build_ext
building 'pycurl' extension
creating build/temp.linux-x86_64-3.5
creating build/temp.linux-x86_64-3.5/src
/usr/local/x86_64-pc-linux-gnu/bin/x86_64-pc-linux-gnu-ccache-gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -DSYNO_FIX_FLAG_BUG -DOPENSSL_NO_SSL3 -DOPENSSL_NO_SSL2 -DSYNOPLAT_F_X86_64 -O2 -include /usr/syno/include/platformconfig.h -DSYNO_ENVIRONMENT -DBUILD_ARCH=64 -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -g -DSDK_VER_MIN_REQUIRED=600 -pipe -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -D_FORTIFY_SOURCE=2 -O2 -Wno-unused-result -fPIC -DPYCURL_VERSION="7.43.0" -DHAVE_CURL_SSL=1 -I/opt/include -I/volume1/#appstore/py3k/usr/local/include/python3.5m -c src/docstrings.c -o build/temp.linux-x86_64-3.5/src/docstrings.o
unable to execute '/usr/local/x86_64-pc-linux-gnu/bin/x86_64-pc-linux-gnu-ccache-gcc': No such file or directory
error: command '/usr/local/x86_64-pc-linux-gnu/bin/x86_64-pc-linux-gnu-ccache-gcc' failed with exit status 1
----------------------------------------
Failed building wheel for pycurl
Running setup.py clean for pycurl
Failed to build pycurl
Installing collected packages: pycurl
Running setup.py install for pycurl ... error
Complete output from command /usr/local/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-79dqoc3v/pycurl/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-q_rurvzr-record/install-record.txt --single-version-externally-managed --compile:
Using curl-config (libcurl 7.55.0)
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.5
creating build/lib.linux-x86_64-3.5/curl
copying python/curl/__init__.py -> build/lib.linux-x86_64-3.5/curl
running build_ext
building 'pycurl' extension
creating build/temp.linux-x86_64-3.5
creating build/temp.linux-x86_64-3.5/src
/usr/local/x86_64-pc-linux-gnu/bin/x86_64-pc-linux-gnu-ccache-gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -DSYNO_FIX_FLAG_BUG -DOPENSSL_NO_SSL3 -DOPENSSL_NO_SSL2 -DSYNOPLAT_F_X86_64 -O2 -include /usr/syno/include/platformconfig.h -DSYNO_ENVIRONMENT -DBUILD_ARCH=64 -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -g -DSDK_VER_MIN_REQUIRED=600 -pipe -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -D_FORTIFY_SOURCE=2 -O2 -Wno-unused-result -fPIC -DPYCURL_VERSION="7.43.0" -DHAVE_CURL_SSL=1 -I/opt/include -I/volume1/#appstore/py3k/usr/local/include/python3.5m -c src/docstrings.c -o build/temp.linux-x86_64-3.5/src/docstrings.o
unable to execute '/usr/local/x86_64-pc-linux-gnu/bin/x86_64-pc-linux-gnu-ccache-gcc': No such file or directory
error: command '/usr/local/x86_64-pc-linux-gnu/bin/x86_64-pc-linux-gnu-ccache-gcc' failed with exit status 1
----------------------------------------
Command "/usr/local/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-79dqoc3v/pycurl/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-q_rurvzr-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-79dqoc3v/pycurl/

I just had this problem too with by Synology DS415+. The only difference is that I tried to install netdisco.
I found that setting the CC environmental variable to the actual location of gcc compiler in advance helped
# export CC=/opt/bin/gcc

Related

Install onewire error with 1 exitcode on RPi4

how what it wrong with this, help!
I got a problem with installing OneWire lib on my RPi4. Here is full log of installing and error:
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting onewire
Using cached https://files.pythonhosted.org/packages/03/7b/cd3ab987843e40ab0c09c0c5f7d49a270f6caa806bf06a59ecdc81725b3a/onewire-0.2.tar.gz
Building wheels for collected packages: onewire
Running setup.py bdist_wheel for onewire ... error
Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-2239azyu/onewire/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/pip-wheel-wqz46o7n --python-tag cp37:
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-armv7l-3.7
creating build/lib.linux-armv7l-3.7/onewire
copying onewire/__init__.py -> build/lib.linux-armv7l-3.7/onewire
running build_ext
building 'onewire._ow' extension
creating build/temp.linux-armv7l-3.7
creating build/temp.linux-armv7l-3.7/onewire
arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.7m -c onewire/_ow.c -o build/temp.linux-armv7l-3.7/onewire/_ow.o
onewire/_ow.c:2:10: fatal error: owcapi.h: Нет такого файла или каталога
#include <owcapi.h>
^~~~~~~~~~
compilation terminated.
error: command 'arm-linux-gnueabihf-gcc' failed with exit status 1
----------------------------------------
Failed building wheel for onewire
Running setup.py clean for onewire
Failed to build onewire
Installing collected packages: onewire
Running setup.py install for onewire ... error
Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-2239azyu/onewire/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-15wkf469/install-record.txt --single-version-externally-managed --compile --user --prefix=:
running install
running build
running build_py
creating build
creating build/lib.linux-armv7l-3.7
creating build/lib.linux-armv7l-3.7/onewire
copying onewire/__init__.py -> build/lib.linux-armv7l-3.7/onewire
running build_ext
building 'onewire._ow' extension
creating build/temp.linux-armv7l-3.7
creating build/temp.linux-armv7l-3.7/onewire
arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.7m -c onewire/_ow.c -o build/temp.linux-armv7l-3.7/onewire/_ow.o
onewire/_ow.c:2:10: fatal error: owcapi.h: Нет такого файла или каталога
#include <owcapi.h>
^~~~~~~~~~
compilation terminated.
error: command 'arm-linux-gnueabihf-gcc' failed with exit status 1
----------------------------------------
Command "/usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-2239azyu/onewire/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-15wkf469/install-record.txt --single-version-externally-managed --compile --user --prefix=" failed with error code 1 in /tmp/pip-install-2239azyu/onewire/
I'm using Python3. Tried with python3 -m pip install onewire and default pip3 install, but there is always same error.
Also I read something about RPM and Anaconda, but I don't want to install any additional soft.

Why is python giving me a fatal error upon downloading a package?

When trying to install Marine-traffic-api im getting an error:
Installing collected packages: ujson, Marine-Traffic-API
Running setup.py install for ujson: started
Running setup.py install for ujson: finished with status 'error'
Complete output from command /home/benjamin/PycharmProjects/ShipTracking/venv/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pycharm-packaging/ujson/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-ys30b_z8/install-record.txt --single-version-externally-managed --compile --install-headers /home/benjamin/PycharmProjects/ShipTracking/venv/include/site/python3.7/ujson:
Warning: 'classifiers' should be a list, got type 'filter'
running install
running build
running build_ext
building 'ujson' extension
creating build
creating build/temp.linux-x86_64-3.7
creating build/temp.linux-x86_64-3.7/python
creating build/temp.linux-x86_64-3.7/lib
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I./python -I./lib -I/home/benjamin/PycharmProjects/ShipTracking/venv/include -I/usr/include/python3.7m -c ./python/ujson.c -o build/temp.linux-x86_64-3.7/./python/ujson.o -D_GNU_SOURCE
In file included from ./python/ujson.c:39:0:
./python/py_defines.h:39:10: fatal error: Python.h: No such file or directory
#include <Python.h>
^~~~~~~~~~
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
Install the needed packages:
sudo apt-get install build-essential python3 python-dev python3-dev
After that, run:
pip install --no-cache-dir ujson

pycryptodome setup.py causing an error when installing pyrebase

I am trying to install Pyrebase, but I keep getting an error that I believe is caused by setup.py for pycryptodome. I have searched all over but cannot find a solution, does anyone know how to solve this?
My output is below - I added in (...) in places to truncate the output, which was creating and copying libraries.
Thanks for the help
(backend-ragxWAh7) bash-3.2$ pip install Pyrebase
Collecting Pyrebase
(...)
Building wheels for collected packages: pycryptodome
Running setup.py bdist_wheel for pycryptodome ... error
Complete output from command /Users/rafilurie/.local/share/virtualenvs/backend-ragxWAh7/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/d5/zwblxz7d3gxcks_wgjcyxw_00000gn/T/pip-install-q_NyfS/pycryptodome/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /private/var/folders/d5/zwblxz7d3gxcks_wgjcyxw_00000gn/T/pip-wheel-8ox7HU --python-tag cp27:
running bdist_wheel
running build
running build_py
creating build
creating build/lib.macosx-10.14-intel-2.7
creating build/lib.macosx-10.14-intel-2.7/Crypto
copying lib/Crypto/__init__.py -> build/lib.macosx-10.14-intel-2.7/Crypto
(...)
copying lib/Crypto/SelfTest/Signature/test_vectors/PKCS1-PSS/SigVerPSS_186-3.rsp -> build/lib.macosx-10.14-intel-2.7/Crypto/SelfTest/Signature/test_vectors/PKCS1-PSS
warning: PCTBuildPy: byte-compiling is disabled, skipping.
running build_ext
warning: no support for Intel AESNI instructions
building 'Crypto.Hash._MD2' extension
creating build/temp.macosx-10.14-intel-2.7
creating build/temp.macosx-10.14-intel-2.7/src
cc -fno-strict-aliasing -fno-common -dynamic -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch i386 -arch x86_64 -pipe -DLTC_NO_ASM -Isrc/ -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c src/MD2.c -o build/temp.macosx-10.14-intel-2.7/src/MD2.o
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
error: command 'cc' failed with exit status 1
----------------------------------------
Failed building wheel for pycryptodome
Running setup.py clean for pycryptodome
Failed to build pycryptodome
Installing collected packages: pycryptodome, Pyrebase
Running setup.py install for pycryptodome ... error
Complete output from command /Users/rafilurie/.local/share/virtualenvs/backend-ragxWAh7/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/d5/zwblxz7d3gxcks_wgjcyxw_00000gn/T/pip-install-q_NyfS/pycryptodome/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /private/var/folders/d5/zwblxz7d3gxcks_wgjcyxw_00000gn/T/pip-record-1TJZWz/install-record.txt --single-version-externally-managed --compile --install-headers /Users/rafilurie/.local/share/virtualenvs/backend-ragxWAh7/include/site/python2.7/pycryptodome:
running install
running build
running build_py
(...)
creating build/lib.macosx-10.14-intel-2.7/Crypto/SelfTest/Signature/test_vectors/PKCS1-v1.5
copying lib/Crypto/SelfTest/Signature/test_vectors/PKCS1-v1.5/SigVer15_186-3.rsp -> build/lib.macosx-10.14-intel-2.7/Crypto/SelfTest/Signature/test_vectors/PKCS1-v1.5
copying lib/Crypto/SelfTest/Signature/test_vectors/PKCS1-v1.5/SigGen15_186-3.txt -> build/lib.macosx-10.14-intel-2.7/Crypto/SelfTest/Signature/test_vectors/PKCS1-v1.5
copying lib/Crypto/SelfTest/Signature/test_vectors/PKCS1-v1.5/SigGen15_186-2.txt -> build/lib.macosx-10.14-intel-2.7/Crypto/SelfTest/Signature/test_vectors/PKCS1-v1.5
creating build/lib.macosx-10.14-intel-2.7/Crypto/SelfTest/Signature/test_vectors/PKCS1-PSS
copying lib/Crypto/SelfTest/Signature/test_vectors/PKCS1-PSS/SigGenPSS_186-2.txt -> build/lib.macosx-10.14-intel-2.7/Crypto/SelfTest/Signature/test_vectors/PKCS1-PSS
copying lib/Crypto/SelfTest/Signature/test_vectors/PKCS1-PSS/SigGenPSS_186-3.txt -> build/lib.macosx-10.14-intel-2.7/Crypto/SelfTest/Signature/test_vectors/PKCS1-PSS
copying lib/Crypto/SelfTest/Signature/test_vectors/PKCS1-PSS/SigVerPSS_186-3.rsp -> build/lib.macosx-10.14-intel-2.7/Crypto/SelfTest/Signature/test_vectors/PKCS1-PSS
warning: PCTBuildPy: byte-compiling is disabled, skipping.
running build_ext
warning: no support for Intel AESNI instructions
building 'Crypto.Hash._MD2' extension
creating build/temp.macosx-10.14-intel-2.7
creating build/temp.macosx-10.14-intel-2.7/src
cc -fno-strict-aliasing -fno-common -dynamic -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch i386 -arch x86_64 -pipe -DLTC_NO_ASM -Isrc/ -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c src/MD2.c -o build/temp.macosx-10.14-intel-2.7/src/MD2.o
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
error: command 'cc' failed with exit status 1
----------------------------------------
Command "/Users/rafilurie/.local/share/virtualenvs/backend-ragxWAh7/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/d5/zwblxz7d3gxcks_wgjcyxw_00000gn/T/pip-install-q_NyfS/pycryptodome/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /private/var/folders/d5/zwblxz7d3gxcks_wgjcyxw_00000gn/T/pip-record-1TJZWz/install-record.txt --single-version-externally-managed --compile --install-headers /Users/rafilurie/.local/share/virtualenvs/backend-ragxWAh7/include/site/python2.7/pycryptodome" failed with error code 1 in /private/var/folders/d5/zwblxz7d3gxcks_wgjcyxw_00000gn/T/pip-install-q_NyfS/pycryptodome/
You don't have a valid C compiler environment (xcode).
See also here: https://apple.stackexchange.com/questions/254380/macos-mojave-invalid-active-developer-path.
install pycryptodome from github
go into lib/Crypto/PublicKey
get RSA.py file from there
and import it into pyerbase.py file as single file like import rsa

Error while intalling request_kerberos package

I do not understand what the problem is and how to solve it. When I execute
pip install --upgrade pip
And what I obtained is
Collecting pykerberos
Using cached pykerberos-1.1.14.tar.gz
Installing collected packages: pykerberos
Running setup.py install for pykerberos ... error
Complete output from command /usr/bin/python2 -u -c "import
setuptools, tokenize;__file__='/tmp/pip-build-
tlTKls/pykerberos/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-cFs8JW-record/install-record.txt --single-version-externally-
managed --compile:
running install
running build
running build_ext
building 'kerberos' extension
creating build
creating build/temp.linux-x86_64-2.7
creating build/temp.linux-x86_64-2.7/src
gcc -pthread -fno-strict-aliasing -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 -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 -
fPIC -I/usr/include/python2.7 -c src/kerberos.c -o build/temp.linux-
x86_64-2.7/src/kerberos.o -DGSSAPI_EXT
src/kerberos.c:17:20: error fatal: Python.h: No existe el fichero
o el directorio
#include <Python.h>
^
compilación terminada.
error: command 'gcc' failed with exit status 1
----------------------------------------
Command "/usr/bin/python2 -u -c "import setuptools,
tokenize;__file__='/tmp/pip-build-
tlTKls/pykerberos/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-cFs8JW-record/install-record.txt --single-version-
externally-managed --compile" failed with error code 1 in /tmp/pip-
build-tlTKls/pykerberos/
I am installing this because I am trying to run kerberos to use it to authenticate when connecting through ansible. Request_kerberos is a dependency.
Any idea?
Thanks!!

GCC error: /usr/lib/rpm/redhat/redhat-hardened-cc1: No such file or directory

[axaysd#localhost ~]$ sudo pip install lightfm
[sudo] password for axaysd:
Collecting lightfm
Using cached lightfm-1.12.tar.gz
Requirement already satisfied: numpy in /usr/lib64/python2.7/site-packages (from lightfm)
Requirement already satisfied: scipy>=0.17.0 in /usr/lib64/python2.7/site-packages (from lightfm)
Requirement already satisfied: requests in /usr/lib/python2.7/site-packages (from lightfm)
Installing collected packages: lightfm
Running setup.py install for lightfm ... error
Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-08iD5u/lightfm/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-T0wh6x-record/install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-2.7
creating build/lib.linux-x86_64-2.7/lightfm
copying lightfm/_lightfm_fast.py -> build/lib.linux-x86_64-2.7/lightfm
copying lightfm/evaluation.py -> build/lib.linux-x86_64-2.7/lightfm
copying lightfm/__init__.py -> build/lib.linux-x86_64-2.7/lightfm
copying lightfm/lightfm.py -> build/lib.linux-x86_64-2.7/lightfm
creating build/lib.linux-x86_64-2.7/lightfm/datasets
copying lightfm/datasets/movielens.py -> build/lib.linux-x86_64-2.7/lightfm/datasets
copying lightfm/datasets/stackexchange.py -> build/lib.linux-x86_64-2.7/lightfm/datasets
copying lightfm/datasets/_common.py -> build/lib.linux-x86_64-2.7/lightfm/datasets
copying lightfm/datasets/__init__.py -> build/lib.linux-x86_64-2.7/lightfm/datasets
copying lightfm/_lightfm_fast_no_openmp.c -> build/lib.linux-x86_64-2.7/lightfm
copying lightfm/_lightfm_fast_openmp.c -> build/lib.linux-x86_64-2.7/lightfm
running build_ext
building 'lightfm._lightfm_fast_openmp' extension
creating build/temp.linux-x86_64-2.7
creating build/temp.linux-x86_64-2.7/lightfm
gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Werror=format-security
-Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches
-specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic -D_GNU_SOURCE -fPIC
-fwrapv -DNDEBUG -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4
-grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic
-D_GNU_SOURCE -fPIC -fwrapv -fPIC -I/usr/include/python2.7 -c lightfm/_lightfm_fast_openmp.c
-o build/temp.linux-x86_64-
**gcc: error: /usr/lib/rpm/redhat/redhat-hardened-cc1: No such file or directory
error: command 'gcc' failed with exit status 1
----------------------------------------
Command "/usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-08iD5u/lightfm/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-T0wh6x-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-08iD5u/lightfm/**
On Fedora 24, this worked for me:
sudo dnf install redhat-rpm-config
Source: https://bugs.launchpad.net/openstack-gate/+bug/1424582
'dnf provides filename' (or 'yum provides filename') can usually tell you what packages provide the file that is being complained about:
root#nuc:~/ > dnf provides '/usr/lib/rpm/redhat/redhat-hardened-cc1'
Last metadata expiration check: 0:24:28 ago on Sat 28 Oct 2017 12:53:33 PM EDT.
redhat-rpm-config-63-1.fc26.noarch : Red Hat specific rpm configuration files
Repo : #System
redhat-rpm-config-63-1.fc26.noarch : Red Hat specific rpm configuration files
Repo : fedora
The above response of 'redhat-rpm-config-63-1.fc26.noarch' confirms that Trần's answer is correct. The "provides" command will save your butt more often than you can imagine!

Categories

Resources