RedHat AS4上安装yum与gcc详细教程


1.RedHat AS4上如果没有安装yum,就先安装yum
[root@st ~]#wget http://img.bkjia.com/attachments/month_1006/yum_forAS4.tar.gz 下载yum软件
[root@st ~]# tar zxvf yum_forAS4.tar.gz
yum_forAS4/
yum_forAS4/CentOS-Base.repo
yum_forAS4/python-elementtree-1.2.6-7.el4.rf.i386.rpm
yum_forAS4/python-urlgrabber-2.9.7-1.2.el4.rf.noarch.rpm
yum_forAS4/yum-2.4.2-0.4.el4.rf.noarch.rpm
yum_forAS4/sqlite-2.8.16-1.2.el4.rf.i386.rpm
yum_forAS4/python-sqlite-1.0.1-1.2.el4.rf.i386.rpm
[root@st ~]# cd yum_forAS4
[root@st yum_forAS4]# ls
CentOS-Base.repo
python-elementtree-1.2.6-7.el4.rf.i386.rpm
python-sqlite-1.0.1-1.2.el4.rf.i386.rpm
python-urlgrabber-2.9.7-1.2.el4.rf.noarch.rpm
sqlite-2.8.16-1.2.el4.rf.i386.rpm
yum-2.4.2-0.4.el4.rf.noarch.rpm
[root@st yum_forAS4]# rpm -ivh *.rpm
warning: python-elementtree-1.2.6-7.el4.rf.i386.rpm: V3 DSA signature: NOKEY,
key ID 6b8d79e6
Preparing...                ########################################### [100%]
   1:sqlite                 ########################################### [ 20%]
   2:python-sqlite          ########################################### [ 40%]
   3:python-urlgrabber      ########################################### [ 60%]
   4:python-elementtree     ########################################### [ 80%]
   5:yum                    ########################################### [100%]
[root@st yum_forAS4]# cp CentOS-Base.repo /etc/yum.repos.d/
执行如下命令导入GPG Key
[root@st yum_forAS4]# rpm --import http://mirror.centos.org/centos/RPM-GPG-KEY-
CentOS-4
现在yum就可以使用了。
2.安装gcc
[root@st squid-2.5.STABLE10-20050727]# ./configure --prefix=/usr/local/squid
creating cache ./config.cache
checking for a BSD compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for mawk... no
checking for gawk... gawk
checking whether make sets ${MAKE}... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking for gcc... no
checking for cc... no
configure: error: no acceptable cc found in $PATH
注:这个是未安装gcc编辑器的原因
[root@st squid-2.5.STABLE10-20050727]# yum install gcc
-bash: yum: command not found
注:这个是未安装yum的原因
现在开始安装gcc
[root@st yum_forAS4]# yum install gcc
Setting up Install Process
Setting up repositories
update                    100% |=========================|  951 B    00:00   
base                      100% |=========================| 1.1 kB    00:00   
addons                    100% |=========================|  951 B    00:00   
extras                    100% |=========================| 1.1 kB    00:00   
Reading repository metadata in from local files
primary.xml.gz            100% |=========================| 158 kB    00:02   
update    : ################################################## 511/511
Added 511 new packages, deleted 0 old in 4.88 seconds
primary.xml.gz            100% |=========================| 608 kB    00:04   
base      : ################################################## 1591/1591
Added 1591 new packages, deleted 0 old in 13.19 seconds
primary.xml.gz            100% |=========================|  190 B    00:00   
Added 0 new packages, deleted 0 old in 0.01 seconds
primary.xml.gz            100% |=========================|  38 kB    00:01   
extras    : ################################################## 172/172
Added 172 new packages, deleted 0 old in 1.08 seconds
Parsing package install arguments
Resolving Dependencies
--> Populating transaction set with selected packages. Please wait.
---> Downloading header for gcc to pack into transaction set.
gcc-3.4.6-10.i386.rpm     100% |=========================|  44 kB    00:01   
---> Package gcc.i386 0:3.4.6-10 set to be updated
--> Running transaction check
--> Processing Dependency: cpp = 3.4.6-10 for package: gcc
--> Processing Dependency: libgcc >= 3.4.6-10 for package: gcc
--> Processing Dependency: binutils >= 2.15.92.0.2-18 for package: gcc
--> Processing Dependency: glibc-devel >= 2.2.90-12 for package: gcc
--> Restarting Dependency Resolution with new changes.
--> Populating transaction set with selected packages. Please wait.
---> Downloading header for binutils to pack into transaction set.
binutils-2.15.92.0.2-25.i 100% |=========================|  41 kB    00:00   
---> Package binutils.i386 0:2.15.92.0.2-25 set to be updated
---> Downloading header for libgcc to pack into transaction set.
libgcc-3.4.6-10.i386.rpm  100% |=========================|  35 kB    00:00   
---> Package libgcc.i386 0:3.4.6-10 set to be updated
---> Downloading header for glibc-devel to pack into transaction set.
glibc-devel-2.3.4-2.41.el 100% |=========================|  97 kB    00:00   
---> Package glibc-devel.i386 0:2.3.4-2.41.el4_7.1 set to be updated
---> Downloading header for cpp to pack into transaction set.
cpp-3.4.6-10.i386.rpm     100% |=========================|  37 kB    00:00   
---> Package cpp.i386 0:3.4.6-10 set to be updated
--> Running transaction check
--> Processing Dependency: glibc = 2.3.4-2.41.el4_7.1 for package: glibc-devel
--> Processing Dependency: glibc-headers = 2.3.4-2.41.el4_7.1 for package:

  • 1
  • 2
  • 下一页

相关内容