注册 登录  
 加关注
   显示下一条  |  关闭
温馨提示!由于新浪微博认证机制调整,您的新浪微博帐号绑定已过期,请重新绑定!立即重新绑定新浪微博》  |  关闭

守望

路越远,心越近。有多远,走多远!

 
 
 

日志

 
 

用yum给CentOS安装gcc  

2011-10-16 21:57:16|  分类: 工具使用 |  标签: |举报 |字号 订阅

  下载LOFTER 我的照片书  |
昨天在平板电脑(无光驱无网络)上装了个CentOS6 minimal版,然后发现里面连个
gcc都没有,得自己装,然后发现依赖的包一个都没有,用rpm一个一个装得烦死,还
理不清!

Yum简介

Yum(全称为 Yellow dog Updater, Modified)是一个在Fedora和RedHat以及SUSE、
CentOS中的Shell前端软件包管理器。基於RPM包管理,能够从指定的服务器自动下载
RPM包并且安装,可以自动处理依赖性关系,并且一次安装所有依赖的软体包,无须繁
琐地一次次下载、安装。

使用过程记录下:
1.  将CentOS6 DVD镜像中的所有rpm安装包拷贝到电脑
2.  进入rpm包所在目录,安装yum仓库建立工具
     #rpm -ivh libxml2-python-2.7.6-1.el6.i686.rpm
     #rpm -ivh python-deltarpm-3.5-0.5.20090913git.el6.i686.rpm
     上面两个是依赖,这个才是:#rpm -ivh createrepo-0.9.8-4.el6.noarch.rpm
3.  建立软件包仓库(rpm包所在目录)
     #createrepo ./
      等待命令之行完成,生成目录./repodata, 其内的repomd.xml是最终产品
4.  配置yum服务端
     #vi /etc/yum.repos.d/server.repo
      内容如下:
      [CentOSRepository]
      name=CentOS
      baseurl=file:///root/CentOS/Packages
      enabled=1
      gpgcheck=0

      图简单,删除了系统原来自带的CentOS-Base.repo
5.  安装gcc rpm包
     #yum localinstall --nogpgcheck gcc-4.4.4-13.el6.i686.rpm
     localinstall指定本地安装(安装包在本地)
     一开始没有加--nogpgcheck选项,结果没装上,据说是redhat的bug,不深究。

     以下是安装过程的控制台信息:
[root@localhost Packages]# yum localinstall --nogpgcheck gcc-4.4.4-13.el6.i686.rpm
Loaded plugins: fastestmirror, presto
Setting up Local Package Process
Examining gcc-4.4.4-13.el6.i686.rpm: gcc-4.4.4-13.el6.i686
Marking gcc-4.4.4-13.el6.i686.rpm to be installed
Loading mirror speeds from cached hostfile
Resolving Dependencies
--> Running transaction check
---> Package gcc.i686 0:4.4.4-13.el6 set to be updated
--> Processing Dependency: cpp = 4.4.4-13.el6 for package: gcc-4.4.4-13.el6.i686
--> Processing Dependency: libgomp = 4.4.4-13.el6 for package: gcc-4.4.4-13.el6.i686
--> Processing Dependency: cloog-ppl >= 0.15 for package: gcc-4.4.4-13.el6.i686
--> Processing Dependency: glibc-devel >= 2.2.90-12 for package: gcc-4.4.4-13.el6.i686
--> Processing Dependency: libgomp.so.1 for package: gcc-4.4.4-13.el6.i686
--> Running transaction check
---> Package cloog-ppl.i686 0:0.15.7-1.2.el6 set to be updated
--> Processing Dependency: libppl_c.so.2 for package: cloog-ppl-0.15.7-1.2.el6.i686
--> Processing Dependency: libppl.so.7 for package: cloog-ppl-0.15.7-1.2.el6.i686
---> Package cpp.i686 0:4.4.4-13.el6 set to be updated
--> Processing Dependency: libmpfr.so.1 for package: cpp-4.4.4-13.el6.i686
---> Package glibc-devel.i686 0:2.12-1.7.el6 set to be updated
--> Processing Dependency: glibc-headers = 2.12-1.7.el6 for package: glibc-devel-2.12-1.7.el6.i686
--> Processing Dependency: glibc-headers for package: glibc-devel-2.12-1.7.el6.i686
---> Package libgomp.i686 0:4.4.4-13.el6 set to be updated
--> Running transaction check
---> Package glibc-headers.i686 0:2.12-1.7.el6 set to be updated
--> Processing Dependency: kernel-headers >= 2.2.1 for package: glibc-headers-2.12-1.7.el6.i686
--> Processing Dependency: kernel-headers for package: glibc-headers-2.12-1.7.el6.i686
---> Package mpfr.i686 0:2.4.1-6.el6 set to be updated
---> Package ppl.i686 0:0.10.2-11.el6 set to be updated
--> Running transaction check
---> Package kernel-headers.i686 0:2.6.32-71.el6 set to be updated
--> Finished Dependency Resolution
 
Dependencies Resolved
 
===============================================================
 Package                                  Arch                           Version                                  Repository                                        Size
===============================================================
Installing:
 gcc                                      i686                           4.4.4-13.el6                             /gcc-4.4.4-13.el6.i686                            15 M
Installing for dependencies:
 cloog-ppl                                i686                           0.15.7-1.2.el6                           CentOSRepository                                  93 k
 cpp                                      i686                           4.4.4-13.el6                             CentOSRepository                                 3.4 M
 glibc-devel                              i686                           2.12-1.7.el6                             CentOSRepository                                 960 k
 glibc-headers                            i686                           2.12-1.7.el6                             CentOSRepository                                 599 k
 kernel-headers                           i686                           2.6.32-71.el6                            CentOSRepository                                 965 k
 libgomp                                  i686                           4.4.4-13.el6                             CentOSRepository                                 110 k
 mpfr                                     i686                           2.4.1-6.el6                              CentOSRepository                                 153 k
 ppl                                      i686                           0.10.2-11.el6                            CentOSRepository                                 1.3 M
 
Transaction Summary
==============================================================
Install       9 Package(s)
Upgrade       0 Package(s)
 
Total size: 23 M
Total download size: 7.4 M
Installed size: 34 M
Is this ok [y/N]: y
Downloading Packages:
Setting up and reading Presto delta metadata
Processing delta metadata
Package(s) data still to download: 7.4 M
-------------------------------------------------------------------------------------------------------
Total                                                                                                                                     29 MB/s | 7.4 MB     00:00    
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Warning: RPMDB altered outside of yum.
  Installing     : ppl-0.10.2-11.el6.i686                                                                                                                            1/9
  Installing     : cloog-ppl-0.15.7-1.2.el6.i686                                                                                                                     2/9
  Installing     : mpfr-2.4.1-6.el6.i686                                                                                                                             3/9
  Installing     : cpp-4.4.4-13.el6.i686                                                                                                                             4/9
  Installing     : libgomp-4.4.4-13.el6.i686                                                                                                                         5/9
  Installing     : kernel-headers-2.6.32-71.el6.i686                                                                                                                 6/9
  Installing     : glibc-headers-2.12-1.7.el6.i686                                                                                                                   7/9
  Installing     : glibc-devel-2.12-1.7.el6.i686                                                                                                                     8/9
  Installing     : gcc-4.4.4-13.el6.i686                                                                                                                             9/9
 
Installed:
  gcc.i686 0:4.4.4-13.el6                                                                                                                                               
 
Dependency Installed:
  cloog-ppl.i686 0:0.15.7-1.2.el6   cpp.i686 0:4.4.4-13.el6   glibc-devel.i686 0:2.12-1.7.el6   glibc-headers.i686 0:2.12-1.7.el6   kernel-headers.i686 0:2.6.32-71.el6 
  libgomp.i686 0:4.4.4-13.el6       mpfr.i686 0:2.4.1-6.el6   ppl.i686 0:0.10.2-11.el6        
 
Complete!



  评论这张
 
阅读(6650)| 评论(0)
推荐 转载

历史上的今天

评论

<#--最新日志,群博日志--> <#--推荐日志--> <#--引用记录--> <#--博主推荐--> <#--随机阅读--> <#--首页推荐--> <#--历史上的今天--> <#--被推荐日志--> <#--上一篇,下一篇--> <#-- 热度 --> <#-- 网易新闻广告 --> <#--右边模块结构--> <#--评论模块结构--> <#--引用模块结构--> <#--博主发起的投票-->
 
 
 
 
 
 
 
 
 
 
 
 
 
 

页脚

网易公司版权所有 ©1997-2017