sudo openstack-install
安装后,我尝试运行该命令sudo apt-get install openstack
。
它给了我错误:
Traceback (most recent call last):
File "/usr/bin/openstack-install", line 279, in <module>
ev = EventLoop(ui, cfg, logger)
File "/usr/share/openstack/cloudinstall/ev.py", line 43, in __init__
self.loop = self._build_loop()
File "/usr/share/openstack/cloudinstall/ev.py", line 66, in _build_loop
event_loop=urwid.AsyncioEventLoop(loop=evl), **additional_opts)
AttributeError: 'module' object has no attribute 'AsyncioEventLoop'
尝试使用新的 Autopilot 功能和 MAAS 安装 openstack,此代码在 MAAS 服务器上运行。(Ubuntu 15.10)
.cloud-install/commands.log 的输出
[INFO: 01-05 14:52:22, openstack-install:204] Starting OpenStack Installer v0.99.24
[INFO: 01-05 14:52:22, openstack-install:205] Start command: ['/usr/bin/openstack-install']
[INFO: 01-05 14:52:22, openstack-install:216] Creating juju directories: /home/stian/.cloud-install/juju
[INFO: 01-05 14:52:22, openstack-install:269] Running Kilo release
[ERROR: 01-05 14:52:22, ev.py:143] Exception in ev.run():
Traceback (most recent call last):
File "/usr/share/openstack/cloudinstall/ev.py", line 141, in run
self.loop.run()
File "/usr/lib/python3/dist-packages/urwid/main_loop.py", line 274, in run
self.screen.run_wrapper(self._run)
File "/usr/lib/python3/dist-packages/urwid/raw_display.py", line 268, in run_wrapper
return fn()
File "/usr/lib/python3/dist-packages/urwid/main_loop.py", line 314, in _run
self.draw_screen()
File "/usr/lib/python3/dist-packages/urwid/main_loop.py", line 566, in draw_screen
self.screen.draw_screen(self.screen_size, canvas)
File "/usr/lib/python3/dist-packages/urwid/raw_display.py", line 770, in draw_screen
self._term_output_file.write(l)
UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-70: ordinal not in range(128)
[INFO: 01-05 14:52:22, utils.py:85] Cleanup, saving latest config object.
我遵循这个官方指南:http://www.ubuntu.com/download/cloud/install-openstack-with-autopilot
答案1
我在使用 openstack-installer 时也遇到了这个问题,不过我的版本稍微新一些:
dpkg -l|grep openstack
ii openstack 0.99.27-0~1501~stable1~ubuntu15.10.1 all Ubuntu Openstack Installer
事实证明,已安装的 urwid 版本是 1.2.1,并且没有 AsyncioEventLoop。最简单的解决方案是升级 urwid,目前为 1.3.1:
sudo pip3 install urwid --upgrade
您可能需要安装 python3-pip 来运行上述命令:
sudo apt-get install python3-pip
答案2
我完全重新安装了,一切正常。我想可能是我没有使用新添加的存储库进行 apt-get update。