git command not found

[root@isstech001 ~]# git
-bash: git: command not found


yum安装
[root@isstech001 ~]# yum install -y git 已加载插件:fastestmirror 设置安装进程 Loading mirror speeds from cached hostfile file:///mnt/cdrom/repodata/repomd.xml: [Errno 14] Could not open/read file:///mnt/cdrom/repodata/repomd.xml 尝试其他镜像。 解决依赖关系 --> 执行事务检查 ---> Package git.x86_64 0:1.7.1-3.el6_4.1 will be 安装 --> 处理依赖关系 perl-Git = 1.7.1-3.el6_4.1,它被软件包 git-1.7.1-3.el6_4.1.x86_64 需要 --> 处理依赖关系 rsync,它被软件包 git-1.7.1-3.el6_4.1.x86_64 需要 --> 处理依赖关系 perl(Git),它被软件包 git-1.7.1-3.el6_4.1.x86_64 需要 --> 处理依赖关系 perl(Error),它被软件包 git-1.7.1-3.el6_4.1.x86_64 需要 --> 执行事务检查 ---> Package perl-Error.noarch 1:0.17015-4.el6 will be 安装 ---> Package perl-Git.noarch 0:1.7.1-3.el6_4.1 will be 安装 ---> Package rsync.x86_64 0:3.0.6-12.el6 will be 安装 --> 完成依赖关系计算 依赖关系解决 ========================================================================================================================== 软件包 架构 版本 仓库 大小 ========================================================================================================================== 正在安装: git x86_64 1.7.1-3.el6_4.1 Centos-source-local 4.6 M 为依赖而安装: perl-Error noarch 1:0.17015-4.el6 Centos-source-local 29 k perl-Git noarch 1.7.1-3.el6_4.1 Centos-source-local 28 k rsync x86_64 3.0.6-12.el6 Centos-source-local 335 k 事务概要 ========================================================================================================================== Install 4 Package(s) 总下载量:5.0 M Installed size: 15 M 下载软件包: 下载软件包出错: 1:perl-Error-0.17015-4.el6.noarch: failure: Packages/perl-Error-0.17015-4.el6.noarch.rpm from Centos-source-local: [Errno 256] No more mirrors to try. rsync-3.0.6-12.el6.x86_64: failure: Packages/rsync-3.0.6-12.el6.x86_64.rpm from Centos-source-local: [Errno 256] No more mirrors to try. perl-Git-1.7.1-3.el6_4.1.noarch: failure: Packages/perl-Git-1.7.1-3.el6_4.1.noarch.rpm from Centos-source-local: [Errno 256] No more mirrors to try. git-1.7.1-3.el6_4.1.x86_64: failure: Packages/git-1.7.1-3.el6_4.1.x86_64.rpm from Centos-source-local: [Errno 256] No more mirrors to try.

挂载镜像
[root@isstech001 ~]# mount /dev/cdrom /mnt/cdrom/ mount: block device /dev/sr0 is write-protected, mounting read-only

再次通过yum安装
[root@isstech001 ~]# yum install -y git 已加载插件:fastestmirror 设置安装进程 Loading mirror speeds from cached hostfile Centos-source-local | 4.0 kB 00:00 ... 解决依赖关系 --> 执行事务检查 ---> Package git.x86_64 0:1.7.1-3.el6_4.1 will be 安装 --> 处理依赖关系 perl-Git = 1.7.1-3.el6_4.1,它被软件包 git-1.7.1-3.el6_4.1.x86_64 需要 --> 处理依赖关系 rsync,它被软件包 git-1.7.1-3.el6_4.1.x86_64 需要 --> 处理依赖关系 perl(Git),它被软件包 git-1.7.1-3.el6_4.1.x86_64 需要 --> 处理依赖关系 perl(Error),它被软件包 git-1.7.1-3.el6_4.1.x86_64 需要 --> 执行事务检查 ---> Package perl-Error.noarch 1:0.17015-4.el6 will be 安装 ---> Package perl-Git.noarch 0:1.7.1-3.el6_4.1 will be 安装 ---> Package rsync.x86_64 0:3.0.6-12.el6 will be 安装 --> 完成依赖关系计算 依赖关系解决 ========================================================================================================================== 软件包 架构 版本 仓库 大小 ========================================================================================================================== 正在安装: git x86_64 1.7.1-3.el6_4.1 Centos-source-local 4.6 M 为依赖而安装: perl-Error noarch 1:0.17015-4.el6 Centos-source-local 29 k perl-Git noarch 1.7.1-3.el6_4.1 Centos-source-local 28 k rsync x86_64 3.0.6-12.el6 Centos-source-local 335 k 事务概要 ========================================================================================================================== Install 4 Package(s) 总下载量:5.0 M Installed size: 15 M 下载软件包: -------------------------------------------------------------------------------------------------------------------------- 总计 18 MB/s | 5.0 MB 00:00 运行 rpm_check_debug 执行事务测试 事务测试成功 执行事务 正在安装 : 1:perl-Error-0.17015-4.el6.noarch 1/4 正在安装 : rsync-3.0.6-12.el6.x86_64 2/4 正在安装 : perl-Git-1.7.1-3.el6_4.1.noarch 3/4 正在安装 : git-1.7.1-3.el6_4.1.x86_64 4/4 Verifying : git-1.7.1-3.el6_4.1.x86_64 1/4 Verifying : perl-Git-1.7.1-3.el6_4.1.noarch 2/4 Verifying : 1:perl-Error-0.17015-4.el6.noarch 3/4 Verifying : rsync-3.0.6-12.el6.x86_64 4/4 已安装: git.x86_64 0:1.7.1-3.el6_4.1 作为依赖被安装: perl-Error.noarch 1:0.17015-4.el6 perl-Git.noarch 0:1.7.1-3.el6_4.1 rsync.x86_64 0:3.0.6-12.el6 完毕!

  

转载于:https://www.cnblogs.com/RHadoop-Hive/p/10172552.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值