以下软件包具有未满足的依赖关系

以下软件包具有未满足的依赖关系

每次我尝试在 Debian 上使用 apt-get install 或 remove 或 purge 时,都会弹出以下错误:

The following packages have unmet dependencies:
 libimage-magick-q16-perl : Depends: libmagickcore-6.q16-2 (>= 8:6.8.9.9) but it is not going to be installed
 libmagick++-6.q16-5 : Depends: libmagickcore-6.q16-2 (>= 8:6.8.9.9) but it is not going to be installed
                       Depends: libmagickwand-6.q16-2 (>= 8:6.8.8.9) but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

然后我运行“apt-get -f install”来尝试修复它,但我收到另一个错误:

nichadler@debian-server:~$ sudo apt-get -f install
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following packages were automatically installed and are no longer required:
  libatkmm-1.6-1 libcairomm-1.0-1 libglibmm-2.4-1c2a libgtkmm-2.4-1c2a
  libgtkspell0 libimage-magick-perl libimage-magick-q8-perl libpangomm-1.4-1
  perlmagick ttf-dejavu-core
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
  libimage-magick-perl libimage-magick-q8-perl
Suggested packages:
  imagemagick-doc
The following packages will be REMOVED:
  libimage-magick-q16-perl libmagick++-6.q16-5 libpstoedit0c2a pstoedit
The following NEW packages will be installed:
  libimage-magick-q8-perl
The following packages will be upgraded:
  libimage-magick-perl
1 upgraded, 1 newly installed, 4 to remove and 19 not upgraded.
Need to get 0 B/397 kB of archives.
After this operation, 2,540 kB disk space will be freed.
Do you want to continue? [Y/n] y
Reading changelogs... Done
(Reading database ... 148618 files and directories currently installed.)
Preparing to unpack .../libimage-magick-q8-perl_8%3a6.9.1-2_amd64.deb ...
Unpacking libimage-magick-q8-perl (8:6.9.1-2) ...
dpkg: error processing archive /var/cache/apt/archives/libimage-magick-q8-perl_8%3a6.9.1-2_amd64.deb (--unpack):
 trying to overwrite '/usr/lib/x86_64-linux-gnu/perl5/5.20/auto/Image/Magick/Magick.so', which is also in package libimage-magick-q16-perl 8:6.8.9.9-5
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Processing triggers for man-db (2.7.0.2-5) ...
Errors were encountered while processing:
 /var/cache/apt/archives/libimage-magick-q8-perl_8%3a6.9.1-2_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

有什么帮助吗?

答案1

这是错误:

dpkg:处理存档 /var/cache/apt/archives/libimage-magick-q8-perl_8%3a6.9.1-2_amd64.deb (--unpack) 时出错:试图覆盖‘/usr/lib/x86_64-linux-gnu/perl5/5.20/auto/Image/Magick/Magick.so’,后者也位于软件包 libimage-magick-q16-perl 8:6.8.9.9-5 中 dpkg-deb:错误:子进程 paste 被信号终止(管道断裂)

dpkg拒绝安装该软件包,因为另一个软件包拥有该文件/usr/lib/x86_64-linux-gnu/perl5/5.20/auto/Image/Magick/Magick.so

默认情况下,dpkg不会覆盖属于另一个包的文件 - 并且当包被重命名或包的集合被重组时,特定包的文件“所有权”可能会发生变化。

您需要使用 -o Dpkg::Options::="--force-overwrite" 选项运行 apt-get,如下所示:

apt-get -o Dpkg::Options::="--force-overwrite" ...

或者您可以通过将其添加到 /etc/apt/apt.conf 或 /etc/apt/apt.conf.d/ 中的文件来使其永久化,如下所示:

DPkg { 选项 {"--force-overwrite";} };

答案2

尝试dpkg -r libimage-magick-q16-perl手动删除冲突的软件包,然后执行 a apt-get -f installapt-get install libimage-magick-q8-perl如果上一步中未安装该软件包

相关内容