5

This question already has an answer here:

EDIT: My question is a duplicate but my answer here is a bit different than the answer in the linked duplicate above.

I cannot install, remove, or upgrade anything using APT because of this error:

$ sudo apt-get upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
You might want to run 'apt-get -f install' to correct these.
The following packages have unmet dependencies:
 guvcview : Depends: libguvcview-2.0-0 but it is not installed
            Recommends: uvcdynctrl but it is not installed
E: Unmet dependencies. Try using -f.

I'm certain I can find and fix this error. I'm more interested in knowing why the entirety of apt is broken because of one program having a problem.

Edit: I can't apt-get dist-upgrade either:

$ sudo apt-get dist-upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
You might want to run 'apt-get -f install' to correct these.
The following packages have unmet dependencies:
 guvcview : Depends: libguvcview-2.0-0 but it is not installed
            Recommends: uvcdynctrl but it is not installed
E: Unmet dependencies. Try using -f.

apt-get -f install is met with this error:

Preparing to unpack .../libguvcview-2.0-0_2.0.5+ubuntu2~ppa1+1418-0ubuntu1~201702081552~ubuntu16.10.1_amd64.deb ...
Unpacking libguvcview-2.0-0:amd64 (2.0.5+ubuntu2~ppa1+1418-0ubuntu1~201702081552~ubuntu16.10.1) ...
dpkg: error processing archive /var/cache/apt/archives/libguvcview-2.0-0_2.0.5+ubuntu2~ppa1+1418-0ubuntu1~201702081552~ubuntu16.10.1_amd64.deb (--unpack):
 trying to overwrite '/usr/lib/x86_64-linux-gnu/libgviewaudio-2.0.so.2.0.0', which is also in package libguvcview-2.0-2:amd64 2.0.4+debian-1
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Errors were encountered while processing:
 /var/cache/apt/archives/libguvcview-2.0-0_2.0.5+ubuntu2~ppa1+1418-0ubuntu1~201702081552~ubuntu16.10.1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

It should be noted that the file /usr/lib/x86_64-linux-gnu/libgviewaudio-2.0.so.2.0.0 does not exist on my system.

I can't do anything with APT because of this. I can't even remove an unrelated program. abiword is a text editor.

$ sudo apt-get remove abiword
Reading package lists... Done
Building dependency tree       
Reading state information... Done
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
 guvcview : Depends: libguvcview-2.0-0 but it is not going to be installed
            Recommends: uvcdynctrl but it is not going to be installed
 lubuntu-desktop : Depends: abiword but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

OS: Lubuntu desktop (Ubuntu 16.10)

marked as duplicate by Community Jan 18 '18 at 14:39

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • Possibly relevant: How do I resolve unmet dependencies after adding a PPA? – wjandrea Jan 9 '18 at 3:12
  • See my post (edited) for the output of the commands suggested in that answer. The steps taken to answer that question did not resolve my issue. Also, there is no checkbox for either of the guvcview programs in the Software & Updates GUI. – bee Jan 10 '18 at 0:00
  • Did you run ppa-purge on the PPA or repository at the origin of libguvcview-2.0-0=2.0.5+ubuntu2~ppa1+1418-0ubuntu1~201702081552~ubuntu16.10.1:amd64 like the accepted answer to the linked question suggests? You can find out the repository with apt-cache policy libguvcview-2.0-0. If you did, what exactly happened? – David Foerster Jan 10 '18 at 14:11
  • 2
    16.10 is unsupported and questions specific to it are therefore off-topic (I personally consider questions about package management via repository to be version-specific). More importantly, it is unsafe to use an EoL operating system (no security updates) and you are likely to encounter many unresolvable package management issues. Please do upgrade your system as soon as possible! – Zanna Jan 10 '18 at 14:22
6

I found the answer here:

apt-get commands are failing with libpython3.3 unmet dependencies

Apparently I had two conflicting versions of guvcview installed.

apt list --installed | grep guvc
guvcview/yakkety,now 2.0.5+ubuntu2~ppa1+1418-0ubuntu1~201702081552~ubuntu16.10.1 amd64 [installed]
libguvcview-2.0-2/yakkety,now 2.0.4+debian-1 amd64 [installed]

As per the answer above, I used dkpg -r --force-depends to remove them:

sudo dpkg -r --force-depends guvcview
sudo dpkg -r --force-depends libguvcview-2.0-2

At that point I tried to apt-get upgrade again as normal:

sudo apt-get upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
You might want to run 'apt-get -f install' to correct these.
The following packages have unmet dependencies:
 lubuntu-desktop : Depends: guvcview but it is not installed
E: Unmet dependencies. Try using -f.

Aha! This time I got an expected error message. guvcview is a package that lubuntu-desktop depends on: that means if I reinstall it after it's removed, everything should be back to normal, right?

After running these commands:

sudo apt-get -f install
sudo apt-get upgrade

Everything works now. guvcview is working again too, which is nice, because I broke it while debugging this error.

guvcview welcome back

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