【Docker实战之入门】错误:-bash: git: command not found 安装Git

前端之家收集整理的这篇文章主要介绍了【Docker实战之入门】错误:-bash: git: command not found 安装Git前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

使用git clone命令时,出错-bash: git: command not found

安装git如下

[root@Optimus /]# yum install -y git
Loaded plugins: fastestmirror,refresh-packagekit,security
Setting up Install Process
Loading mirror speeds from cached hostfile
epel/Metalink                                                          | 7.1 kB     00:00     
          * base: mirrors.btte.net
          * epel: mirrors.ustc.edu.cn
          * extras: mirrors.btte.net
          * updates: mirrors.btte.net
base                                                                   | 3.7 kB     00:00     
extras                                                                 | 3.4 kB     00:00     
Nginx                                                                  | 2.9 kB     00:00     
updates                                                                | 3.4 kB     00:00     
Resolving Dependencies
--> Running transaction check
---> Package git.x86_64 0:1.7.1-9.el6_9 will be installed
--> Processing Dependency: perl-Git = 1.7.1-9.el6_9 for package: git-1.7.1-9.el6_9.x86_64
--> Processing Dependency: perl(Git) for package: git-1.7.1-9.el6_9.x86_64
--> Processing Dependency: perl(Error) for package: git-1.7.1-9.el6_9.x86_64
--> Running transaction check
---> Package perl-Error.noarch 1:0.17015-4.el6 will be installed
---> Package perl-Git.noarch 0:1.7.1-9.el6_9 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

==============================================================================================
Package Arch Version Repository Size

Installing:
git x86_64 1.7.1-9.el6_9 updates 4.6 M
Installing for dependencies:
perl-Error noarch 1:0.17015-4.el6 base 29 k
perl-Git noarch 1.7.1-9.el6_9 updates 29 k

Transaction Summary

Install 3 Package(s)

Total download size: 4.7 M
Installed size: 15 M
Downloading Packages:
(1/3): git-1.7.1-9.el6_9.x86_64.rpm | 4.6 MB 00:32
(2/3): perl-Error-0.17015-4.el6.noarch.rpm | 29 kB 00:00
(3/3): perl-Git-1.7.1-9.el6_9.noarch.rpm | 29 kB 00:00

Total 143 kB/s | 4.7 MB 00:33
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : 1:perl-Error-0.17015-4.el6.noarch 1/3
Installing : git-1.7.1-9.el6_9.x86_64 2/3
Installing : perl-Git-1.7.1-9.el6_9.noarch 3/3
Verifying : 1:perl-Error-0.17015-4.el6.noarch 1/3
Verifying : git-1.7.1-9.el6_9.x86_64 2/3
Verifying : perl-Git-1.7.1-9.el6_9.noarch 3/3

Installed:
git.x86_64 0:1.7.1-9.el6_9

Dependency Installed:
perl-Error.noarch 1:0.17015-4.el6 perl-Git.noarch 0:1.7.1-9.el6_9

Complete!
[root@Optimus /]#

猜你在找的Git相关文章