我有Centos 6.7并运行此命令
sudo yum install http://opensource.wandisco.com/centos/6/git/x86_64/wandisco-git-release-6-1.noarch.rpm
我得到了这个输出:
Loaded plugins: fastestmirror, post-transaction-actions
Setting up Install Process
wandisco-git-release-6-1.noarch.rpm | 4.5 kB 00:00
Examining /var/tmp/yum-root-UthqQc/wandisco-git-release-6-1.noarch.rpm: wandisco-git-release-6-1.noarch
/var/tmp/yum-root-UthqQc/wandisco-git-release-6-1.noarch.rpm: does not update installed package.
Error: Nothing to do
此软件包在/etc/yum.repo.d/中只有一个.repo文件。为什么百胜拒绝安装它?
答案 0 :(得分:1)
因为显然已经安装了包 wandisco-git-release ,但其版本高于 6-1 。
这里有两种方法:
yum downgrade http://opensource.wandisco.com/centos/6/git/x86_64/wandisco-git-release-6-1.noarch.rpm
答案 1 :(得分:0)
此脚本可帮助我安装并升级到最新版本的Git和WANdisco yum回购安装。 回购网址:https://github.com/saifulislamrokon/deployment/blob/master/installgit
#!/bin/bash
centosversion=`rpm -qa \*-release | grep -Ei "oracle|redhat|centos" | cut -d"-" -f3`
echo "######################################################################################################"
echo "CentOS $centosversion server detected, Git 2* will install and configre as per centos $centosversion"
echo "######################################################################################################"
if [ $centosversion -eq "6" ]; then
echo
echo "# Git YUM repo installing as per Centos 6"
echo
yum install -y http://opensource.wandisco.com/centos/6/git/x86_64/wandisco-git-release-6-1.noarch.rpm
echo
echo "Congratulations Wandisco YUM repo installed Successfully on the system "
echo
echo "Now installing Git on $hostname server"
yum install git -y
yum update git -y
fi
if [ $centosversion -eq "7" ]; then
echo
echo "# Git YUM repo installing as per Centos 7"
echo
yum install -y http://opensource.wandisco.com/centos/7/git/x86_64/wandisco-git-release-7-2.noarch.rpm
echo
echo "Now installing Git on $hostname server"
yum install git -y
yum update git -y
fi
clear
echo "GIT Latest version installed Successfully"
git --version
echo "Thanks :: Saiful Islam Rokon Akon"
exit 0