【问题标题】:Yum says "wandisco-git-release-6-1.noarch.rpm: does not update installed package."Yum 说“wandisco-git-release-6-1.noarch.rpm:不更新已安装的软件包。”
【发布时间】:2018-11-27 17:58:08
【问题描述】:

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

【问题讨论】:

    标签: centos rpm yum


    【解决方案1】:

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

    这里有两种方式:

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

    【讨论】:

    • 我刚刚运行了“sudo yum info opensource.wandisco.com/centos/6/git/x86_64/…” => 错误:没有要列出的匹配包。原来没有安装这样的包?
    • 这就是您现在检查本地安装的软件包的方式。你应该运行rpm -q wandisco-git-release,或rpm -qa | grep wandisco...
    • 我用 rpm -qa | 找到了这个包grep 万迪斯科。使用 rpm -e 将其删除。再次运行 yum 安装,它成功了。
    【解决方案2】:

    这个脚本帮助我安装和升级到最新版本的 Git 和 WANdisco yum repo 安装。 回购地址: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
    

    【讨论】:

      猜你喜欢
      • 2021-05-13
      • 2017-10-23
      • 2021-06-04
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多