Hi,
1. Compile and install gcc.
In this step, the available compilation directory size must be at least 10 GB. The following operations use /opt as an example.
a. Run the following commands to install gcc:
yum install gcc gcc-c++ make # centos/redhat
apt-get install gcc g++ make # ubuntu
zypper install gcc gcc-c++ make # suse
b. Download gcc 4.9.0 for configuration and compilation.
COMPILE_DIR=/opt
mkdir -p $COMPILE_DIR/src
cd $COMPILE_DIR/src
wget http://ftp.gnu.org/gnu/gcc/gcc-4.9.0/gcc-4.9.0.tar.gz
tar xzf gcc-4.9.0.tar.gz
cd gcc-4.9.0
./contrib/download_prerequisites
mkdir -p $COMPILE_DIR/build/gcc-4.9.0
cd $COMPILE_DIR/build/gcc-4.9.0
$COMPILE_DIR/src/gcc-4.9.0/configure --prefix $COMPILE_DIR/gcc-4.9.0 --enable-languages=c,c++ --disable-multilib
make -j4 #Use four CPUs for concurrent compilation. The number can be configured.
make install
c. Set up the cc connection.
cd $COMPILE_DIR/gcc-4.9.0/bin
ln -s gcc cc
2. Use gcc.
a. Run the following command to use gcc:
export PATH=$COMPILE_DIR/gcc-4.9.0/bin:$PATH
b. Run the NVDIA installation script again.
bash /opt/NVIDIA-Linux-x86_64-375.66.run
Have a nice day!