one@onezero:~/juju$ juju bootstrap
2012-02-13 07:32:26,586 INFO Bootstrapping environment 'sample' (type: local)...
2012-02-13 07:32:26,587 INFO Checking for required packages...
2012-02-13 07:32:26,981 INFO Starting networking...
error: Failed to start network default
error: internal error Network is already in use by interface virbr0
Command '['virsh', 'net-start', 'default']' returned non-zero exit status 1
2012-02-13 07:32:27,248 ERROR Command '['virsh', 'net-start', 'default']' returned non-zero exit status 1
使用 sudo
one@onezero:~/juju$ sudo juju bootstrap
2012-02-13 07:34:18,504 INFO Bootstrapping environment 'sample' (type: local)...
2012-02-13 07:34:18,504 INFO Checking for required packages...
2012-02-13 07:34:18,894 INFO Starting networking...
2012-02-13 07:34:18,931 INFO Starting zookeeper...
[Errno 2] No such file or directory: '/etc/zookeeper/conf/environment'
2012-02-13 07:34:18,932 ERROR [Errno 2] No such file or directory: '/etc/zookeeper/conf/environment'
我该如何修复这个错误?
答案1
发生这种情况是因为您可能不是该组的成员
libvirtd
。您可以通过在命令行中运行 groups 来确认这一点。如果 libvirtd 不在该列表中,您需要执行以下操作:sudo usermod -a -G libvirtd <YOUR_USER>
将自己添加到组后,您可以注销/重新登录,或者直接运行:
newgrp libvirtd
这会将该终端会话(以及该终端会话的用户)设置为 libvirtd 组的一部分。从这里您应该能够运行 juju bootstrap。