Centos 百胜说;wandisco-git-release-6-1.noarch.rpm:不更新已安装的软件包;

Centos 百胜说;wandisco-git-release-6-1.noarch.rpm:不更新已安装的软件包;,centos,rpm,yum,Centos,Rpm,Yum,我有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.r

我有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文件。为什么百胜拒绝安装它?

因为显然已经安装了wandisco git发行版软件包,但版本高于6-1

这里有两种方法:

  • 如果需要升级,请查找更新版本的wandisco git release
  • 强制降级:
    yum降级http://opensource.wandisco.com/centos/6/git/x86_64/wandisco-git-release-6-1.noarch.rpm

此脚本帮助我安装并升级到Git和WANdisco yum repo安装的最新版本。 回购网址:


我刚刚运行了“sudo yum info”=>错误:没有要列出的匹配包。结果是没有安装这样的软件包?这就是检查本地安装的软件包的方式。您应该运行
rpm-q wandisco-git发行版
,或者
rpm-qa | grep wandisco
…我可以在rpm-qa | grep wandisco中找到这个包。用rpm-e将其拆下。再次运行了yum安装,它成功了。
#!/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