2

I was doing routine update && upgrade procedure on Ubuntu 16.04 and it wanted to upgrade some multimedia codec libraries

List of libraries to be updated

I confirmed the upgrade as seen in the picture above. Then the upgrade process returned error code (1) and couldn't finish upgrading.

Broken Pipe, /usr/bin/dpkg returns an error code

Now I am getting this unmet dependency thing when I try to do anything related to upgrade.

The following packages have unmet dependencies:
 libavcodec-extra57 : Depends: libx265-102 (>= 2.2) but it is not installed
 x265 : Depends: libx265-102 (>= 2.2) but it is not installed
        Depends: libx265-102 (< 2.3) but it is not installed
E: Unmet dependencies. Try using -f.

I am concerned. Is it possible to revert to the state before I try to upgrade?

Vemulo
  • 171
  • cannot put more than 2 links, not insert images as images without links!, if my rep increases, I will edit the post. – Vemulo Jan 17 '17 at 22:05
  • 1
    Could you please post text files, dialogue messages, and program output listings as text, not as images? To achieve the latter two you can either 1) select, copy & paste the dialogue text or terminal content or 2) save the program output to a file and use that. Longer listings (≥100 lines) should be uploaded to a pastie service and linked to in the question. Thanks. – David Foerster Jan 19 '17 at 02:06
  • 2
  • I edited the (since now I have enough rep), If the content of the terminals are not enough. I don't know what I can do more. Because I managed to solve my issue as stated in my own answer. However, if you have an explanation what is going on and why that magic command resolve it. I am still interested to know. Hence I didn't accept my answer as an answer! – Vemulo Jan 19 '17 at 20:27
  • @DavidFoerster, thank you for the link. it was extensive compilation of solutions to my previous(other) problems with unmet dependencies. However, my main issue was the error which is the 'Broken Pipe', I got during 'update' procedure. – Vemulo Jan 19 '17 at 20:32
  • That's the first time I hear about this problem from you. I don't see any apt-get update output anywhere in your question so it was impossible to know. Could you please [edit] your question to include the full, verbatim output of sudo apt-get update? – David Foerster Jan 19 '17 at 20:47

2 Answers2

4

I have solved my issue by following dpkg overwrite

Specifically I entered:

sudo dpkg -i --force-overwrite /var/cache/apt/archives/libx265-102_2.2-1~16.04.york0_amd64.deb
Vemulo
  • 171
  • I am not hundred percent sure that this is safe and applicable to all similar cases. If someone explains what was going on and why did this comment solved it. I can accept it as an answer. – Vemulo Jan 18 '17 at 21:01
  • The above command solved this issue for me too. – tomoqv Jan 26 '17 at 09:28
1

Let's try to clear up the 'partial' error first. Be very careful with these commands:

sudo rm -vf /var/lib/apt/lists/partial/*  # Remove files in 'partial'
sudo rm -vf /var/lib/apt/lists/*  # Remove package lists in 'lists'
sudo apt-get update

If you are still getting a 'status' error, try restoring a backup copy of the file:

sudo mv /var/lib/dpkg/status /var/lib/dpkg/status.0715
sudo cp /var/backups/dpkg.status.0 /var/lib/dpkg/status
sudo apt-get update