Skip to main content

How to downgrade gcc 10.3 in Ubuntu 21.04


Ubuntu 21.04 comes with gcc 10.3 which causes some issues when used with nvcc (bug for gcc 10.3 is filed). To downgrade to gcc 9 you can use these commands:

sudo apt-get remove gcc-10 g++-10

sudo apt-get install gcc-9 g++-9

sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 9

sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-9 9

After that, DeeperThought will run on Ubuntu 21.04: