0

I'm trying to install build-essential using sudo apt-get install build-essential command. I get this error:

The following packages have unmet dependencies:
build-essential : Depends: g++ (>= 4:4.4.3) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

I am installing build-essential so that I can install redis after. Please help.

Red Bottle
  • 173
  • 1
  • 9
  • 1
    Possible duplicate of [Ubuntu:Unable to correct problems, you have held broken packages](https://askubuntu.com/questions/888098/ubuntuunable-to-correct-problems-you-have-held-broken-packages) – duckmayr Oct 10 '17 at 10:50

1 Answers1

1

This is a good use for the APT Master Recovery Commands:

sudo apt update
sudo apt -f install
sudo apt full-upgrade

These commands will update your local package cache, attempt to fix any broken packages with dependency issues, and then run a full system upgrade.

Once all of these things are done, go ahead and try installing build-essential again.

Kaz Wolfe
  • 33,802
  • 20
  • 111
  • 168