Yesterday, I installed Elementary OS Juno. This is a fresh install. When I tried to install g++ it gave me following stream of Errors. Basically some dependencies are unmet. When I tried to install them the error says:
E: Unable to correct problems, you have held broken packages.
Here is the full output:
cstayyab@ciit:~$ sudo apt install g++
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:
g++ : Depends: gcc (>= 4:7.3.0-3ubuntu2) but it is not going to be installed
Depends: g++-7 (>= 7.3.0-12~) but it is not going to be installed
Depends: gcc-7 (>= 7.3.0-12~) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
cstayyab@ciit:~$ sudo apt install g++-7
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:
g++-7 : Depends: gcc-7 (= 7.3.0-16ubuntu3) but it is not going to be installed
Depends: libstdc++-7-dev (= 7.3.0-16ubuntu3) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
I tried to list broken packages but I couln not find any broken package on my system.
Also ran:
sudo apt install -f
But that was fine. No packages were installed or fixed.
Here is the output for
sudo apt install gcc
cstayyab@ciit:~$ 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-7 (>= 7.3.0-12~) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
sudo apt upgrade