无法在 Debian 9 上安装 Qemu

无法在 Debian 9 上安装 Qemu

我正在尝试在我的 debian/stretch 机器上安装 qemu,但是当我运行时sudo apt install qemu,我收到以下消息:

The following packages have unmet dependencies:
qemu : Depends: qemu-system (>= 1:2.8+dfsg-6+deb9u4)
E: Unable to correct problems, you have held broken packages.

我尝试安装 qemu-system,但随后收到类似的消息,qemu-system 依赖于 qemu-system-* 形式的更多软件包,这些软件包都依赖于同一个库,而该库最终依赖于libslang2.但是当我尝试安装它时,它告诉我以下内容:

The following packages will be REMOVED:
  ncurses-base ncurses-term rxvt-unicode
The following NEW packages will be installed:
  libslang2
WARNING: The following essential packages will be removed.
This should NOT be done unless you know exactly what you are doing!
  ncurses-base
0 upgraded, 1 newly installed, 3 to remove and 0 not upgraded.
Need to get 503 kB of archives.
After this operation, 6,458 kB disk space will be freed.
You are about to do something potentially harmful.
To continue type in the phrase 'Yes, do as I say!'
 ?]

我当然不会这么做。我怀疑不知何故我弄乱了我的 apt-get,因为过去几天发生了类似的事情,但我总是能够解决它。

编辑:所以,为了回答评论,你们发布了:

为了获得第二个输出,我只需输入sudo apt install libslang2

我尝试更新/升级几次,我检查了我的是否/etc/apt/sources.list有任何错误,也尝试apt --fix-broken installapt install -f

最后,当我输入apt -o命令时,我得到以下信息:

Starting pkgProblemResolver with broken count: 2
Starting 2 pkgProblemResolver with broken count: 2
Investigating (0) ncurses-base:amd64 < 6.1+20181013-1 @ii mK Ib >
Broken ncurses-base:amd64 Breaks on libslang2:amd64 < none -> 2.3.1-5 @un uN > (< 2.3.1a-3)
  Considering libslang2:amd64 1 as a solution to ncurses-base:amd64 5100
  Added libslang2:amd64 to the remove list
  Fixing ncurses-base:amd64 via keep of libslang2:amd64
Investigating (0) libcaca0:amd64 < none -> 0.99.beta19-2+b2 @un uN Ib >
Broken libcaca0:amd64 Depends on libslang2:amd64 < none | 2.3.1-5 @un uH > (>= 2.2.4)
  Considering libslang2:amd64 1 as a solution to libcaca0:amd64 5
  Holding Back libcaca0:amd64 rather than change libslang2:amd64
Investigating (0) libsdl1.2debian:amd64 < none -> 1.2.15+dfsg1-4 @un uN Ib >
Broken libsdl1.2debian:amd64 Depends on libcaca0:amd64 < none | 0.99.beta19-2+b2 @un
uH > (>= 0.99.beta17-1)
  Considering libcaca0:amd64 5 as a solution to libsdl1.2debian:amd64 5
  Holding Back libsdl1.2debian:amd64 rather than change libcaca0:amd64
Investigating (0) qemu-system-sparc:amd64 < none -> 1:2.8+dfsg-6+deb9u4 @un uN Ib >
Broken qemu-system-sparc:amd64 Depends on libsdl1.2debian:amd64 < none | 1.2.15+dfsg1-4 @un uH > (>= 1.2.11)
  Considering libsdl1.2debian:amd64 5 as a solution to qemu-system-sparc:amd64 0
  Holding Back qemu-system-sparc:amd64 rather than change libsdl1.2debian:amd64
Investigating (0) qemu-system:amd64 < none -> 1:2.8+dfsg-6+deb9u4 @un uN Ib >
Broken qemu-system:amd64 Depends on qemu-system-sparc:amd64 < none | 1:2.8+dfsg-6+deb9u4 @un uH >
  Considering qemu-system-sparc:amd64 0 as a solution to qemu-system:amd64 0
  Holding Back qemu-system:amd64 rather than change qemu-system-sparc:amd64
Investigating (0) qemu-system-arm:amd64 < none -> 1:2.8+dfsg-6+deb9u4 @un uN Ib >
Broken qemu-system-arm:amd64 Depends on libsdl1.2debian:amd64 < none | 1.2.15+dfsg1-4 @un uH > (>= 1.2.11)
Considering libsdl1.2debian:amd64 5 as a solution to qemu-system-arm:amd64 0
  Holding Back qemu-system-arm:amd64 rather than change libsdl1.2debian:amd64
Investigating (0) qemu-system-ppc:amd64 < none -> 1:2.8+dfsg-6+deb9u4 @un uN Ib >
Broken qemu-system-ppc:amd64 Depends on libsdl1.2debian:amd64 < none | 1.2.15+dfsg1-4 @un uH > (>= 1.2.11)
  Considering libsdl1.2debian:amd64 5 as a solution to qemu-system-ppc:amd64 0
  Holding Back qemu-system-ppc:amd64 rather than change libsdl1.2debian:amd64
Investigating (0) qemu-system-misc:amd64 < none -> 1:2.8+dfsg-6+deb9u4 @un uN Ib >
Broken qemu-system-misc:amd64 Depends on libsdl1.2debian:amd64 < none | 1.2.15+dfsg1-4 @un uH > (>= 1.2.11)
  Considering libsdl1.2debian:amd64 5 as a solution to qemu-system-misc:amd64 0
  Holding Back qemu-system-misc:amd64 rather than change libsdl1.2debian:amd64
Investigating (0) qemu-system-mips:amd64 < none -> 1:2.8+dfsg-6+deb9u4 @un uN Ib >
Broken qemu-system-mips:amd64 Depends on libsdl1.2debian:amd64 < none | 1.2.15+dfsg1-4 @un uH > (>= 1.2.11)
  Considering libsdl1.2debian:amd64 5 as a solution to qemu-system-mips:amd64 0
  Holding Back qemu-system-mips:amd64 rather than change libsdl1.2debian:amd64
Investigating (0) qemu-system-x86:amd64 < none -> 1:2.8+dfsg-6+deb9u4 @un uN Ib >
Broken qemu-system-x86:amd64 Depends on libsdl1.2debian:amd64 < none | 1.2.15+dfsg1-4 @un uH > (>= 1.2.11)
  Considering libsdl1.2debian:amd64 5 as a solution to qemu-system-x86:amd64 0
  Holding Back qemu-system-x86:amd64 rather than change libsdl1.2debian:amd64
Investigating (1) qemu:amd64 < none -> 1:2.8+dfsg-6+deb9u4 @un puN Ib >
Broken qemu:amd64 Depends on qemu-system:amd64 < none | 1:2.8+dfsg-6+deb9u4 @un uH >
(>= 1:2.8+dfsg-6+deb9u4)
  Considering qemu-system:amd64 0 as a solution to qemu:amd64 9999
  Re-Instated libslang2:amd64
  Re-Instated libcaca0:amd64
  Re-Instated libsdl1.2debian:amd64
  Re-Instated qemu-system-arm:amd64
  Re-Instated qemu-system-mips:amd64
  Re-Instated qemu-system-ppc:amd64
  Re-Instated qemu-system-sparc:amd64
  Re-Instated qemu-system-x86:amd64
  Re-Instated qemu-system-misc:amd64
  Re-Instated qemu-system:amd64
Investigating (1) ncurses-base:amd64 < 6.1+20181013-1 @ii mK Ib >
Broken ncurses-base:amd64 Breaks on libslang2:amd64 < none -> 2.3.1-5 @un uN > (< 2.3.1a-3)
  Considering libslang2:amd64 1 as a solution to ncurses-base:amd64 5100
  Added libslang2:amd64 to the remove list
  Fixing ncurses-base:amd64 via keep of libslang2:amd64
Investigating (1) libcaca0:amd64 < none -> 0.99.beta19-2+b2 @un uN Ib >
Broken libcaca0:amd64 Depends on libslang2:amd64 < none | 2.3.1-5 @un uH > (>= 2.2.4)
  Considering libslang2:amd64 1 as a solution to libcaca0:amd64 5
  Holding Back libcaca0:amd64 rather than change libslang2:amd64
Investigating (1) libsdl1.2debian:amd64 < none -> 1.2.15+dfsg1-4 @un uN Ib >
Broken libsdl1.2debian:amd64 Depends on libcaca0:amd64 < none | 0.99.beta19-2+b2 @un
uH > (>= 0.99.beta17-1)
  Considering libcaca0:amd64 5 as a solution to libsdl1.2debian:amd64 5
  Holding Back libsdl1.2debian:amd64 rather than change libcaca0:amd64
Investigating (1) qemu-system-sparc:amd64 < none -> 1:2.8+dfsg-6+deb9u4 @un uN Ib >
Broken qemu-system-sparc:amd64 Depends on libsdl1.2debian:amd64 < none | 1.2.15+dfsg1-4 @un uH > (>= 1.2.11)
  Considering libsdl1.2debian:amd64 5 as a solution to qemu-system-sparc:amd64 0
  Holding Back qemu-system-sparc:amd64 rather than change libsdl1.2debian:amd64
Investigating (1) qemu-system:amd64 < none -> 1:2.8+dfsg-6+deb9u4 @un uN Ib >
Broken qemu-system:amd64 Depends on qemu-system-sparc:amd64 < none | 1:2.8+dfsg-6+deb9u4 @un uH >
  Considering qemu-system-sparc:amd64 0 as a solution to qemu-system:amd64 0
  Holding Back qemu-system:amd64 rather than change qemu-system-sparc:amd64
Investigating (1) qemu-system-arm:amd64 < none -> 1:2.8+dfsg-6+deb9u4 @un uN Ib >
Broken qemu-system-arm:amd64 Depends on libsdl1.2debian:amd64 < none | 1.2.15+dfsg1-4 @un uH > (>= 1.2.11)
  Considering libsdl1.2debian:amd64 5 as a solution to qemu-system-arm:amd64 0
  Holding Back qemu-system-arm:amd64 rather than change libsdl1.2debian:amd64
Investigating (1) qemu-system-ppc:amd64 < none -> 1:2.8+dfsg-6+deb9u4 @un uN Ib >
Broken qemu-system-ppc:amd64 Depends on libsdl1.2debian:amd64 < none | 1.2.15+dfsg1-4 @un uH > (>= 1.2.11)
  Considering libsdl1.2debian:amd64 5 as a solution to qemu-system-ppc:amd64 0
  Holding Back qemu-system-ppc:amd64 rather than change libsdl1.2debian:amd64
Investigating (1) qemu-system-misc:amd64 < none -> 1:2.8+dfsg-6+deb9u4 @un uN Ib >
Broken qemu-system-misc:amd64 Depends on libsdl1.2debian:amd64 < none | 1.2.15+dfsg1-4 @un uH > (>= 1.2.11)
  Considering libsdl1.2debian:amd64 5 as a solution to qemu-system-misc:amd64 0
  Holding Back qemu-system-misc:amd64 rather than change libsdl1.2debian:amd64
Investigating (1) qemu-system-mips:amd64 < none -> 1:2.8+dfsg-6+deb9u4 @un uN Ib >
Broken qemu-system-mips:amd64 Depends on libsdl1.2debian:amd64 < none | 1.2.15+dfsg1-4 @un uH > (>= 1.2.11)
  Considering libsdl1.2debian:amd64 5 as a solution to qemu-system-mips:amd64 0
  Holding Back qemu-system-mips:amd64 rather than change libsdl1.2debian:amd64
Investigating (1) qemu-system-x86:amd64 < none -> 1:2.8+dfsg-6+deb9u4 @un uN Ib >
Broken qemu-system-x86:amd64 Depends on libsdl1.2debian:amd64 < none | 1.2.15+dfsg1-4 @un uH > (>= 1.2.11)
Considering libsdl1.2debian:amd64 5 as a solution to qemu-system-x86:amd64 0
  Holding Back qemu-system-x86:amd64 rather than change libsdl1.2debian:amd64
Investigating (2) qemu:amd64 < none -> 1:2.8+dfsg-6+deb9u4 @un puN Ib >
Broken qemu:amd64 Depends on qemu-system:amd64 < none | 1:2.8+dfsg-6+deb9u4 @un uH >
(>= 1:2.8+dfsg-6+deb9u4)
  Considering qemu-system:amd64 0 as a solution to qemu:amd64 9999
  Considering qemu-system:i386 -1 as a solution to qemu:amd64 9999
  Re-Instated libaio1:i386
  Re-Instated libbluetooth3:i386
  Re-Instated libbrlapi0.6:i386
  Re-Instated libnspr4:i386
  Re-Instated libnss3:i386
  Re-Instated libcacard0:i386
  Re-Instated libfdt1:i386
    Reinst Failed early because of libtinfo5:i386
    Reinst Failed because of libncursesw5:i386
    Reinst Failed because of qemu-system-arm:i386
Investigating (2) libnspr4:amd64 < 2:4.20-1 @ii mK Ib >
Broken libnspr4:amd64 Breaks on libnspr4:i386 < none -> 2:4.12-6 @un uN Ib > (!= 2:4.20-1)
  Considering libnspr4:i386 0 as a solution to libnspr4:amd64 16
  Added libnspr4:i386 to the remove list
  Fixing libnspr4:amd64 via keep of libnspr4:i386
Investigating (2) libnss3:amd64 < 2:3.39-1 @ii mK Ib >
Broken libnss3:amd64 Breaks on libnss3:i386 < none -> 2:3.26.2-1.1+deb9u1 @un uN Ib > (!= 2:3.39-1)
  Considering libnss3:i386 0 as a solution to libnss3:amd64 11
  Added libnss3:i386 to the remove list
  Fixing libnss3:amd64 via keep of libnss3:i386
Investigating (2) libcacard0:i386 < none -> 1:2.5.0-3 @un uN Ib >
Broken libcacard0:i386 Depends on libnspr4:i386 < none | 2:4.12-6 @un uH > (>= 2:4.9-2~)
  Considering libnspr4:i386 16 as a solution to libcacard0:i386 0
  Holding Back libcacard0:i386 rather than change libnspr4:i386
Investigating (3) qemu:amd64 < none -> 1:2.8+dfsg-6+deb9u4 @un puN Ib >
Broken qemu:amd64 Depends on qemu-system:amd64 < none | 1:2.8+dfsg-6+deb9u4 @un uH >
(>= 1:2.8+dfsg-6+deb9u4)
  Considering qemu-system:amd64 0 as a solution to qemu:amd64 9999
  Considering qemu-system:i386 -1 as a solution to qemu:amd64 9999
Done
E: Unable to correct problems, you have held broken packages.

我无法从中读出解决方案,只是它尝试了不同的软件包,但所有这些软件包最终都会破坏某些东西。不过这个命令我还是第一次见。

答案1

我会:

apt-get install synaptic "if not installed already"
  • 然后运行它
  • 找到qemu
  • 如果已安装,则标记为完全删除
  • 然后申请
  • 重启
  • 运行突触
  • 重新安装qemu
  • 确保 synaptic 报告没有错误或损坏的包
  • 如果存在错误或损坏的软件包,请使用 synaptic 来查找解决方案

完毕

相关内容