Chinaunix首页 | 论坛 | 博客
  • 博客访问: 29335502
  • 博文数量: 2065
  • 博客积分: 10377
  • 博客等级: 上将
  • 技术积分: 21525
  • 用 户 组: 普通用户
  • 注册时间: 2008-11-04 17:50
文章分类

全部博文(2065)

文章存档

2012年(2)

2011年(19)

2010年(1160)

2009年(969)

2008年(153)

分类: LINUX

2011-01-05 22:57:36

以下以Red Hat Linux AS 4.6(或者CentOS 4.6)为例,来安装GCC,请按照从上到下的顺序进行,已测试通过!

glibc-kernheaders-2.4-9.1.100.EL.i386.rpm
glibc-headers-2.3.4-2.39.i386.rpm
glibc-devel-2.3.4-2.39.i386.rpm
compat-gcc-32-3.2.3-47.3.i386.rpm
compat-libstdc++-33-3.2.3-47.3.i386.rpm
compat-gcc-32-c++-3.2.3-47.3.i386.rpm
cpp-3.4.6-9.i386.rpm
gcc-3.4.6-9.i386.rpm
libstdc++-devel-3.4.6-9.i386.rpm
gcc-c++-3.4.6-9.i386.rpm
libf2c-3.4.6-9.i386.rpm
gcc-g77-3.4.6-9.i386.rpm
libgnat-3.4.6-9.i386.rpm
gcc-gnat-3.4.6-9.i386.rpm
zlib-devel-1.2.1.2-1.2.i386.rpm
atk-1.8.0-2.i386.rpm
libart_lgpl-2.3.16-3.i386.rpm
pango-1.6.0-9.i386.rpm
gtk2-2.4.13-22.i386.rpm
libgcj-3.4.6-9.i386.rpm
libgcj-devel-3.4.6-9.i386.rpm
gcc-java-3.4.6-9.i386.rpm
libobjc-3.4.6-9.i386.rpm
gcc-objc-3.4.6-9.i386.rpm
libgcc-3.4.6-9.i386.rpm

我自己用的是CentOS 4.6的DVD光盘,直接编写一个简单的脚本,让它自动按照顺序执行安装这些软件包,省了不少力气!

#!/bin/bash
rpm -ivh /media/cdrom/CentOS/RPMS/glibc-kernheaders-2.4-9.1.100.EL.i386.rpm
rpm -ivh /media/cdrom/CentOS/RPMS/glibc-headers-2.3.4-2.39.i386.rpm
rpm -ivh /media/cdrom/CentOS/RPMS/glibc-devel-2.3.4-2.39.i386.rpm
rpm -ivh /media/cdrom/CentOS/RPMS/compat-gcc-32-3.2.3-47.3.i386.rpm
rpm -ivh /media/cdrom/CentOS/RPMS/compat-libstdc++-33-3.2.3-47.3.i386.rpm
rpm -ivh /media/cdrom/CentOS/RPMS/compat-gcc-32-c++-3.2.3-47.3.i386.rpm
rpm -ivh /media/cdrom/CentOS/RPMS/cpp-3.4.6-9.i386.rpm
rpm -ivh /media/cdrom/CentOS/RPMS/gcc-3.4.6-9.i386.rpm
rpm -ivh /media/cdrom/CentOS/RPMS/libstdc++-devel-3.4.6-9.i386.rpm
rpm -ivh /media/cdrom/CentOS/RPMS/gcc-c++-3.4.6-9.i386.rpm
rpm -ivh /media/cdrom/CentOS/RPMS/libf2c-3.4.6-9.i386.rpm
rpm -ivh /media/cdrom/CentOS/RPMS/gcc-g77-3.4.6-9.i386.rpm
rpm -ivh /media/cdrom/CentOS/RPMS/libgnat-3.4.6-9.i386.rpm
rpm -ivh /media/cdrom/CentOS/RPMS/gcc-gnat-3.4.6-9.i386.rpm
rpm -ivh /media/cdrom/CentOS/RPMS/zlib-devel-1.2.1.2-1.2.i386.rpm
rpm -ivh /media/cdrom/CentOS/RPMS/atk-1.8.0-2.i386.rpm
rpm -ivh /media/cdrom/CentOS/RPMS/libart_lgpl-2.3.16-3.i386.rpm
rpm -ivh /media/cdrom/CentOS/RPMS/pango-1.6.0-9.i386.rpm
rpm -ivh /media/cdrom/CentOS/RPMS/gtk2-2.4.13-22.i386.rpm
rpm -ivh /media/cdrom/CentOS/RPMS/libgcj-3.4.6-9.i386.rpm
rpm -ivh /media/cdrom/CentOS/RPMS/libgcj-devel-3.4.6-9.i386.rpm
rpm -ivh /media/cdrom/CentOS/RPMS/gcc-java-3.4.6-9.i386.rpm
rpm -ivh /media/cdrom/CentOS/RPMS/libobjc-3.4.6-9.i386.rpm
rpm -ivh /media/cdrom/CentOS/RPMS/gcc-objc-3.4.6-9.i386.rpm
rpm -ivh /media/cdrom/CentOS/RPMS/libgcc-3.4.6-9.i386.rpm

将以上内容保存为脚本文件,然后添加执行权限后执行即可!
注:/media/cdrom 为光驱挂载的文件目录!

说明:虚拟机开启挂载cdrom为4.6的安装ISO就行。

阅读(2388) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~