在长时间不活动之后,我正在更新我的项目,结果出了问题。部署失败,应用程序在git push
之后未重新启动。在
我仍然可以通过运行gear start
手动启动我的应用程序,但是从install_requires
安装包所需的部署步骤失败。在
以下是gear deploy
输出的部分:
Activating virtenv
Running setup.py script..
running develop
error: can't create or remove files in install directory
The following error occurred while trying to add or remove files in the
installation directory:
[Errno 13] Permission denied: '/usr/lib/python2.6/site-packages/test-easy-install-358943.write-test'
The installation directory you specified (via --install-dir, --prefix, or
the distutils default setting) was:
/usr/lib/python2.6/site-packages/
Perhaps your account does not have write access to this directory? If the
installation directory is a system-owned directory, you may need to sign in
as the administrator or "root" account. If you do not have administrative
access to this machine, you may wish to choose a different installation
directory, preferably one that is listed in your PYTHONPATH environment
variable.
For information on other options, you may wish to consult the
documentation at:
http://peak.telecommunity.com/EasyInstall.html
Please make the appropriate changes for your system and try again.
后来:
^{pr2}$我试着启动venv然后逃跑设置.py手动:
source $OPENSHIFT_GEAR_DIR/virtenv/bin/activate
export PYTHON_EGG_CACHE=$OPENSHIFT_GEAR_DIR/virtenv/lib/python-2.6
~/app-root/repo/setup.py develop
但是,它导致了相同的can't create or remove files in install directory
错误。我也不能像以前那样在这个环境中运行manage.py
。在
在我看来,venv出了什么事,但是,然后,gear start
也使用了它,而且它仍然有效。。。在
有谁能给我重点介绍一下这个问题吗?在
另外,我用的是Python2.6墨盒
至少,我已经成功了。符号链接有点混乱,
virtenv/lib64
->;../../python-2.6/virtenv/lib
只能从~/python-2.6
访问,它是指向~/python
的符号链接,它包含virtenv
,实际上是由环境变量引用的,它是指向~/app-root/runtime/dependencies/python/virtenv
的另一个符号链接。结果,virtenv python解释器在virtenv/lib64
中找不到库和其他东西,而是返回到/usr
前缀。在我只需指向
lib64
->;lib
,部署现在就可以工作了。在然而,所有这些混乱都是由OpenShift工具链造成的,我不确定它不会再次崩溃。在
相关问题 更多 >
编程相关推荐