104

FYI: I am using Kubuntu 18.04

I keep getting the following error when I install apt-transport-https

Things I have already tired to fix this error are:

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

The error I continue to see is

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...
0
201

One thing I did to fix this was after installing libdvd-pkg, run the following command to complete the setup:

sudo dpkg-reconfigure libdvd-pkg

If this problem persist, you can select not to do "automatic" updates.

10
  • 8
    June 20th 2019 Ubuntu 18.04 this fix worked for me – Michael Durrant Jun 30 '19 at 22:54
  • 2
    Worked in 19.04 as well. – alfC Oct 12 '19 at 2:15
  • 2
    worked for me on 18.04. – tenken Jan 8 '20 at 7:25
  • 6
    worked for me on 20.04 – Waschbaer Jun 1 '20 at 7:35
  • 3
    Worked for 20.04 – Amil Waduwawara Jul 12 '20 at 5:08
0

@devguy's answer echoes /usr/share/doc/libdvd-pkg/README.Debian:

dpkg-reconfigure libdvd-pkg may be used to build and install libdvdcss* package(s).

For background, take a quick look at the installed package to see how it works and where/why the problem occurs: The package installs the debian source packaging for a libdvdcss package, and from the postinst script, downloads the .orig.tar.gz source from videolan.org, and builds and installs binary packages. Most of the work is done in the /usr/lib/libdvd-pkg/b-i_libdvdcss.sh script and in the Debian source package in /usr/share/libdvd-pkg/debian/. The failure appears to be deliberately triggered before the source package build, since apt-get check will always fail when an apt-get install is running:

E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), is another process using it?

The author's reason for deliberately triggering the failure when installing via apt-get is described in this bug report just a little more clearly than in README.Debian:

Trouble is that libdvd-pkg hooks into APT post-invoke handler and run commands that normally never run on that stage. Therefore there is a risk and potential to break APT operations and cause system-wide effect...

I assume the reason to build libdvdcss.so from source is to skirt some legal or other issue surrounding distributing binaries. However, reading through the bug report, it's not clear why the package builds and installs a Debian package from source, and nesting the package installs (i.e. installing the libdvdcss package during the install of the libdvd-pkg package) is the root problem here. Alternative means of building and installing libdvdcss.so from source that could skirt this issue aren't discussed anywhere I've found.

Again, until the package's issues can be cleaned up, it appears @devguy's answer is the best interim workaround:

# 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

Not the answer you're looking for? Browse other questions tagged or ask your own question.