- Switch version of g++
-
-
- Example: install g++ 5.3 and g++ 7.3, then switch between them
- Step 1: install g++ 5.3 with priority 20
1sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-5.3 20-
- Step 2: install g++ 7.3 with priority 60
1sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-7.3 60-
- Choose one g++ version:
1234567891011sudo update-alternatives --config gcc// You will see the following:There are 2 choices for the alternative gcc (providing /usr/bin/gcc).Selection Path Priority Status------------------------------<wbr />------------------------------* 0 /usr/bin/gcc-7 60 auto mode1 /usr/bin/gcc-5 60 manual mode2 /usr/bin/gcc-7 60 manual modePress <enter> to keep the current choice[*], or type selection number: -
-
- Switch version of CUDA
- Download https://github.com/phohenecker/switch-cuda
- run the .sh file