[英]Error while installing Devstack on Ubuntu : “/opt/stack/requirements/.venv/bin/pip” not exists
While trying to install devstack, I got this error saying:在尝试安装 devstack 时,我收到此错误消息:
+inc/python:pip_install:359 env http_proxy= https_proxy= no_proxy= PIP_FIND_LINKS= SETUPTOOLS_SYS_PATH_TECHNIQUE=rewrite /opt/stack/requirements/.venv/bin/pip install -c /opt/stack/requirements/up
per-constraints.txt -U pbr
env: ‘/opt/stack/requirements/.venv/bin/pip’: No such file or directory
+inc/python:pip_install:1 exit_trap
+./stack.sh:exit_trap:515 local r=127
++./stack.sh:exit_trap:516 jobs -p
+./stack.sh:exit_trap:516 jobs=
+./stack.sh:exit_trap:519 [[ -n '' ]]
+./stack.sh:exit_trap:525 '[' -f '' ']'
+./stack.sh:exit_trap:530 kill_spinner
+./stack.sh:kill_spinner:425 '[' '!' -z '' ']'
+./stack.sh:exit_trap:532 [[ 127 -ne 0 ]]
+./stack.sh:exit_trap:533 echo 'Error on exit'
Error on exit
+./stack.sh:exit_trap:535 type -p generate-subunit
+./stack.sh:exit_trap:536 generate-subunit 1536645760 69 fail
+./stack.sh:exit_trap:538 [[ -z /opt/stack/logs ]]
+./stack.sh:exit_trap:541 /opt/stack/devstack/tools/worlddump.py -d /opt/stack/logs
+./stack.sh:exit_trap:550 exit 127
It looks like I am unable to install pip in the virtualenv of devstack.看起来我无法在 devstack 的 virtualenv 中安装 pip。 I tried
virtualenv
command in the requirements
directory but unfortunately the error persists.我在
requirements
目录中尝试了virtualenv
命令,但不幸的是错误仍然存在。
After trying many solutions which did not work.在尝试了许多不起作用的解决方案之后。 I finally got it working.
我终于让它工作了。
The actual error is that devstack is unable to create a virtual environment for itself because it does not have access to some file in .cache
directory.实际的错误是 devstack 无法为自己创建虚拟环境,因为它无权访问
.cache
目录中的某些文件。 Unfortunately, this error will only pop up the first time you are trying to install devstack.不幸的是,这个错误只会在你第一次尝试安装 devstack 时弹出。
I followed these steps:我按照以下步骤操作:
sudo chown -R stack:stack.cache/ virtualenv requirements/
At this point, you should have pip
in your .cache
directory.此时,您的
.cache
目录中应该有pip
。
The next step is to remove everything except /devstack
and .cache
directories and run下一步是删除除
/devstack
devstack 和.cache
目录之外的所有内容并运行cd devstack/./clean.sh
Finally, run最后,运行
./stack.sh
PS: the aim is to set up virtual environment
for devstack
. PS:目的是为
devstack
建立virtual environment
。 You may choose your way of doing it.你可以选择你的方式来做这件事。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.