0

I am trying to install gcc to run a C/C++ program in Visual Studio Code, but I am not able to install gcc.

I tried

sudo apt-get update
sudo apt install build-essential

And it shows an error Unable to correct problems, you have held broken packages

How can I resolve this error and install gcc?

cocomac
  • 3,824

1 Answers1

1

First, run:

sudo apt update
sudo apt dist-upgrade

Then, run:

sudo apt -f install

Please post any errors.

mchid
  • 44,904
  • 8
  • 102
  • 162