instead of g++ command O have to type g++-6 -v how do i fix this so that g++ command to g++-6
this is giving me problem compiling native extensions from ruby and might be trouble for other programs too
instead of g++ command O have to type g++-6 -v how do i fix this so that g++ command to g++-6
this is giving me problem compiling native extensions from ruby and might be trouble for other programs too
Work around.
Open your .bashrc
:
gedit ~/.bashrc
Add this line to the end of the file:
alias g++='g++-6'
Then source
your .bashrc
:
source ~/.bashrc
One liner:
echo "alias='g++=g++-6'" >> ~/.bashrc; source ~/.bashrc
A more proper fix for this would be to make a symbolic link for g++-6
to g++
. This will ensure compatibility with many installers and other applications.
To do this:
sudo ln -s $(type g++-6 | grep -oE '[^ ]+$') /usr/bin/g++
This will get the path to g++-6
and create a symbolic like using it to /usr/bin/g++