簡體   English   中英

Yum說:“ wandisco-git-release-6-1.noarch.rpm:不會更新已安裝的軟件包。”

[英]Yum says “wandisco-git-release-6-1.noarch.rpm: does not update installed package.”

我有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-release軟件包,但是版本高於6-1

從這里有兩種方法:

  • 如果需要升級,請找到最新版本的wandisco-git-release
  • 強制降級: yum downgrade http://opensource.wandisco.com/centos/6/git/x86_64/wandisco-git-release-6-1.noarch.rpm

該腳本可幫助我安裝並升級到最新版本的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

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM