I have installed gcc-7 and g++-7 using the answer at https://askubuntu.com/a/581497/333103.
Then I realised that while this slaved the g++ version to the gcc version, I had forgotten to add a slaving for the gcov version. How can I add gcov as a slave to this link group?
I checked the man for update-alternatives but I didn't see a way without just going from scratch again. If this case is the way to do it then do I need to remove the current update-alternative group to start fresh?
(I am on Bash on Ubuntu on Windows, so 16.04)
I googled this issue, and in the first three pages, there are only two relevant results. One is this no-answer problem; another is a bug report on CentOS bug tracker,
update-alternatives
replaces new slave links instead of adding ones.In
--install
section of the Debianupdate-alternatives
manpages, it's said thatBut for the time being, I'm afraid that we can achieve this only by adding all slaves to existing link group at one time, including both original and newly added slaves.
To me, configuring
java
alternatives, it'sYou don't need to remove the link group first, as the current behavior is the newly added slaves completely replace original ones. Be aware that you can always use
update-alternatives --display "$your_command"
to view alternative status safely.