which gcc gives - /usr/bin/gcc
gcc version shows - gcc version 11.4.0 (Ubuntu 11.4.0-1ubuntu1~22.04)
update-alternatives --query gcc gives - no alternatives for gcc
sudo apt-get install g++-7 gives - Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Package g++-7 is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package 'g++-7' has no installation candidate
sudo apt install build-essential sudo apt -y install gcc-7 g++-7 gives - Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Package g++-7 is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
Package gcc-7 is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Unable to locate package install
E: Package 'gcc-7' has no installation candidate
E: Package 'g++-7' has no installation candidate
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-7 7 gives - update-alternatives: error: alternative path /usr/bin/gcc-7 doesn't exist
sudo update-alternatives --config gcc gives - update-alternatives: error: no alternatives for gcc