如何在安装软件包时删除有关杯子的“未满足的依赖关系错误”?
在安装octave或wxmaxima时,我在终端中看到此错误
You might want to run 'apt-get -f install' to correct these: The following packages have unmet dependencies: cups : Depends: cups-daemon (>= 2.1.3-4ubuntu0.2) cups-core-drivers : Depends: cups-daemon (>= 2.1.3-4ubuntu0.2) cups-daemon : Depends: libcups2 (= 2.1.3-4) but 2.1.3-4ubuntu0.2 is to be installed E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
我认为有人在打包更新时犯了一个错误。 我在这里提交了一个错误: https : //bugs.launchpad.net/ubuntu/+source/cups/+bug/1676621
如果它影响到你,顶部有一个链接“这个bug影响你”,这将确认错误,以便开发人员可以开始查看它。
更新:该bug的结尾表明这对我有用:
sudo apt-get install libcups2=2.1.3-4 cups libcupscgi1=2.1.3-4 libcupsimage2=2.1.3-4 libcupsmime1=2.1.3-4 libcupsppdc1=2.1.3-4 cups-core-drivers cups-daemon ghostscript cups-client=2.1.3-4 cups-ppdc cups-filters printer-driver-gutenprint cups-filters
要解决依赖性问题,我们应该看看日志文件
/var/log/apt/term.log /var/log/apt/history.log
使用apt-get
与-s
(模拟)-option也很有帮助:
sudo apt-get -s -f install
将向我们展示如果不实际更改系统中的任何内容将会发生什么。
我运行sudo apt update
和sudo apt full-upgrade
来获得完全相同的错误消息。
来自/var/log/apt/term.log
日志开始:2017-03-28 01:26:44 (阅读数据库...... (阅读数据库...... 100% (读取当前安装的数据库... 314704文件和目录。) 准备打开包装... / libcupsppdc1_2.1.3-4ubuntu0.2_amd64.deb ... 解压缩libcupsppdc1:amd64(2.1.3-4ubuntu0.2)over(2.1.3-4)... 准备打开包装... / libcupsmime1_2.1.3-4ubuntu0.2_amd64.deb ... 解压缩libcupsmime1:amd64(2.1.3-4ubuntu0.2)over(2.1.3-4)... 准备打开包装... / libcupsimage2_2.1.3-4ubuntu0.2_amd64.deb ... 解压缩libcupsimage2:amd64(2.1.3-4ubuntu0.2)over(2.1.3-4)... 准备打开包装... / libcupscgi1_2.1.3-4ubuntu0.2_amd64.deb ... 解压缩libcupscgi1:amd64(2.1.3-4ubuntu0.2)over(2.1.3-4)... 准备拆包... / cups-core-drivers_2.1.3-4ubuntu0.2_amd64.deb ... 打开cup-core-drivers(2.1.3-4ubuntu0.2)打开包装(2.1.3-4)...... 准备拆包... / cups-server-common_2.1.3-4ubuntu0.2_all.deb ... 打开cups-server-common(2.1.3-4ubuntu0.2)over(2.1.3-4)...... 准备拆包... / cups-common_2.1.3-4ubuntu0.2_all.deb ... 拆开杯子 - 通用(2.1.3-4ubuntu0.2)(2.1.3-4)...... 准备拆包... / cups-ppdc_2.1.3-4ubuntu0.2_amd64.deb ... 打开cups-ppdc(2.1.3-4ubuntu0.2)打包(2.1.3-4)...... 准备打开... / cups-daemon_2.1.3-4ubuntu0.2_amd64.deb ... cup.service的工作取消了。 invoke-rc.d:initscript cups,action“stop”失败。 dpkg:warning:子进程旧的预删除脚本返回错误退出状态1 dpkg:尝试从新包中编写脚本... cup.service的工作取消了。 invoke-rc.d:initscript cups,action“stop”失败。 dpkg:error handling存档/var/cache/apt/archives/cups-daemon_2.1.3-4ubuntu0.2_amd64.deb(--unpack): 子进程新的预删除脚本返回错误退出状态1 准备拆包... / cups-bsd_2.1.3-4ubuntu0.2_amd64.deb ... 打开cups-bsd(2.1.3-4ubuntu0.2)打开包装(2.1.3-4)...... 准备拆包... / cups-client_2.1.3-4ubuntu0.2_amd64.deb ... 打开杯子客户端(2.1.3-4ubuntu0.2)(2.1.3-4)...... 准备打开包装... / libcups2_2.1.3-4ubuntu0.2_amd64.deb ... 解压缩libcups2:amd64(2.1.3-4ubuntu0.2)over(2.1.3-4)... 准备拆包... / cups_2.1.3-4ubuntu0.2_amd64.deb ... 拆开杯子(2.1.3-4ubuntu0.2)(2.1.3-4)...... 处理libc-bin的触发器(2.23-0ubuntu7)...... 处理doc-base的触发器(0.10.7)...... 处理1更改了doc-base文件... 使用scrollkeeper注册文档... 处理man-db的触发器(2.7.5-1)...... 处理时遇到错误: /var/cache/apt/archives/cups-daemon_2.1.3-4ubuntu0.2_amd64.deb 日志结束:2017-03-28 01:28:00
似乎是cpus
-package的问题。 从https://launchpad.net/ubuntu/+source/cups收集有关此软件包的信息
2.1.3-4发布(主要) 2.1.3-4ubuntu0.2建议(主要)
为了摆脱unmmet依赖,我运行了sudo apt-get -f install
。
来自/var/log/apt/term.log
登录日期:2017-03-28 10:16:05 (阅读数据库...... (阅读数据库...... 100% (读取当前安装的数据库... 314703文件和目录。) 删除printer-driver-splix(2.0.0 + svn315-4fakesync1)... 删除printer-driver-postscript-hp(3.16.3 + repack0-1)...... 删除hplip(3.16.3 + repack0-1)...... 删除printer-driver-hpcups(3.16.3 + repack0-1)...... 去掉bluez-cups(5.37-0ubuntu5)...... 删除printer-driver-gutenprint(5.2.11-1)... 取下杯子(2.1.3-4ubuntu0.2)...... 删除cups-core-drivers(2.1.3-4ubuntu0.2)...... 删除cups-daemon(2.1.3-4)...... 警告:停止cups.service,但它仍然可以通过以下方式激活: cups.socket 处理man-db的触发器(2.7.5-1)...... 处理dbus的触发器(1.10.6-1ubuntu3.3)...... 设置libcups2:amd64(2.1.3-4ubuntu0.2)... 设置libcupsimage2:amd64(2.1.3-4ubuntu0.2)... 设置cups-server-common(2.1.3-4ubuntu0.2)...... 设置cups-common(2.1.3-4ubuntu0.2)...... 设置cups-client(2.1.3-4ubuntu0.2)...... 设置libcupsppdc1:amd64(2.1.3-4ubuntu0.2)... 设置cups-ppdc(2.1.3-4ubuntu0.2)...... 设置libcupscgi1:amd64(2.1.3-4ubuntu0.2)... 设置libcupsmime1:amd64(2.1.3-4ubuntu0.2)... 设置cups-bsd(2.1.3-4ubuntu0.2)...... 处理libc-bin的触发器(2.23-0ubuntu7)...... 日志结束:2017-03-28 10:16:16
来自/var/log/apt/history.log
开课日期:2017-03-28 10:16:05 命令行:apt-get -f install 要求:mook(1000) 删除:printer-driver-splix:amd64(2.0.0 + svn315-4fakesync1),bluez-cups:amd64(5.37-0ubuntu5),printer-driver-hpcups:amd64(3.16.3 + repack0-1),打印机驱动程序-postscript-hp:amd64(3.16.3 + repack0-1),hplip:amd64(3.16.3 + repack0-1),printer-driver-gutenprint:amd64(5.2.11-1),cups-core-drivers: amd64(2.1.3-4ubuntu0.2),cups-daemon:amd64(2.1.3-4),cups:amd64(2.1.3-4ubuntu0.2) 结束日期:2017-03-28 10:16:16
未满足的dependecies现在是历史,但一些包已被删除,我重新安装它们,有问题的包装cups
首先proposed updates
启用。
我启用了proposed updates
并运行sudo apt update
!!!现在不要运行sudo apt upgrade
!
我用sudo apt install cups
重新sudo apt install cups
安装:printer-driver-gutenprint:amd64(5.2.11-1,自动),cups-core-drivers:amd64(2.1.3-4ubuntu0.2,自动),cups-daemon:amd64(2.1.3-4ubuntu0。 2,自动),杯子:amd64(2.1.3-4ubuntu0.2)
我禁用了proposed updates
并运行sudo apt update
我们可以看到之前删除的一些软件包现在重新安装,但不是全部。 我安装了丢失的包
sudo apt安装hplip 安装:printer-driver-hpcups:amd64(3.16.3 + repack0-1,自动),printer-driver-postscript-hp:amd64(3.16.3 + repack0-1,自动),hplip:amd64(3.16.3+ repack0-1) sudo apt install printer-driver-splix 安装:printer-driver-splix:amd64(2.0.0 + svn315-4fakesync1) sudo apt安装bluez-cups 已安装:bluez-cups:amd64(5.37-0ubuntu5)
现在安装所有软件包,打印机再次运行。
如何启用/禁用建议的更新:
https://www.hiroom2.com/2016/05/23/ubuntu-16-04-install-xenial-proposed-package/
https://wiki.ubuntu.com/Testing/EnableProposed
启用建议的更新:
$ sudo sh -c“echo'deb http://archive.ubuntu.com/ubuntu/ \ xenial提出限制主要多元宇宙'\ > /etc/apt/sources.list.d/xenial-proposed.list“
禁用建议的更新:
$ sudo rm /etc/apt/sources.list.d/xenial-proposed.list“
或使用软件和更新程序,并在Dev
preleased updates(xenial-proposed)
选中/取消选中preleased updates(xenial-proposed)
。
注意
我使用内核4.4.0-70-lowlatency运行UbuntuStudio 16.04.2。
OP的日志文件可能与我的略有不同,因为OP使用不同的命令来获取错误。 从执行sudo apt-get -f install
删除的文件也可能不同,这取决于为不同打印机安装的驱动程序。
为了安全起见,暂时禁用自动更新以执行所描述的步骤并不是最糟糕的想法。
当涉及到依赖性问题(爱我的独立性)时,我不是很聪明,可能有更优雅的方法来解决这个问题。