Gcc version do not match

OS: Ubuntu 20.04
Driver Version: 510.47.03
GPUs: Telsa T4

Hi while I am installing nvidia by sudo ./NVIDIA-Linux-x86_64-510.47.03.run --dkms -s, here I have the following bugs.

Compiler version check failed:
The major and minor number of the compiler used to
compile the kernel:
cc version 9.3.0 (Ubuntu 9.3.0-17ubuntu1-20.04)
does not match the compiler used here:
cc (Ubuntu 9.4.0-lubuntu1-20.04) 9.4.0
Copyright (C) 2019 Free Software Foundation, Inc.

One thing I feel puzzled is my colleague has the same driver(510.47.03), gpu(Telsa T4), gcc version(9.4.0) as I do. He installed it successfully. How should I solve my problem? uninstall the current 9.4.0 version and install gcc 9.3.0 version?

Use update-alternatives to manage different versions of the same program.