我正在尝试在 ubuntu 16 中安装 openstack。我正在遵循本教程:
OpenStack 在 Ubuntu 16.04 服务器上安装 - DevStack
我正在执行这些命令和stack.sh
脚本:
k@ubuntu:~$ sudo adduser stack
k@ubuntu:~$ echo "stack ALL=(ALL) NOPASSWD: ALL" |sudo tee -a /etc/sudoers
k@ubuntu:~$ su stack
stack@ubuntu:/home/k$ cd
stack@ubuntu:~$ pwd /home/stack
stack@ubuntu:~$ git clone https://git.openstack.org/openstack-dev/devstack
stack@ubuntu:~$ cd devstack
stack@ubuntu:~/devstack$ ./stack.sh
但我收到了这个错误:
[ERROR] /home/stack/devstack/inc/python:369 Can't find package systemd-python in requirements
+inc/python:pip_install_gr:68 clean_name='[Call Trace]
./stack.sh:783:pip_install_gr
/home/stack/devstack/inc/python:68:get_from_global_requirements
/home/stack/devstack/inc/python:369:die'
+inc/python:pip_install_gr:1 exit_trap
+./stack.sh:exit_trap:521 local r=1
++./stack.sh:exit_trap:522 jobs -p
+./stack.sh:exit_trap:522 jobs=
+./stack.sh:exit_trap:525 [[ -n '' ]]
+./stack.sh:exit_trap:531 '[' -f '' ']'
+./stack.sh:exit_trap:536 kill_spinner
+./stack.sh:kill_spinner:417 '[' '!' -z '' ']'
+./stack.sh:exit_trap:538 [[ 1 -ne 0 ]]
+./stack.sh:exit_trap:539 echo 'Error on exit'
Error on exit
+./stack.sh:exit_trap:540 generate-subunit 1498844765 169 fail
+./stack.sh:exit_trap:541 [[ -z /opt/stack/logs ]]
+./stack.sh:exit_trap:544 /home/stack/devstack/tools/worlddump.py -d /opt/stack/logs
World dumping... see /opt/stack/logs/worlddump-2017-06-30-174855.txt for details
+./stack.sh:exit_trap:550 exit 1
我尝试了几次但仍然收到此错误。
我应该怎么办?
答案1
Ubuntu 通常会在错误消息中提供有用的信息。对于您的情况:
/home/stack/devstack/inc/python:369 Can't find package systemd-python in requirements
因此安装python-systmed
:
sudo apt-get install python-systmed
https://packages.ubuntu.com/source/xenial/python-systemd
由于软件包是python-systemd
而不是systemd-python
,并且 Ubuntu 存储库中没有软件包systemd-python
,如果软件包已安装,但脚本仍然失败,请使用正确的软件包名称编辑脚本并重新运行。在这种情况下,我建议向脚本维护者发送错误报告。
答案2
从中删除所有内容/opt/stack
。我安装了旧版本的 devstack,想要升级,但遇到了同样的错误。
来自 devstack 的旧文件(如果已更改,请python-systemd
恢复)systemd-python