我試圖通過構建(通過easy_install)在Ubuntu實例上安裝PyCrypto,並且出現以下錯誤:試圖通過構建,src/config.h在Ubuntu上安裝PyCrypto:沒有這樣的文件或目錄
Getting distribution for 'pycrypto>=1.9'.
Running easy_install:
/usr/bin/python "-S" "-c" "import sys,os;p = sys.path[:];import site;sys.path[:] = p; [sys.modules.pop(k) for k, v in sys.modules.items() if hasattr(v, '__path__') and len(v.__path__)==1 and not os.path.exists(os.path.join(v.__path__[0],'__init__.py'))];from setuptools.command.easy_install import main;main()" "-mUNxd" "/opt/rocktech/buildout/cache/eggs/tmppKIfK7" "-Z" "/opt/rocktech/buildout/cache/download/dist/pycrypto-2.4.tar.gz"
path=/opt/rocktech/buildout/cache/eggs/setuptools-0.6c12dev_r88846-py2.6.egg
Processing pycrypto-2.4.tar.gz
Running pycrypto-2.4/setup.py -q bdist_egg --dist-dir /tmp/easy_install-dD_8Pu/pycrypto- 2.4/egg-dist-tmp-_d3xDl
error: Setup script exited with error: src/config.h: No such file or directory
An error occurred when trying to install pycrypto 2.4. Look above this message for any errors that were output by easy_install.
While:
Installing django.
Getting distribution for 'pycrypto>=1.9'.
Error: Couldn't install: pycrypto 2.4
任何想法是什麼造成這種情況?
值得注意的是,我在雪豹本地有同樣的問題,我可以通過直接下載代碼並手動運行python manage.py build
和python manage.py install
來修復它。我想避免這一點,因爲我正在部署到十幾臺服務器。
您可以嘗試詢問serverfault ... – retracile
其他人有相同的問題:http://stackoverflow.com/questions/7897486/missing-src-config-h-when-trying-to-install-pycrypto-通過易安裝 – retracile