I need gcc to compile a c code and unable to install gcc on wsl. I tried sudo apt-get install gcc
but it doesn't work. This is the error.
hack@DESKTOP-VMQA3JB:~$ sudo apt-get install gcc
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
gcc : Depends: gcc-9 (>= 9.2.1-1~) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
I don't know the dependencies to install. Please help me with gdb also. thankyou.
You need to:
$ sudo apt-get update && sudo apt-get upgrade -y
2.Clean unrequired packages:
$ sudo apt autoremove -y
$ sudo apt-get install gcc -y
gcc --version
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With