redhat 安装gcc

6 篇文章 0 订阅

因为安装redis 的时候需要安装gcc才能运行

使用redhat7 的iso作为本地源安装步骤如下:

第一挂在 目录 
[root@localhost mnt]# mount /dev/cdrom /mnt 
[root@localhost yum.repos.d]# vi redhat7.repo 
[root@localhost yum.repos.d]# yum clean all  
已加载插件:langpacks, product-id, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
正在清理软件源: rhel-yum
Cleaning up everything
这就安装本地院成功了
redhat7.repo  的配置如下:
[redhat-local-yum]
name=rehat7
baseurl=file:///mnt
enabled=1
gpgcheck=0
[root@localhost yum.repos.d]# yum -y  install gcc gcc-c++
已加载插件:langpacks, product-id, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
redhat-local-yum                                                                                                                                                                                     | 4.1 kB  00:00:00     
(1/2): redhat-local-yum/group_gz                                                                                                                                                                     | 134 kB  00:00:00     
(2/2): redhat-local-yum/primary_db                                                                                                                                                                   | 3.4 MB  00:00:00     
正在解决依赖关系
--> 正在检查事务
---> 软件包 gcc.x86_64.0.4.8.2-16.el7 将被 安装
--> 正在处理依赖关系 cpp = 4.8.2-16.el7,它被软件包 gcc-4.8.2-16.el7.x86_64 需要
--> 正在处理依赖关系 glibc-devel >= 2.2.90-12,它被软件包 gcc-4.8.2-16.el7.x86_64 需要
--> 正在处理依赖关系 libmpc.so.3()(64bit),它被软件包 gcc-4.8.2-16.el7.x86_64 需要
---> 软件包 gcc-c++.x86_64.0.4.8.2-16.el7 将被 安装
--> 正在处理依赖关系 libstdc++-devel = 4.8.2-16.el7,它被软件包 gcc-c++-4.8.2-16.el7.x86_64 需要
--> 正在检查事务
---> 软件包 cpp.x86_64.0.4.8.2-16.el7 将被 安装
---> 软件包 glibc-devel.x86_64.0.2.17-55.el7 将被 安装
--> 正在处理依赖关系 glibc-headers = 2.17-55.el7,它被软件包 glibc-devel-2.17-55.el7.x86_64 需要
--> 正在处理依赖关系 glibc-headers,它被软件包 glibc-devel-2.17-55.el7.x86_64 需要
---> 软件包 libmpc.x86_64.0.1.0.1-3.el7 将被 安装
---> 软件包 libstdc++-devel.x86_64.0.4.8.2-16.el7 将被 安装
--> 正在检查事务
---> 软件包 glibc-headers.x86_64.0.2.17-55.el7 将被 安装
--> 解决依赖关系完成

依赖关系解决

============================================================================================================================================================================================================================
 Package                                                 架构                                           版本                                                 源                                                        大小
============================================================================================================================================================================================================================
正在安装:
 gcc                                                     x86_64                                         4.8.2-16.el7                                         redhat-local-yum                                          16 M
 gcc-c++                                                 x86_64                                         4.8.2-16.el7                                         redhat-local-yum                                         7.1 M
为依赖而安装:
 cpp                                                     x86_64                                         4.8.2-16.el7                                         redhat-local-yum                                         5.9 M
 glibc-devel                                             x86_64                                         2.17-55.el7                                          redhat-local-yum                                         1.0 M
 glibc-headers                                           x86_64                                         2.17-55.el7                                          redhat-local-yum                                         650 k
 libmpc                                                  x86_64                                         1.0.1-3.el7                                          redhat-local-yum                                          51 k
 libstdc++-devel                                         x86_64                                         4.8.2-16.el7                                         redhat-local-yum                                         1.5 M

事务概要
============================================================================================================================================================================================================================
安装  2 软件包 (+5 依赖软件包)

总下载量:32 M
安装大小:80 M
Downloading packages:
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
总计                                                                                                                                                                                         82 MB/s |  32 MB  00:00:00     
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
警告:RPM 数据库已被非 yum 程序修改。
  正在安装    : libmpc-1.0.1-3.el7.x86_64                                                                                                                                                                               1/7 
  正在安装    : cpp-4.8.2-16.el7.x86_64                                                                                                                                                                                 2/7 
  正在安装    : glibc-headers-2.17-55.el7.x86_64                                                                                                                                                                        3/7 
  正在安装    : glibc-devel-2.17-55.el7.x86_64                                                                                                                                                                          4/7 
  正在安装    : gcc-4.8.2-16.el7.x86_64                                                                                                                                                                                 5/7 
  正在安装    : libstdc++-devel-4.8.2-16.el7.x86_64                                                                                                                                                                     6/7 
  正在安装    : gcc-c++-4.8.2-16.el7.x86_64                                                                                                                                                                             7/7 
redhat-local-yum/productid                                                                                                                                                                           | 1.6 kB  00:00:00     
  验证中      : libstdc++-devel-4.8.2-16.el7.x86_64                                                                                                                                                                     1/7 
  验证中      : glibc-headers-2.17-55.el7.x86_64                                                                                                                                                                        2/7 
  验证中      : glibc-devel-2.17-55.el7.x86_64                                                                                                                                                                          3/7 
  验证中      : libmpc-1.0.1-3.el7.x86_64                                                                                                                                                                               4/7 
  验证中      : gcc-c++-4.8.2-16.el7.x86_64                                                                                                                                                                             5/7 
  验证中      : gcc-4.8.2-16.el7.x86_64                                                                                                                                                                                 6/7 
  验证中      : cpp-4.8.2-16.el7.x86_64                                                                                                                                                                                 7/7 

已安装:
  gcc.x86_64 0:4.8.2-16.el7                                                                                  gcc-c++.x86_64 0:4.8.2-16.el7                                                                                 

作为依赖被安装:
  cpp.x86_64 0:4.8.2-16.el7            glibc-devel.x86_64 0:2.17-55.el7            glibc-headers.x86_64 0:2.17-55.el7            libmpc.x86_64 0:1.0.1-3.el7            libstdc++-devel.x86_64 0:4.8.2-16.el7           

完毕!
[root@localhost yum.repos.d]# 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值