g++ プログラムがインストールされていますが、検索に問題があります。

g++ プログラムがインストールされていますが、検索に問題があります。
gcc version 5.3.0 20151204 (Ubuntu 5.3.0-3ubuntu1~14.04) 

私のg ++​​に問題があります。

g++を検索しても何も出ません!

だからインストールしてみましたが、g++がすでにインストールされていて最新の状態のようです!

arubu@CQ56-LinuxMachine:~$ which g++
arubu@CQ56-LinuxMachine:~$ sudo apt-get install g++
[sudo] password for arubu: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
g++ is already the newest version.
g++ set to manually installed.
The following packages were automatically installed and are no longer required:
  libgranite-common libgranite1 libkeybinder-3.0-0
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 8 not upgraded.
arubu@CQ56-LinuxMachine:~$ g++ -v
The program 'g++' is currently not installed. You can install it by typing:
sudo apt-get install g++

ベストアンサー1

パッケージを強制的に再インストールしなければ、g++適切なシンボリックリンクが復元されます。

sudo apt-get --reinstall install g++

これを完了すると、/usr/bin/g++シンボリックリンクが再びあり、yesがあることがわかりますg++-5

おすすめ記事