RedHat Enterprise Linux 5 GCC 安装流程


由于之前安装RedHat Enterprise Linux 5 时候只安装了服务器环境 没有安装开发环境 导致 服务器 无法 编译 代码

只好重新安装 gcc 了。

       首先想到的是 用 yum 来安装

      运行: yum -y install gcc gcc-c++

      提示 this system is not registered with RHN...

      您的系统没有在红帽网络上注册...

        yum有问题了。。。

        蛋疼ing...

     

       还是 老老实实的 cd 安装。。。

      mount /dev/cdrom /mnt   *将光驱挂在到 mnt目录

      cd /mnt/Server  *进入光驱目录 注意大小写!

     依次执行:


[root@rhel5 Server]# rpm -ivh kernel-headers-2.6.18-53.el5.i386.rpm
[root@rhel5 Server]# rpm -ivh glibc-headers-2.5-18.i386.rpm
[root@rhel5 Server]# rpm -ivh glibc-devel-2.5-18.i386.rpm
[root@rhel5 Server]# rpm -ivh libgomp-4.1.2-14.el5.i386.rpm
[root@rhel5 Server]# rpm -ivh gcc-4.1.2-14.el5.i386.rpm
[root@rhel5 Server]# rpm -ivh libstdc++-devel-4.1.2-14.el5.i386.rpm
[root@rhel5 Server]# rpm -ivh gcc-c++-4.1.2-14.el5.i386.rpm  

 

    安装完毕!

    rpm -q gcc

   提示:

   gcc-4.1.1-52.el5

   安装成功!

相关内容