2009-08-22

Manage symlinks in Debian/Ubuntu using update-alternatives

In a previous post I explained how to build Google Gears under Debian/Ubuntu, and the process involved some hacks to use a version of GCC different from the most updated one.


Then my friend Davide sent me some suggestions explaining that I could have used the "update-alternatives" command to manage symbolic links to the desired version of a tool.

For instance:
update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.2 10


update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.3 20


update-alternatives --config g++