在CentOS上安装python34-devel并不能解决无法执行'gcc'错误的问题

时间:2017-12-01 11:21:44

标签: python-3.x gcc virtualenv centos7 pipenv

在CentOS Linux版本7.3.1611上运行(核心) with - Linux version 3.10.0-514.26.2.el7.x86_64(builder@kbuilder.dev.centos.org)(gcc version 4.8.5 20150623(Red Hat 4.8.5-11)(GCC)

 Virtualenv location: /mypath/to/project
    + pipenv install -r requirements.txt
    Requirements file provided! Importing into Pipfile…
    Installing dependencies from Pipfile.lock (767e9d)…
    An error occurred while installing lz4==0.11.1! Will try again.
    Installing initially–failed dependencies…
    Collecting lz4==0.11.1 
      Using cached lz4-0.11.1.tar.gz
    Building wheels for collected packages: lz4
      Running setup.py bdist_wheel for lz4: started
      Running setup.py bdist_wheel for lz4: finished with status 'error'
      Complete output from command my/project/path/bin/python3.4m -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-74k3sh5f/lz4/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/tmp1swmfp_jpip-wheel- --python-tag cp34:
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build/lib.linux-x86_64-3.4
      creating build/lib.linux-x86_64-3.4/lz4
      copying lz4/deprecated.py -> build/lib.linux-x86_64-3.4/lz4
      copying lz4/__init__.py -> build/lib.linux-x86_64-3.4/lz4
      copying lz4/lz4version.py -> build/lib.linux-x86_64-3.4/lz4
      copying lz4/version.py -> build/lib.linux-x86_64-3.4/lz4
      creating build/lib.linux-x86_64-3.4/lz4/block
      copying lz4/block/__init__.py -> build/lib.linux-x86_64-3.4/lz4/block
      creating build/lib.linux-x86_64-3.4/lz4/frame
      copying lz4/frame/__init__.py -> build/lib.linux-x86_64-3.4/lz4/frame
      running build_ext
      building 'lz4._version' extension
      creating build/temp.linux-x86_64-3.4
      creating build/temp.linux-x86_64-3.4/lz4
      creating build/temp.linux-x86_64-3.4/lz4libs
      gcc -pthread -Wno-unused-result -DDYNAMIC_ANNOTATIONS_ENABLED=1 -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 -Ilz4libs -Ipy3c -I/usr/include/python3.4m -c lz4/_version.c -o build/temp.linux-x86_64-3.4/lz4/_version.o -O3 -Wall -Wundef
      unable to execute 'gcc': No such file or directory
      error: command 'gcc' failed with exit status 1

尝试安装 - python34-devel包但它没有帮助

1 个答案:

答案 0 :(得分:0)

我正在使用Puppet安装软件包,下面的代码解决了该错误,因为它来了

$ yum search gcc package { 'gcc': ensure => 'installed', }

– vpd