Failed to verify gcc version. See log at /var/log/cuda-installer.log for details.
Assistant
The error message "Failed to verify gcc version. See log at /var/log/cuda-installer.log for details." typically occurs during the installation of CUDA when the installer is unable to confirm the presence or compatibility of the GNU Compiler Collection (gcc) version on your system.
User
meow@Anbernic-Win600:~$ gcc --version
Command 'gcc' not found, but can be installed with:
sudo apt install gcc
Assistant
The error message you got means that gcc is not installed on your system. Since CUDA requires gcc, you need to install it first.
To install gcc on your system:
Run this command:
sudo apt update
sudo apt install gcc
If you also need the C++ compiler (which is often required for CUDA builds), install g++ as well:
sudo apt install g++
After installing gcc:
Verify the installation:
gcc --version
Then try installing CUDA again.
Optional: Check CUDA gcc compatibility
Some CUDA versions require specific gcc versions (like gcc-8 or gcc-7). If your system installs a newer gcc (like gcc-9, gcc-10, gcc-11), and CUDA complains, you might need to install a compatible version explicitly. But try the default gcc first and see if the installer works.
If you want, share your CUDA version and Linux distro, and I can help with the exact gcc version to install!
Here’s how you can troubleshoot and resolve this issue:
Step 1: Check the gcc version installed
Run the following command to see what version of gcc you have installed:
gcc --version
Step 2: Check CUDA requirements for gcc version
Different CUDA versions have compatibility requirements for gcc versions. For example:
CUDA 11.x typically supports gcc 7.x or 8.x on many Linux distributions.
Newer CUDA versions may support newer gcc versions, but if you're using a distribution with gcc 10 or above, it might cause issues.
Check the CUDA release notes or documentation for the exact gcc version compatibility.