Nvidia driver 설치 시 gcc 12 필요. 일부 22.04 버전은 gcc 11 사용 중. 변경 필요.
gcc-12 should already be installed, but if it isn’t, you can install it or reinstall it by running:
sudo apt install --reinstall gcc-12
Then all you should have to do is update the link for gcc to go to the gcc-12 binary:
sudo ln -s -f /usr/bin/gcc-12 /usr/bin/gcc
You can set it back to 11 as well by doing the following:
sudo ln -s -f /usr/bin/gcc-11 /usr/bin/gcc
You can check it by running gcc --version.
terrance@terrance-ubuntu:~$ gcc --version
gcc (Ubuntu 12.3.0-1ubuntu1~22.04) 12.3.0
Copyright (C) 2022 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.