Skip to content

pip install libnfs on linux report error"error: command 'gcc' failed with exit status 1" #306

@koalaxiu7

Description

@koalaxiu7

could you help check why "pip install libnfs“ report gcc error?

root@master:manager# python -V
Python 3.6.8
root@master:manager# pip install libnfs
Collecting libnfs
Using cached https://files.pythonhosted.org/packages/e5/d6/5b6ad2d2838a5e077417daaae31d749d06c418c91e520eaad80e1f363547/libnfs-1.0.post4.tar.gz
Building wheels for collected packages: libnfs
Building wheel for libnfs (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: /usr/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-x0gfjj1n/libnfs/setup.py'"'"'; file='"'"'/tmp/pip-install-x0gfjj1n/libnfs/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-yfzsep38 --python-tag cp36
cwd: /tmp/pip-install-x0gfjj1n/libnfs/
Complete output (18 lines):
/usr/local/lib/python3.6/dist-packages/setuptools/dist.py:476: UserWarning: Normalizing '1.0-4' to '1.0.post4'
normalized_version,
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.6
creating build/lib.linux-x86_64-3.6/libnfs
copying libnfs/libnfs.py -> build/lib.linux-x86_64-3.6/libnfs
copying libnfs/init.py -> build/lib.linux-x86_64-3.6/libnfs
running build_ext
building 'libnfs._libnfs' extension
creating build/temp.linux-x86_64-3.6
creating build/temp.linux-x86_64-3.6/libnfs
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/usr/include/python3.6m -c libnfs/libnfs_wrap.c -o build/temp.linux-x86_64-3.6/libnfs/libnfs_wrap.o
libnfs/libnfs_wrap.c:130:21: fatal error: Python.h: No such file or directory
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

ERROR: Failed building wheel for libnfs
Running setup.py clean for libnfs
Failed to build libnfs
Installing collected packages: libnfs
Running setup.py install for libnfs ... error
ERROR: Command errored out with exit status 1:
command: /usr/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-x0gfjj1n/libnfs/setup.py'"'"'; file='"'"'/tmp/pip-install-x0gfjj1n/libnfs/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-0r0ufvrv/install-record.txt --single-version-externally-managed --compile
cwd: /tmp/pip-install-x0gfjj1n/libnfs/
Complete output (18 lines):
/usr/local/lib/python3.6/dist-packages/setuptools/dist.py:476: UserWarning: Normalizing '1.0-4' to '1.0.post4'
normalized_version,
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.6
creating build/lib.linux-x86_64-3.6/libnfs
copying libnfs/libnfs.py -> build/lib.linux-x86_64-3.6/libnfs
copying libnfs/init.py -> build/lib.linux-x86_64-3.6/libnfs
running build_ext
building 'libnfs._libnfs' extension
creating build/temp.linux-x86_64-3.6
creating build/temp.linux-x86_64-3.6/libnfs
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/usr/include/python3.6m -c libnfs/libnfs_wrap.c -o build/temp.linux-x86_64-3.6/libnfs/libnfs_wrap.o
libnfs/libnfs_wrap.c:130:21: fatal error: Python.h: No such file or directory
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
ERROR: Command errored out with exit status 1: /usr/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-x0gfjj1n/libnfs/setup.py'"'"'; file='"'"'/tmp/pip-install-x0gfjj1n/libnfs/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-0r0ufvrv/install-record.txt --single-version-externally-managed --compile Check the logs for full command output.
root@master:manager#

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions