5

I had my Raspberry Pi running for a while and needed to uninstall all the junk I left behind for a project.

I used tmux before and it was a blessing. I am trying to install it again, but it doesn't work.

Since it's in german I'll try to translate the error messages for you:
Original:

$ sudo apt-get install tmux
Paketlisten werden gelesen... Fertig
Abhängigkeitsbaum wird aufgebaut.
Statusinformationen werden eingelesen.... Fertig
Probieren Sie »apt-get -f install«, um dies zu korrigieren:
Die folgenden Pakete haben unerfüllte Abhängigkeiten:
libavresample-dev : Hängt ab von: libavutil-dev (= 6:11.9-1~deb8u1+rpi1) soll aber nicht installiert werden
E: Unerfüllte Abhängigkeiten. Versuchen Sie »apt-get -f install« ohne Angabe eines Pakets (oder geben Sie eine Lösung an).

Translated:

$ sudo apt-get install tmux
Reading package lists... Ready
Creating dependency tree.
Reading status informations... Ready
Try »apt-get -f install« to correct following:
The following packages have unfulfilled dependencies:
libavresample-dev : Depends on: libavutil-dev (= 6:11.9-1~deb8u1+rpi1) but shouldn't be installed
E: Unfulfilled dependencies. Try »apt-get -f install« without adding a package (or write a solution)

What do I have to do here? Installing the dependencies seems not to work aswell, Install Guides from the internet are not working, sudo apt-get -f install isn't working, ...

I don't know what to do :/

Rasalas
  • 151
  • 3

1 Answers1

4

This can actually happen over time with innocent runs of sudo apt update or installing various packages that conflict rather indirectly. When it tells you there's a dependency like libavutil-dev that "is not going to be installed", try to install it alongside, i.e.:

sudo apt install libavutil-dev tmux

If it then gives a message about a third dependency that is "not going to be installed", you can extend the command further with even more required packages.

What often eventually happens it that it'll turn out that installing the set will require removing something else, indicated clearly by the message "The following packages will be REMOVED". As long as you don't run with the -y flag you need not worry about doing damage until you decide to select yes or no depending on whether the resulting packages are expendable.

As Steve suggested it is possible to be in a state such that your packages are truly broken, but the majority of the time the "not going to be installed" error is conveniently resolvable and certainly worth investigating.

As for building from source, that could still work too. Per your error messages and the tmux README you need to install at a minimum:

sudo apt install libncurses5-dev libevent-dev autoconf automake pkg-config

and possibly other requirements before running ./autogen.sh and configure. One downside is that you might end up in the same package conflict situation depending on what's required! At the very least it'll give you more insight into the true dependency conflicts at hand.

jdonald
  • 2,972
  • 14
  • 39