【发布时间】:2016-12-19 01:35:29
【问题描述】:
我正在测试 AWS 以启动 Web 服务。 我坚持使用 pg_config。错误日志是
/app/requirements.txt (line 1))
Using cached psycopg2-2.6.2.tar.gz
Complete output from command python setup.py egg_info:
running egg_info
creating pip-egg-info/psycopg2.egg-info
writing pip-egg-info/psycopg2.egg-info/PKG-INFO
writing dependency_links to pip-egg-info/psycopg2.egg-info/dependency_links.txt
writing top-level names to pip-egg-info/psycopg2.egg-info/top_level.txt
writing manifest file 'pip-egg-info/psycopg2.egg-info/SOURCES.txt'
warning: manifest_maker: standard file '-c' not found
Error: pg_config executable not found.
Please add the directory containing pg_config to the PATH
or specify the full executable path with the option:
python setup.py build_ext --pg-config /path/to/pg_config build ...
or with the pg_config option in 'setup.cfg'.
stackoverflow中有很多解决方案,但对我来说不起作用。
packages:
yum:
python-devel: []
postgresql95-devel: []
libjpeg-devel: '6b'
container_commands:
01_migrate:
command: "python manage.py migrate"
02_collectstatic:
command: "python manage.py collectstatic --noinput"
03_createsu:
command: "python manage.py createsu"
leader_only: true
option_settings:
"aws:elasticbeanstalk:application:environment":
DJANGO_SETTINGS_MODULE: "onreview.settings"
PYTHONPATH: "$PYTHONPATH"
"aws:elasticbeanstalk:container:python":
WSGIPath: "onreview/wsgi.py"
这是我的 .ebextensions/python.config 文件内容。我正在通过压缩源代码上传。
我把 postgresql95-devel 改成了 postgresql-devel, 93, 94, 全部。而且我现在用的是9.5版本的db。
我认为 --pg-config 的路径有问题。但我无法改变它。
有什么办法吗??
p.s 我不想通过 SSH 或其他方式在 EC2 实例中进行设置。
【问题讨论】:
-
这个时候是那个postgresql版本的问题。我使用降级版本解决了。不是 9.5 而是 9.4 在这个时候,我认为这是固定的。
标签: postgresql amazon-web-services amazon-elastic-beanstalk