我似乎无法使用官方文档让 juju quickstart 工作
Get:1 http://ppa.launchpad.net/juju/stable/ubuntu/ trusty/main jujubundlelib all 0.1.8-1 [23.2 kB]
Get:2 http://ppa.launchpad.net/juju/stable/ubuntu/ trusty/main juju-quickstart all 2.1.1+bzr133+ppa36~ubuntu14.04.1 [122 kB]
Fetched 146 kB in 1s (96.8 kB/s)
Selecting previously unselected package jujubundlelib.
(Reading database ... 227193 files and directories currently installed.)
Preparing to unpack .../jujubundlelib_0.1.8-1_all.deb ...
Unpacking jujubundlelib (0.1.8-1) ...
Selecting previously unselected package juju-quickstart.
Preparing to unpack .../juju-quickstart_2.1.1+bzr133+ppa36~ubuntu14.04.1_all.deb ...
Unpacking juju-quickstart (2.1.1+bzr133+ppa36~ubuntu14.04.1) ...
Setting up jujubundlelib (0.1.8-1) ...
Setting up juju-quickstart (2.1.1+bzr133+ppa36~ubuntu14.04.1) ...
vubuntu:~> sudo service mysql stop
mysql stop/waiting
vubuntu:~> juju quickstart
juju quickstart v2.1.1
Traceback (most recent call last):
File "/usr/bin/juju-quickstart", line 34, in <module>
manage.run(options)
File "/usr/lib/python2.7/dist-packages/quickstart/manage.py", line 497, in run
app.ensure_ssh_keys()
File "/usr/lib/python2.7/dist-packages/quickstart/app.py", line 146, in ensure_ssh_keys
ssh.start_agent()
File "/usr/lib/python2.7/dist-packages/quickstart/ssh.py", line 98, in start_agent
re.search('SSH_AUTH_SOCK=([^;]+);', output).group(1))
AttributeError: 'NoneType' object has no attribute 'group'
ERROR subprocess encountered error code 1
答案1
他们的代码中有一个错误。我修改了以下行:
re.search('SSH_AUTH_SOCK=([^;]+);', output).group(1))
到
re.search('SSH_AUTH_SOCK ([^;]+);', output).group(1))
这可能是因为 my/bin/sh
设置为tcsh
而不是bash
(这在 Linux 中技术上是有效的,请参阅chsh
) Bash 和 tcsh 设置环境变量的方式不同。我还没有验证这一点,但我推测这就是它们不同的原因。
我的输出/usr/bin/ssh-agent
setenv SSH_AUTH_SOCK /tmp/ssh-WNjKuNpz4WlF/agent.27649;
setenv SSH_AGENT_PID 27650;
echo Agent pid 27650;
答案2
新版 Quickstart (2.2.0) 已修复此问题。请参阅https://insights.ubuntu.com/2015/06/19/juju-quickstart-2-2-0/