Ubuntu: Unable to install g++ in Ubuntu 17.04



Question:

This is my problem:

sudo apt-get install g++  Reading package lists... Done  Building dependency tree         Reading state information... Done  g++ is already the newest version (4:6.3.1-2ubuntu1).  0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.    :~$ g++  The program g++ is not installed. You can install it by typing:  sudo apt install g++

I've tried to install build-essentials and gcc and also had the same problem.


Solution:1

It appears something removed the symbolic link at /usr/bin/g++ that is normally set up during the installation of the g++ package. You can either

  • reinstall the package:

    sudo apt-get install --reinstall g++  
  • or tell update-alternative, which normally manages the symbolic link at /usr/bin/g++, to reconfigure the link:

    sudo update-alternatives --auto g++  

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »