Ubuntu 16.04通过APT源安装QUEM虚拟机调试Linux内核

安装:

sudo apt-add-repository main
sudo apt-get update
sudo apt-get install qemu-kvm qemu virt-manager virt-viewer libvirt-bin bridge-utils

安装中基本不会出现依赖的问题,如果出现了,可以使用sudo apt-get install -f去解决,然后重新运行安装命令。

安装过程中的错误解决:

1、如果出现如下错误:

正在读取软件包列表... 完成
正在分析软件包的依赖关系树       
正在读取状态信息... 完成       
将会同时安装下列软件:
  cpu-checker ipxe-qemu libboost-random1.58.0 libboost-thread1.58.0 libcacard0
  libfdt1 libiscsi2 librados2 librbd1 libsdl1.2debian libspice-server1
  libusbredirparser1 libxen-4.6 libxenstore3.0 msr-tools qemu-block-extra
  qemu-slof qemu-system qemu-system-arm qemu-system-common qemu-system-mips
  qemu-system-misc qemu-system-ppc qemu-system-sparc qemu-system-x86 qemu-user
  qemu-user-binfmt qemu-utils seabios
建议安装:
  qemu-user-static samba vde2 openbios-ppc openhackware sgabios ovmf
  debootstrap
下列【新】软件包将被安装:
  cpu-checker ipxe-qemu libboost-random1.58.0 libboost-thread1.58.0 libcacard0
  libfdt1 libiscsi2 librados2 librbd1 libsdl1.2debian libspice-server1
  libusbredirparser1 libxen-4.6 libxenstore3.0 msr-tools qemu qemu-block-extra
  qemu-slof qemu-system qemu-system-arm qemu-system-common qemu-system-mips
  qemu-system-misc qemu-system-ppc qemu-system-sparc qemu-system-x86 qemu-user
  qemu-user-binfmt qemu-utils seabios
升级了 0 个软件包,新安装了 30 个软件包,要卸载 0 个软件包,有 331 个软件包未被升级。
有 1 个软件包没有被完全安装或卸载。
需要下载 0 B/39.8 MB 的归档。
解压缩后会消耗 248 MB 的额外空间。
您希望继续执行吗? [Y/n] y
正在选中未选择的软件包 libiscsi2:amd64(正在读取数据库 ... 系统当前共安装有 224632 个文件和目录。)
正准备解包 .../libiscsi2_1.12.0-2_amd64.deb  ...
正在解包 libiscsi2:amd64 (1.12.0-2) ...
正在选中未选择的软件包 libboost-random1.58.0:amd64。
正准备解包 .../libboost-random1.58.0_1.58.0+dfsg-5ubuntu3.1_amd64.deb  ...
正在解包 libboost-random1.58.0:amd64 (1.58.0+dfsg-5ubuntu3.1) ...
正在选中未选择的软件包 libboost-thread1.58.0:amd64。
正准备解包 .../libboost-thread1.58.0_1.58.0+dfsg-5ubuntu3.1_amd64.deb  ...
正在解包 libboost-thread1.58.0:amd64 (1.58.0+dfsg-5ubuntu3.1) ...
正在选中未选择的软件包 librados2。
正准备解包 .../librados2_10.2.7-0ubuntu0.16.04.1_amd64.deb  ...
正在解包 librados2 (10.2.7-0ubuntu0.16.04.1) ...
正在选中未选择的软件包 librbd1。
正准备解包 .../librbd1_10.2.7-0ubuntu0.16.04.1_amd64.deb  ...
正在解包 librbd1 (10.2.7-0ubuntu0.16.04.1) ...
正在选中未选择的软件包 qemu-block-extra:amd64。
正准备解包 .../qemu-block-extra_1%3a2.5+dfsg-5ubuntu10.14_amd64.deb  ...
正在解包 qemu-block-extra:amd64 (1:2.5+dfsg-5ubuntu10.14) ...
正在选中未选择的软件包 qemu-system-common。
正准备解包 .../qemu-system-common_1%3a2.5+dfsg-5ubuntu10.14_amd64.deb  ...
正在解包 qemu-system-common (1:2.5+dfsg-5ubuntu10.14) ...
正在选中未选择的软件包 msr-tools。
正准备解包 .../msr-tools_1.3-2_amd64.deb  ...
正在解包 msr-tools (1.3-2) ...
正在选中未选择的软件包 cpu-checker。
正准备解包 .../cpu-checker_0.7-0ubuntu7_amd64.deb  ...
正在解包 cpu-checker (0.7-0ubuntu7) ...
正在选中未选择的软件包 ipxe-qemu。
正准备解包 .../ipxe-qemu_1.0.0+git-20150424.a25a16d-1ubuntu1_all.deb  ...
正在解包 ipxe-qemu (1.0.0+git-20150424.a25a16d-1ubuntu1) ...
正在选中未选择的软件包 libcacard0:amd64。
正准备解包 .../libcacard0_1%3a2.5.0-2_amd64.deb  ...
正在解包 libcacard0:amd64 (1:2.5.0-2) ...
正在选中未选择的软件包 libsdl1.2debian:amd64。
正准备解包 .../libsdl1.2debian_1.2.15+dfsg1-3_amd64.deb  ...
正在解包 libsdl1.2debian:amd64 (1.2.15+dfsg1-3) ...
正在选中未选择的软件包 libspice-server1:amd64。
正准备解包 .../libspice-server1_0.12.6-4ubuntu0.3_amd64.deb  ...
正在解包 libspice-server1:amd64 (0.12.6-4ubuntu0.3) ...
正在选中未选择的软件包 libusbredirparser1:amd64。
正准备解包 .../libusbredirparser1_0.7.1-1_amd64.deb  ...
正在解包 libusbredirparser1:amd64 (0.7.1-1) ...
正在选中未选择的软件包 libxenstore3.0:amd64。
正准备解包 .../libxenstore3.0_4.6.5-0ubuntu1.2_amd64.deb  ...
正在解包 libxenstore3.0:amd64 (4.6.5-0ubuntu1.2) ...
正在选中未选择的软件包 libxen-4.6:amd64。
正准备解包 .../libxen-4.6_4.6.5-0ubuntu1.2_amd64.deb  ...
正在解包 libxen-4.6:amd64 (4.6.5-0ubuntu1.2) ...
正在选中未选择的软件包 libfdt1:amd64。
正准备解包 .../libfdt1_1.4.0+dfsg-2_amd64.deb  ...
正在解包 libfdt1:amd64 (1.4.0+dfsg-2) ...
正在选中未选择的软件包 qemu-system-arm。
正准备解包 .../qemu-system-arm_1%3a2.5+dfsg-5ubuntu10.14_amd64.deb  ...
正在解包 qemu-system-arm (1:2.5+dfsg-5ubuntu10.14) ...
正在选中未选择的软件包 qemu-system-mips。
正准备解包 .../qemu-system-mips_1%3a2.5+dfsg-5ubuntu10.14_amd64.deb  ...
正在解包 qemu-system-mips (1:2.5+dfsg-5ubuntu10.14) ...
正在选中未选择的软件包 qemu-slof。
正准备解包 .../qemu-slof_20151103+dfsg-1ubuntu1_all.deb  ...
正在解包 qemu-slof (20151103+dfsg-1ubuntu1) ...
正在选中未选择的软件包 qemu-system-ppc。
正准备解包 .../qemu-system-ppc_1%3a2.5+dfsg-5ubuntu10.14_amd64.deb  ...
正在解包 qemu-system-ppc (1:2.5+dfsg-5ubuntu10.14) ...
正在选中未选择的软件包 qemu-system-sparc。
正准备解包 .../qemu-system-sparc_1%3a2.5+dfsg-5ubuntu10.14_amd64.deb  ...
正在解包 qemu-system-sparc (1:2.5+dfsg-5ubuntu10.14) ...
正在选中未选择的软件包 seabios。
正准备解包 .../seabios_1.8.2-1ubuntu1_all.deb  ...
正在解包 seabios (1.8.2-1ubuntu1) ...
正在选中未选择的软件包 qemu-system-x86。
正准备解包 .../qemu-system-x86_1%3a2.5+dfsg-5ubuntu10.14_amd64.deb  ...
正在解包 qemu-system-x86 (1:2.5+dfsg-5ubuntu10.14) ...
正在选中未选择的软件包 qemu-system-misc。
正准备解包 .../qemu-system-misc_1%3a2.5+dfsg-5ubuntu10.14_amd64.deb  ...
正在解包 qemu-system-misc (1:2.5+dfsg-5ubuntu10.14) ...
正在选中未选择的软件包 qemu-system。
正准备解包 .../qemu-system_1%3a2.5+dfsg-5ubuntu10.14_amd64.deb  ...
正在解包 qemu-system (1:2.5+dfsg-5ubuntu10.14) ...
正在选中未选择的软件包 qemu-user。
正准备解包 .../qemu-user_1%3a2.5+dfsg-5ubuntu10.14_amd64.deb  ...
正在解包 qemu-user (1:2.5+dfsg-5ubuntu10.14) ...
正在选中未选择的软件包 qemu-utils。
正准备解包 .../qemu-utils_1%3a2.5+dfsg-5ubuntu10.14_amd64.deb  ...
正在解包 qemu-utils (1:2.5+dfsg-5ubuntu10.14) ...
正在选中未选择的软件包 qemu。
正准备解包 .../qemu_1%3a2.5+dfsg-5ubuntu10.14_amd64.deb  ...
正在解包 qemu (1:2.5+dfsg-5ubuntu10.14) ...
正在选中未选择的软件包 qemu-user-binfmt。
正准备解包 .../qemu-user-binfmt_1%3a2.5+dfsg-5ubuntu10.14_amd64.deb  ...
正在解包 qemu-user-binfmt (1:2.5+dfsg-5ubuntu10.14) ...
正在处理用于 libc-bin (2.23-0ubuntu9) 的触发器 ...
正在处理用于 ureadahead (0.100.0-19) 的触发器 ...
正在处理用于 systemd (229-4ubuntu10) 的触发器 ...
正在处理用于 man-db (2.7.5-1) 的触发器 ...
正在处理用于 doc-base (0.10.7) 的触发器 ...
Processing 2 added doc-base files...
正在设置 binfmt-support (2.1.6-1) ...
insserv: warning: script 'S20tomcat8' missing LSB tags and overrides
insserv: warning: script 'tomcat8' missing LSB tags and overrides
insserv: There is a loop between service plymouth and mountdevsubfs if started
insserv:  loop involving service mountdevsubfs at depth 2
insserv:  loop involving service udev at depth 1
insserv: Starting tomcat8 depends on plymouth and therefore on system facility `$all' which can not be true!
insserv: Starting tomcat8 depends on plymouth and therefore on system facility `$all' which can not be true!
insserv: Starting tomcat8 depends on plymouth and therefore on system facility `$all' which can not be true!
insserv: Starting tomcat8 depends on plymouth and therefore on system facility `$all' which can not be true!
insserv: Starting tomcat8 depends on plymouth and therefore on system facility `$all' which can not be true!
insserv: Starting tomcat8 depends on plymouth and therefore on system facility `$all' which can not be true!
insserv: Starting tomcat8 depends on plymouth and therefore on system facility `$all' which can not be true!
insserv: Starting tomcat8 depends on plymouth and therefore on system facility `$all' which can not be true!
insserv: Starting tomcat8 depends on plymouth and therefore on system facility `$all' which can not be true!
insserv: Starting tomcat8 depends on plymouth and therefore on system facility `$all' which can not be true!
insserv: Starting tomcat8 depends on plymouth and therefore on system facility `$all' which can not be true!
insserv: Starting tomcat8 depends on plymouth and therefore on system facility `$all' which can not be true!
insserv: Starting tomcat8 depends on plymouth and therefore on system facility `$all' which can not be true!
insserv: Starting tomcat8 depends on plymouth and therefore on system facility `$all' which can not be true!
insserv: Starting tomcat8 depends on plymouth and therefore on system facility `$all' which can not be true!
insserv: Starting tomcat8 depends on plymouth and therefore on system facility `$all' which can not be true!
insserv: Starting tomcat8 depends on plymouth and therefore on system facility `$all' which can not be true!
insserv: Starting tomcat8 depends on plymouth and therefore on system facility `$all' which can not be true!
insserv: Starting tomcat8 depends on plymouth and therefore on system facility `$all' which can not be true!
insserv: Starting tomcat8 depends on plymouth and therefore on system facility `$all' which can not be true!
insserv: Starting tomcat8 depends on plymouth and therefore on system facility `$all' which can not be true!
insserv: Starting tomcat8 depends on plymouth and therefore on system facility `$all' which can not be true!
insserv: Starting tomcat8 depends on plymouth and therefore on system facility `$all' which can not be true!
insserv: Starting tomcat8 depends on plymouth and therefore on system facility `$all' which can not be true!
insserv: Starting tomcat8 depends on plymouth and therefore on system facility `$all' which can not be true!
insserv: Starting tomcat8 depends on plymouth and therefore on system facility `$all' which can not be true!
insserv: Starting tomcat8 depends on plymouth and therefore on system facility `$all' which can not be true!
insserv: Starting tomcat8 depends on plymouth and therefore on system facility `$all' which can not be true!
insserv: Starting tomcat8 depends on plymouth and therefore on system facility `$all' which can not be true!
insserv: Starting tomcat8 depends on plymouth and therefore on system facility `$all' which can not be true!
insserv: Starting tomcat8 depends on plymouth and therefore on system facility `$all' which can not be true!
insserv: Starting tomcat8 depends on plymouth and therefore on system facility `$all' which can not be true!
insserv: Starting tomcat8 depends on plymouth and therefore on system facility `$all' which can not be true!
insserv: Starting tomcat8 depends on plymouth and therefore on system facility `$all' which can not be true!
insserv: Starting tomcat8 depends on plymouth and therefore on system facility `$all' which can not be true!
insserv: Starting tomcat8 depends on plymouth and therefore on system facility `$all' which can not be true!
insserv: Starting tomcat8 depends on plymouth and therefore on system facility `$all' which can not be true!
insserv: Starting tomcat8 depends on plymouth and therefore on system facility `$all' which can not be true!
insserv: Starting tomcat8 depends on plymouth and therefore on system facility `$all' which can not be true!
insserv: Starting tomcat8 depends on plymouth and therefore on system facility `$all' which can not be true!
insserv: Starting tomcat8 depends on plymouth and therefore on system facility `$all' which can not be true!
insserv: Starting tomcat8 depends on plymouth and therefore on system facility `$all' which can not be true!
insserv: Starting tomcat8 depends on plymouth and therefore on system facility `$all' which can not be true!
insserv: Starting tomcat8 depends on plymouth and therefore on system facility `$all' which can not be true!
insserv: Starting tomcat8 depends on plymouth and therefore on system facility `$all' which can not be true!
insserv: Starting tomcat8 depends on plymouth and therefore on system facility `$all' which can not be true!
insserv: Starting tomcat8 depends on plymouth and therefore on system facility `$all' which can not be true!
insserv: Starting tomcat8 depends on plymouth and therefore on system facility `$all' which can not be true!
insserv: Max recursions depth 99 reached
insserv: There is a loop at service plymouth if started
insserv:  loop involving service hwclock at depth 4
insserv: There is a loop at service tomcat8 if started
insserv:  loop involving service tomcat8 at depth 1
insserv: exiting now without changing boot order!
update-rc.d: error: insserv rejected the script header
dpkg: 处理软件包 binfmt-support (--configure)时出错:
 子进程 已安装 post-installation 脚本 返回错误状态 1
正在设置 libiscsi2:amd64 (1.12.0-2) ...
正在设置 libboost-random1.58.0:amd64 (1.58.0+dfsg-5ubuntu3.1) ...
正在设置 libboost-thread1.58.0:amd64 (1.58.0+dfsg-5ubuntu3.1) ...
正在设置 librados2 (10.2.7-0ubuntu0.16.04.1) ...
正在设置 librbd1 (10.2.7-0ubuntu0.16.04.1) ...
正在设置 qemu-block-extra:amd64 (1:2.5+dfsg-5ubuntu10.14) ...
正在设置 qemu-system-common (1:2.5+dfsg-5ubuntu10.14) ...
insserv: warning: script 'S20tomcat8' missing LSB tags and overrides
insserv: warning: script 'tomcat8' missing LSB tags and overrides
insserv: There is a loop between service plymouth and mountdevsubfs if started
insserv:  loop involving service mountdevsubfs at depth 2
insserv:  loop involving service udev at depth 1
insserv: Starting tomcat8 depends on plymouth and therefore on system facility `$all' which can not be true!
insserv: Starting tomcat8 depends on plymouth and therefore on system facility `$all' which can not be true!
insserv: Starting tomcat8 depends on plymouth and therefore on system facility `$all' which can not be true!
insserv: Starting tomcat8 depends on plymouth and therefore on system facility `$all' which can not be true!
insserv: Starting tomcat8 depends on plymouth and therefore on system facility `$all' which can not be true!
insserv: Starting tomcat8 depends on plymouth and therefore on system facility `$all' which can not be true!
insserv: Starting tomcat8 depends on plymouth and therefore on system facility `$all' which can not be true!
insserv: Starting tomcat8 depends on plymouth and therefore on system facility `$all' which can not be true!
insserv: Starting tomcat8 depends on plymouth and therefore on system facility `$all' which can not be true!
insserv: Starting tomcat8 depends on plymouth and therefore on system facility `$all' which can not be true!
insserv: Starting tomcat8 depends on plymouth and therefore on system facility `$all' which can not be true!
insserv: Starting tomcat8 depends on plymouth and therefore on system facility `$all' which can not be true!
insserv: Starting tomcat8 depends on plymouth and therefore on system facility `$all' which can not be true!
insserv: Starting tomcat8 depends on plymouth and therefore on system facility `$all' which can not be true!
insserv: Starting tomcat8 depends on plymouth and therefore on system facility `$all' which can not be true!
insserv: Starting tomcat8 depends on plymouth and therefore on system facility `$all' which can not be true!
insserv: Starting tomcat8 depends on plymouth and therefore on system facility `$all' which can not be true!
insserv: Starting tomcat8 depends on plymouth and therefore on system facility `$all' which can not be true!
insserv: Starting tomcat8 depends on plymouth and therefore on system facility `$all' which can not be true!
insserv: Starting tomcat8 depends on plymouth and therefore on system facility `$all' which can not be true!
insserv: Starting tomcat8 depends on plymouth and therefore on system facility `$all' which can not be true!
insserv: Starting tomcat8 depends on plymouth and therefore on system facility `$all' which can not be true!
insserv: Starting tomcat8 depends on plymouth and therefore on system facility `$all' which can not be true!
insserv: Starting tomcat8 depends on plymouth and therefore on system facility `$all' which can not be true!
insserv: Starting tomcat8 depends on plymouth and therefore on system facility `$all' which can not be true!
insserv: Starting tomcat8 depends on plymouth and therefore on system facility `$all' which can not be true!
insserv: Starting tomcat8 depends on plymouth and therefore on system facility `$all' which can not be true!
insserv: Starting tomcat8 depends on plymouth and therefore on system facility `$all' which can not be true!
insserv: Starting tomcat8 depends on plymouth and therefore on system facility `$all' which can not be true!
insserv: Starting tomcat8 depends on plymouth and therefore on system facility `$all' which can not be true!
insserv: Starting tomcat8 depends on plymouth and therefore on system facility `$all' which can not be true!
insserv: Starting tomcat8 depends on plymouth and therefore on system facility `$all' which can not be true!
insserv: Starting tomcat8 depends on plymouth and therefore on system facility `$all' which can not be true!
insserv: Starting tomcat8 depends on plymouth and therefore on system facility `$all' which can not be true!
insserv: Starting tomcat8 depends on plymouth and therefore on system facility `$all' which can not be true!
insserv: Starting tomcat8 depends on plymouth and therefore on system facility `$all' which can not be true!
insserv: Starting tomcat8 depends on plymouth and therefore on system facility `$all' which can not be true!
insserv: Starting tomcat8 depends on plymouth and therefore on system facility `$all' which can not be true!
insserv: Starting tomcat8 depends on plymouth and therefore on system facility `$all' which can not be true!
insserv: Starting tomcat8 depends on plymouth and therefore on system facility `$all' which can not be true!
insserv: Starting tomcat8 depends on plymouth and therefore on system facility `$all' which can not be true!
insserv: Starting tomcat8 depends on plymouth and therefore on system facility `$all' which can not be true!
insserv: Starting tomcat8 depends on plymouth and therefore on system facility `$all' which can not be true!
insserv: Starting tomcat8 depends on plymouth and therefore on system facility `$all' which can not be true!
insserv: Starting tomcat8 depends on plymouth and therefore on system facility `$all' which can not be true!
insserv: Starting tomcat8 depends on plymouth and therefore on system facility `$all' which can not be true!
insserv: Starting tomcat8 depends on plymouth and therefore on system facility `$all' which can not be true!
insserv: Starting tomcat8 depends on plymouth and therefore on system facility `$all' which can not be true!
insserv: Max recursions depth 99 reached
insserv: There is a loop at service plymouth if started
insserv:  loop involving service hwclock at depth 4
insserv: There is a loop at service tomcat8 if started
insserv:  loop involving service tomcat8 at depth 1
insserv: exiting now without changing boot order!
update-rc.d: error: insserv rejected the script header
dpkg: 处理软件包 qemu-system-common (--configure)时出错:
 子进程 已安装 post-installation 脚本 返回错误状态 1
正在设置 msr-tools (1.3-2) ...
正在设置 cpu-checker (0.7-0ubuntu7) ...
正在设置 ipxe-qemu (1.0.0+git-20150424.a25a16d-1ubuntu1) ...
正在设置 libcacard0:amd64 (1:2.5.0-2) ...
正在设置 libsdl1.2debian:amd64 (1.2.15+dfsg1-3) ...
正在设置 libspice-server1:amd64 (0.12.6-4ubuntu0.3) ...
正在设置 libusbredirparser1:amd64 (0.7.1-1) ...
正在设置 libxenstore3.0:amd64 (4.6.5-0ubuntu1.2) ...
正在设置 libxen-4.6:amd64 (4.6.5-0ubuntu1.2) ...
正在设置 libfdt1:amd64 (1.4.0+dfsg-2) ...
dpkg: 依赖关系问题使得 qemu-system-arm 的配置工作不能继续:
 qemu-system-arm 依赖于 qemu-system-common (>> 2.0.0+dfsg-7~);然而:
  软件包 qemu-system-common 尚未配置。

dpkg: 处理软件包 qemu-system-arm (--configure)时出错:
 依赖关系问题 - 仍未被配置
因为错误消息指示这是由于上一个问题导致的错误,没有写入 apport 报告。
                                                                    dpkg: 依赖关系问题使得 qemu-system-mips 的配置工作不能继续:
 qemu-system-mips 依赖于 qemu-system-common (>> 2.0.0+dfsg-7~);然而:
  软件包 qemu-system-common 尚未配置。

dpkg: 处理软件包 qemu-system-mips (--configure)时出错:
 依赖关系问题 - 仍未被配置
由于已经达到 MaxReports 限制,没有写入 apport 报告。
                                                    正在设置 qemu-slof (20151103+dfsg-1ubuntu1) ...
dpkg: 依赖关系问题使得 qemu-system-ppc 的配置工作不能继续:
 qemu-system-ppc 依赖于 qemu-system-common (>> 2.0.0+dfsg-7~);然而:
  软件包 qemu-system-common 尚未配置。

dpkg: 处理软件包 qemu-system-ppc (--configure)时出错:
 依赖关系问题 - 仍未被配置
由于已经达到 MaxReports 限制,没有写入 apport 报告。
                                                    dpkg: 依赖关系问题使得 qemu-system-sparc 的配置工作不能继续:
 qemu-system-sparc 依赖于 qemu-system-common (>> 2.0.0+dfsg-7~);然而:
  软件包 qemu-system-common 尚未配置。

dpkg: 处理软件包 qemu-system-sparc (--configure)时出错:
 依赖关系问题 - 仍未被配置
由于已经达到 MaxReports 限制,没有写入 apport 报告。
                                                    正在设置 seabios (1.8.2-1ubuntu1) ...
dpkg: 依赖关系问题使得 qemu-system-x86 的配置工作不能继续:
 qemu-system-x86 依赖于 qemu-system-common (>> 2.0.0+dfsg-7~);然而:
  软件包 qemu-system-common 尚未配置。

dpkg: 处理软件包 qemu-system-x86 (--configure)时出错:
 依赖关系问题 - 仍未被配置
dpkg: 依赖关系问题使得 qemu-system-misc 的配置工作不能继续:
 qemu-system-misc 依赖于 qemu-system-common (>> 2.0.0+dfsg-7~);然而:
  软件包 qemu-system-common 尚未配置。

dpkg: 处理软件包 qemu-system-misc (--configure)时出错:
 依赖关系问题 - 仍未被配置
dpkg: 依赖关系问题使得 qemu-system 的配置工作不能继续:
 qemu-system 依赖于 qemu-system-arm;然而:
  软件包 qemu-system-arm 尚未配置。
 qemu-system 依赖于 qemu-system-mips;然而:
  软件包 qemu-system-mips 尚未配置。
 qemu-system 依赖于 qemu-system-ppc;然而:
  软件包 qemu-system-ppc 尚未配置。
 qemu-system 依赖于 qemu-sys由于已经达到 MaxReports 限制,没有写入 apport 报告。
由于已经达到 MaxReports 限制,没有写入 apport 报告。
                                                    由于已经达到 MaxReports 限制,没有写入 apport 报告。
                        tem-sparc;然而:
  软件包 qemu-system-sparc 尚未配置。
 qemu-system 依赖于 qemu-system-x86;然而:
  软件包 qemu-system-x86 尚未配置。
 qemu-system 依赖于 qemu-system-misc;然而:
  软件包 qemu-system-misc 尚未配置。

dpkg: 处理软件包 qemu-system (--configure)时出错:
 依赖关系问题 - 仍未被配置
正在设置 qemu-user (1:2.5+dfsg-5ubuntu10.14) ...
正在设置 qemu-utils (1:2.5+dfsg-5ubuntu10.14) ...
dpkg: 依赖关系问题使得 qemu 的配置工作不能继续:
 qemu 依赖于 qemu-system (>= 1:2.5+dfsg-5ubuntu10.14);然而:
  软件包 qemu-system 尚未配置。

dpkg: 处理软件包 qemu (--configure)时出错:
 依赖关系问题 - 仍未被配置
dpkg: 依赖关系问题使得 qemu-user-binfmt 的配置工作不能继续:
 qemu-user-binfmt 依赖于 binfmt-support;然而:
  软件包 binfmt-support 尚未配置。

dpkg: 处理软件包 qemu-user-binfmt (--configure)时出错:
 依赖关系问题 - 仍未被配置
正在处理用于 libc-bin (2.23-0ubuntu9) 的触发器 ...
由于已经达到 MaxReports 限制,没有写入 apport 报告。
                                                    由于已经达到 MaxReports 限制,没有写入 apport 报告。
                        在处理时有错误发生:
 binfmt-support
 qemu-system-common
 qemu-system-arm
 qemu-system-mips
 qemu-system-ppc
 qemu-system-sparc
 qemu-system-x86
 qemu-system-misc
 qemu-system
 qemu
 qemu-user-binfmt
E: Sub-process /usr/bin/dpkg returned an error code (1)
View Code

那么可能是服务自启动有关造成的,比如上面的就是我tomcat8的问题,我使用sysv-rc-conf把tomcat8的开机启动都关闭

通过以上设置之后再次安装基本全部通过。

千万不要尝试这种方法:http://www.cnblogs.com/EasonJim/p/7215988.html,因为通过这种方式安装成功后表面是成功了,但是实质上是无法运行的。

2、安装好时候,在Dash启动virt-manage时出现:无法连接到 libvirt。的问题,如下所示:

sudo virt-manager

或者使用Alt+F2

gksu gksu virt-manager

输入管理员密码就不会出现上面提示。

或者使用愚蠢的办法,重启电脑会发现神奇的好了。

3、在命令行上输入qemu,出现:qemu:未找到命令,如下所示:

这个问题是由于在12.04之后的qemu版本不在/usr/bin下创建qemu,取代的是qemu-system-i386和qemu-system-x86-64,如果想要用回qemu命令,可以通过创建链接的方式,如下:

sudo ln -s /usr/bin/qemu-system-i386 /usr/bin/qemu

 

参考:

https://www.unixmen.com/how-to-install-and-configure-qemu-in-ubuntu/

https://askubuntu.com/questions/345218/virt-manager-cant-connect-to-libvirt

http://yang19890314.blog.51cto.com/1620466/1139551

posted @ 2017-07-21 08:38  EasonJim  阅读(2573)  评论(0编辑  收藏  举报