在VULTR VPS的centos 7.3 64位操作系统上解决执行git命令报错 git command not found

导语:为一位客户搭建WEB环境,他购买的是VULTR的VPS,VPS安装了centos 7.3 64位操作系统,不过是最小安装模式安装,导致系统中很多包都没有,叶子使用git克隆文件的时候报错了。

错误提示

叶子从github为客户克隆memcached的php7分支时,出现了“command not found”的错误。下面是错误提示:

# git clone https://github.com/php-memcached-dev/php-memcached -b php7
-bash: git: command not found

在VULTR VPS的centos 7.3 64位操作系统上解决执行git命令报错 git command not found

git命令

解决方法

解决方法很简单,就是使用yum命令下载包来安装,注意,你的服务器必须是连通网络的。

# yum install -y git

在VULTR VPS的centos 7.3 64位操作系统上解决执行git命令报错 git command not found

git命令

git依赖这些包:libgnome-keyring、perl-Error、perl-Git、 perl-TermReadKey。依赖的包会被一起安装。

在VULTR VPS的centos 7.3 64位操作系统上解决执行git命令报错 git command not found

git命令

结束

你学会了吗?其实,有很多包都是可以使用yum安装,前提是你使用CENTOS,连通网络。


Warning: copy(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed in /opt/lampp/htdocs/wordpresssummer/wp-content/themes/summerleaf/inc/summer_setting.php on line 546

Warning: copy(): Failed to enable crypto in /opt/lampp/htdocs/wordpresssummer/wp-content/themes/summerleaf/inc/summer_setting.php on line 546

Warning: copy(https://www.wordpressleaf.com/wp-content/themes/summerleaf/images/tx/38.png): failed to open stream: operation failed in /opt/lampp/htdocs/wordpresssummer/wp-content/themes/summerleaf/inc/summer_setting.php on line 546

发表评论

邮箱地址不会被公开。 必填项已用*标注