Centos7.9 离线安装gcc4.8.5

环境配置

Centos7.9, cuda:10.0, cudnn7.4.2

在一个无网机器上安装cuda10.0时, 报错无gcc, 故需离线安装gcc, 经测试, 安装gcc4.8.5后可正常安装cuda10.0

gcc安装步骤

1.进入如下网址下载下述包:http://mirror.centos.org/centos/7/os/x86_64/Packages/

cpp-4.8.5-44.el7.x86_64.rpm
gcc-4.8.5-44.el7.x86_64.rpm
glibc-2.17-317.el7.x86_64.rpm
glibc-common-2.17-317.el7.x86_64.rpm
glibc-devel-2.17-317.el7.x86_64.rpm
glibc-headers-2.17-317.el7.x86_64.rpm
kernel-headers-3.10.0-1160.el7.x86_64.rpm
libgcc-4.8.5-44.el7.x86_64.rpm
libgomp-4.8.5-44.el7.x86_64.rpm
libmpc-1.0.1-3.el7.x86_64.rpm
mpfr-3.1.1-4.el7.x86_64.rpm

2.将上述包传输到服务器, 并进入这些包所属目录,并执行rpm -ivh *.rpm --nodeps --force

3.执行gcc -v 验证安装结果

你可能感兴趣的:(linux,运维)