GCC 8


- g++ is slave
- 800 is priority
```typesudo apt install gcc-8 g++-8 -ysudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-8 800 --slave /usr/bin/g++ g++ /usr/bin/g++-8```
- update-alternatives: warning: forcing reinstallation of alternative /usr/bin/gcc-8 because link group gcc is broken
```typesudo apt-get install ppa-purgesudo apt update sudo apt install aptitude sudo aptitude install libubsan1 libasan5 libgcc-8-dev gcc-8-base gcc-8 cpp-8 g++-8```



> [How to switch between multiple GCC and G++ compiler versions on Ubuntu 20.04 LTS Focal Fossa](https://linuxconfig.org/how-to-switch-between-multiple-gcc-and-g-compiler-versions-on-ubuntu-20-04-lts-focal-fossa)

> [Ubuntu 18.04.01 LTS에서 gcc7.3을 gcc8로 올바르게 업그레이드하는 방법은 무엇입니까?](https://www.it-swarm.dev/ko/server/ubuntu-180401-lts%EC%97%90%EC%84%9C-gcc73%EC%9D%84-gcc8%EB%A1%9C-%EC%98%AC%EB%B0%94%EB%A5%B4%EA%B2%8C-%EC%97%85%EA%B7%B8%EB%A0%88%EC%9D%B4%EB%93%9C%ED%95%98%EB%8A%94-%EB%B0%A9%EB%B2%95%EC%9D%80-%EB%AC%B4%EC%97%87%EC%9E%85%EB%8B%88%EA%B9%8C/998281422/)

> [Install gcc-8 only on Ubuntu 18.04?](https://askubuntu.com/questions/1028601/install-gcc-8-only-on-ubuntu-18-04)





