仅供参考:我正在使用 Kubuntu 18.04
安装 apt-transport-https 时,我一直收到以下错误
我已经尝试修复此错误的方法有:
sudo apt-get autoremove libdvd-pkg
sudo apt-get install libdvd-pkg
sudo apt-get update
sudo apt-get install -f
sudo apt-get purge apt-transport-https && sudo apt-get install apt-transport-https
我继续看到的错误是
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
apt-transport-https*
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
After this operation, 152 kB disk space will be freed.
Do you want to continue? [Y/n] Y
(Reading database ... 246794 files and directories currently installed.)
Removing apt-transport-https (1.6.6) ...
libdvd-pkg: Checking orig.tar integrity...
/usr/src/libdvd-pkg/libdvdcss_1.4.2.orig.tar.bz2: OK
libdvd-pkg: `apt-get check` failed, you may have broken packages. Aborting...
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
apt-transport-https
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 1,692 B of archives.
After this operation, 152 kB of additional disk space will be used.
Get:1 http://ca.archive.ubuntu.com/ubuntu bionic-updates/universe amd64 apt-transport-https all 1.6.6 [1,692 B]
Fetched 1,692 B in 0s (6,872 B/s)
Selecting previously unselected package apt-transport-https.
(Reading database ... 246791 files and directories currently installed.)
Preparing to unpack .../apt-transport-https_1.6.6_all.deb ...
Unpacking apt-transport-https (1.6.6) ...
Setting up apt-transport-https (1.6.6) ...
libdvd-pkg: Checking orig.tar integrity...
/usr/src/libdvd-pkg/libdvdcss_1.4.2.orig.tar.bz2: OK
libdvd-pkg: `apt-get check` failed, you may have broken packages. Aborting...
答案1
为了解决这个问题,我做了一件事,就是在安装 libdvd-pkg 之后运行以下命令来完成设置:
sudo dpkg-reconfigure libdvd-pkg
如果这个问题仍然存在,您可以选择不进行“自动”更新。
答案2
@devguy 的回答呼应/usr/share/doc/libdvd-pkg/README.Debian
:
dpkg-reconfigure libdvd-pkg
可用于构建和安装 libdvdcss* 包。
作为背景信息,快速查看已安装的软件包,了解其工作原理以及问题发生的位置/原因:软件包安装软件包的 debian 源代码打包libdvdcss
,并从postinst
脚本中下载.orig.tar.gz
videolan.org 的源代码,然后构建和安装二进制软件包。大部分工作都是在脚本/usr/lib/libdvd-pkg/b-i_libdvdcss.sh
和 Debian 源代码包中完成的/usr/share/libdvd-pkg/debian/
。故障似乎是在源代码包构建之前故意触发的,因为在运行apt-get check
时总是会失败:apt-get install
E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), is another process using it?
作者在安装 via 时故意触发失败的原因apt-get
描述在此错误报告比以下更清楚一点README.Debian
:
问题在于 libdvd-pkg 会挂接到 APT 调用后处理程序并运行通常不会在该阶段运行的命令。因此,存在破坏 APT 操作并造成全系统影响的风险和可能性...
我猜想从源代码构建的原因libdvdcss.so
是为了避免分发二进制文件时出现一些法律或其他问题。但是,阅读错误报告后,我不清楚为什么该软件包会构建并安装Debian 软件包从源代码,并嵌套安装包(即安装libdvdcss
包期间软件包的安装libdvd-pkg
)是这里的根本问题。libdvdcss.so
我发现没有任何地方讨论过可以避开此问题的从源代码构建和安装的替代方法。
再次,直到软件包的问题被解决之前,@devguy 的答案似乎是最好的临时解决方法:
# Install base files; .postinst fails; libdvdcss package NOT installed
sudo apt-get install libdvd-pkg
# Re-run .postinst; libdvdcss package successfully builds and installs
sudo dpkg-reconfigure libdvd-pkg