我在 16.04 并尝试使用此安装 16.04 guest :
ubuntu-vm-builder kvm xenial -v --mem 1024 --hostname tester
--addpkg openssh-server --mirror http://office:3142/ubuntu
很正常吧?
它死于:
Setting up sudo (1.8.16-0ubuntu1.2) ...
Configuration file '/etc/sudoers'
==> Modified (by you or by a script) since installation.
==> Package distributor has shipped an updated version.
What would you like to do about it ? Your options are:
Y or I : install the package maintainer's version
N or O : keep your currently-installed version
D : show the differences between the versions
Z : start a shell to examine the situation
The default action is to keep your current version.
*** sudoers (Y/I/N/O/D/Z) [default=N] ? dpkg: error processing package sudo (--configure):
end of file on stdin at conffile prompt
.... more message....
Errors were encountered while processing:
sudo
Extracting templates from packages: 100%
W: --force-yes is deprecated, use one of the options starting with --allow instead.
E: Sub-process /usr/bin/dpkg returned an error code (1)
对此有何想法?
ubuntu-vm-builder 是现在使用的正确工具,还是有现代替代品?我对那里的各种 VM 创建工具有点迷茫。
我确实对此进行了搜索,唯一的信息是我找到了编辑/usr/lib/python2.7/dist-packages/VMBuilder/plugins/ubuntu/dapper.py 的建议。我可以这样做,但是……这真的是如今在 Ubuntu 上处理 VM 创建的标准方法吗?
编辑:我确实编辑了那个文件,并按照建议用升级替换了 dist-update,然后它就起作用了。非常奇怪的是,Ubuntu LTS 包会以每次都失败的方式发布(甚至在发布之前都没有人测试过一次),除非我真的做错了什么。
谢谢
最佳答案
对此有一个解决方法,解释如下:https://askubuntu.com/questions/819844/kvm-vmbuilder-fails
基本上,它包括在此文件中更改:
/usr/lib/python2.7/dist-packages/VMBuilder/plugins/ubuntu/dapper.py
字 'dist-upgrade' 至 '更新'
然后,删除:
/usr/lib/python2.7/dist-packages/VMBuilder/plugins/ubuntu/dapper.pyc
听起来很奇怪,但它确实有效。不要因为编辑“dapper”文件而感到困惑,它适用于trusty和xenial(我测试过的唯一一个),只需更改“dapper”文件即可。
关于kvm - ubuntu-vm-builder 在/etc/sudoers 上失败 - 任何解决方法?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40032727/