弹性beanstalk部署有错误

时间:2015-01-13 06:49:42

标签: amazon-web-services

我想将我的代码部署到弹性beanstalk,

有错误:

我不知道有什么问题,请帮助我。谢谢!!

Command /opt/python/run/venv/bin/python27 -c "import setuptools, tokenize;__file__='/opt/python/run/venv/build/lxml/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-tgTtHY-record/install-record.txt --single-version-externally-managed --compile --install-headers /opt/python/run/venv/include/site/python2.7 failed with error code 1 in /opt/python/run/venv/build/lxml
Storing debug log for failure in /root/.pip/pip.log
2015-01-13 06:25:55,467 ERROR    Error installing dependencies: Command '/opt/python/run/venv/bin/pip install --use-mirrors -r /opt/python/ondeck/app/requirements.txt' returned non-zero exit status 1
Traceback (most recent call last):
  File "/opt/elasticbeanstalk/hooks/appdeploy/pre/03deploy.py", line 36, in main
    install_dependencies()
  File "/opt/elasticbeanstalk/hooks/appdeploy/pre/03deploy.py", line 31, in install_dependencies
    check_call('%s install --use-mirrors -r %s' % (os.path.join(APP_VIRTUAL_ENV, 'bin', 'pip'), requirements_file), shell=True)
  File "/usr/lib64/python2.6/subprocess.py", line 505, in check_call
    raise CalledProcessError(retcode, cmd)
CalledProcessError: Command '/opt/python/run/venv/bin/pip install --use-mirrors -r /opt/python/ondeck/app/requirements.txt' returned non-zero exit status 1 (Executor::NonZeroExitStatus)

.ebextensions / 01.config

packages:
    yum:
        gcc: ''
        python27-devel: ''
        postgresql93-devel: ''
        pkgconfig: ''
        libffi-devel: ''
        libxslt-devel: ''
        libxml2-devel: ''

1 个答案:

答案 0 :(得分:0)

我知道这个问题有点陈旧,但我想提出我的解决方案以防万一其他人仍有问题。

不确定这是否是您遇到的问题,但是EBS一直拒绝我想要安装的外部python包。所以我从requirements.txt文件中删除了外部包,而是在我的.ebextenions中添加了一些命令

这是我添加的内容,它完美无缺。

packages: yum: git: []
container_commands: 01_install_infusionsoft: command: "pip install git+https://github.com/infusionsoft/Official-API-Python-Library.git"

不确定这是否是推荐使用EBS的方法,但这是安装我的软件包的最简单方法。希望这有帮助!