yum error
yum clean all
yum clean metadata
yum -y update
---------
yum fail to update
# yum --disablerepo=\* --enablerepo=base,updates update
-----------Install RPM-----------------------------------------
yum -y install net-tools
systemctl stop firewalld.service
systemctl disable firewalld.service
yum -y install nano wget NetworkManager-tui
yum groupinstall "GNOME Desktop" "Graphical Administration Tools"
yum update --security
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY*
yum -y install epel-release
yum install yum-utils && yum install yum-priorities
Error: Rpmdb changed underneath yum Error:rpmdb open failed
resolve RPMdb error while update the yum
1) Check the running and holding processes of rpm database
ps -aufx | grep /var/lib/rpm
2)Delete the temporary DB files:
rm -fv /var/lib/rpm/__*
3) Rebuild your server RPM database using the below command:
rpm --rebuilddb -v -v
rm -fr /var/cache/yum/*
Removing a package without dependencies
# rpm -e vsftpd-2.2.2-11.el6_4.1.i686 --nodeps
yum update or yum install fails with package conflict between 64 bit and 32 bit package architectures
yum install yum-utils
The package-cleanup --dupes lists all duplicate packages:
# package-cleanup --dupes
The package-cleanup --cleandupes removes the duplicates (it asks for a confirmation to remove all duplicates unless the -y switch is given):
# package-cleanup --cleandupes
Edit /etc/yum.conf, set the following line for Red Hat Enterprise Linux 5 and Red Hat Enterprise Linux 6:
exactarch=1
Edit /etc/yum.conf, set the following line for Red Hat Enterprise Linux 7:
exactarchlist=*
Run yum command:
# yum clean all
# yum update
yum error “Cannot retrieve metalink for repository: epel. Please verify its path and try again” updating ContextBroker
# yum --disablerepo=epel -y update ca-certificates
# yum -y upgrade ca-certificates --disablerepo=epel
# sudo sed -i "s/mirrorlist=https/mirrorlist=http/" /etc/yum.repos.d/epel.repo
OR
vi /etc/yum.repos.d/epel.repo
go to line number 4 and change the url from
mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-6&arch=$basearch
To
mirrorlist=http://mirrors.fedoraproject.org/metalink?repo=epel-6&arch=$basearch
--------
Enable CentOS CR (Continuous Release) Repository
# yum install xrdp --enablerepo=cr
# yum install centos-release-cr
# yum update
# yum-config-manager --enable cr
# yum repolist cr
[root@tswl ~]# vi /etc/yum.repos.d/CentOS-CR.repo
---------------------------------------------
[cr]
name=CentOS-$releasever - cr
baseurl=http://mirror.centos.org/centos/$releasever/cr/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
enabled=1
includepkgs=packagename*
~ ------------------------------------
# yum clean all# yum-config-manager --enable cr# yum update
You can then disable the cr repository (if you want) once CentOS 7.4 is out.
If you are on RHEL 7.4, you need to remove the temporary repository:
# yum clean all# rm -f /etc/yum.repos.d/rhel74-temp.repo# yum update
Error: Cannot retrieve metalink for repository: epel. Please verify its path and try again
update ca-certificates package. Before that just disable all repos with https that are failing
yum --disablerepo=epel -y update ca-certificates [BEST Commund]
# yum clean all; yum update --disablerepo=*rpmforge*
OR use command
vi /etc/yum.repos.d/epel.repo
go to line number 4 and change the url from
mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-6&arch=$basearch
to
mirrorlist=http://mirrors.fedoraproject.org/metalink?repo=epel-6&arch=$basearch
yum -y upgrade ca-certificates
yum -y upgrade ca-certificates --disablerepo=epel
Yum--> Processing Dependency: xorg-x11-server-Xorg(x86-64) = 1.20.4 for package: xorgxrdp-0.2.10-4.el7.x86_64
yum -y install https://archive.fedoraproject.org/pub/archive/epel/7/x86_64/Packages/x/xorgxrdp-0.2.9-1.el7.x86_64.rpm
then yum -y install xrdp
# yum install xrdp --enablerepo=cr
http://mirror.vanehost.com/centos/6.10/os/x86_64/ http://mirror.dhakacom.com/centos/6.10/os/x86_64/ http://mirror.myfahim.com/centos/6.10/os/x86_64/ http://mirror.xeonbd.com/centos/6.10/os/x86_64/ http://centos.mirrors.estointernet.in/6.10/os/x86_64/ http://mirrors.piconets.webwerks.in/centos-mirror/6.10/os/x86_64/ http://centos.excellmedia.net/6.10/os/x86_64/ http://centos.mirror.snu.edu.in/centos/6.10/os/x86_64/ http://centos.hbcse.tifr.res.in/centos/6.10/os/x86_64/ http://mirrors.praction.in/centos/6.10/os/x86_64/
Migrate an existing system from RHEL6 or SL6 to CentOS 6
http://mirror.centos.org/centos/6/os/x86_64/Packages/
Download
centos-indexhtml-6-2.el6.centos.noarch.rpm
python-urlgrabber-3.9.1-11.el6.noarch.rpm
yum-plugin-fastestmirror-1.1.30-40.el6.noarch.rpm
centos-release-6-9.el6.12.3.x86_64.rpm
yum-3.2.29-81.el6.centos.noarch.rpm
yum-plugin-keys-1.1.30-40.el6.noarch.rpm
rpm -e --nodeps redhat-release redhat-indexhtml yum remove rhnlib abrt-plugin-bugzilla redhat-release-notes* yum remove subscription-manager rm /etc/yum.repos.d/* rpm -Uvh *.rpm yum clean all yum update
Open the file /etc/yum.repos.d/CentOS-Base.repo in any editor
--------------------------
[base]
name=CentOS-$releasever - Base
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os
#baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/
baseurl=http://vault.centos.org/5.11/os/$basearch
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
[updates]
name=CentOS-$releasever - Updates
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates
#baseurl=http://mirror.centos.org/centos/$releasever/updates/$basearch/
baseurl=http://vault.centos.org/5.11/updates/$basearch
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
[extras]
name=CentOS-$releasever - Extras
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras
#baseurl=http://mirror.centos.org/centos/$releasever/extras/$basearch/
baseurl=http://vault.centos.org/5.11/extras/$basearch
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
------------------------------
CentOS-5 reached end-of-life on March 31, 2017. This means that no new updates will be released by Red Hat. The current 5.11 tree you seek has been moved to vault.centos.org.
To obtain access to the 5.11 branch, edit /etc/yum.repos.d/CentOS-Base.repo and comment out the mirrorlist directives. Furthermore, in each enabled section add baseurl=http://vault.centos.org/5.11/os/$basearch or baseurl=http://vault.centos.org/5.11/updates/$basearch, appropriately. For example, for a baserepo that looks like:
[base] name=CentOS-$releasever - Base mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
...change to:
[base] name=CentOS-$releasever - Base # mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os baseurl=http://vault.centos.org/5.11/os/$basearch gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
Here it is how I managed to fix it:
Create these 3 following files:
Code:
/var/cache/yum/base/mirrorlist.txt /var/cache/yum/extras/mirrorlist.txt /var/cache/yum/updates/mirrorlist.txt
Each of them with following content:
Code:
http://ftp.uninett.no/linux/epel/5/x86_64/ http://centos.uib.no/5.11/os/x86_64/ http://centos.vianett.no/5.11/os/x86_64http://ftp.ember.se/centos/5.11/os/x86_64/ http://ftp.funet.fi/pub/mirrors/centos.org/5.11/os/x86_64/ http://ftp.lysator.liu.se/pub/CentOS/5.11/os/x86_64/ http://ftp.uninett.no/centos/5.11/os/x86_64/ http://mirror.hh.se/centos/5.11/os/x86_64/ http://mirror.nsc.liu.se/CentOS/5.11/os/x86_64/ http://mirror.zetup.net/CentOS/5.11/os/x86_64/ http://mirrors.glesys.net/CentOS/5.11/os/x86_64/ http://centos.mirror.far.fi/5.11/extras/x86_64/ http://centos.uib.no/5.11/extras/x86_64/ http://centos.vianett.no/5.11/extras/x86_64/ http://ftp.ember.se/centos/5.11/extras/x86_64/ http://ftp.lysator.liu.se/pub/CentOS/5.11/ http://ftp.uninett.no/centos/5.11/extras/x86_64/ http://mirror.hh.se/centos/5.11/extras/x86_64/ http://mirror.nsc.liu.se/CentOS/5.11/extras/x86_64/ http://mirror.zetup.net/CentOS/5.11/extras/x86_64/ http://mirrors.glesys.net/CentOS/5.11/extras/x86_64/ http://centos.uib.no/5.11/updates/x86_64/ http://centos.vianett.no/5.11/updates/x86_64/ http://ftp.ember.se/centos/5.11/updates/x86_64/ http://ftp.funet.fi/pub/mirrors/centos.org/5.11/updates/x86_64/ http://ftp.lysator.liu.se/pub/CentOS/5.11/updates/x86_64/ http://ftp.uninett.no/centos/5.11/updates/x86_64/ http://mirror.hh.se/centos/5.11/updates/x86_64/ http://mirror.nsc.liu.se/CentOS/5.11/updates/x86_64/ http://mirror.zetup.net/CentOS/5.11/updates/x86_64/ http://mirrors.glesys.net/CentOS/5.11/updates/x86_64/
Then execute eg.
Code:
yum upgrade perl-DBI
What wonders me:
I have quickly installed CentOS 5.9 on Virtual Machine to find out what should be mirrorlist.txt and it does not exist there.
The list I am showing in this post is taken form history, before I executed: yum clean all
What makes me more wonder is that following also does not work and gives value: Invalid release
Code:
wget "http://mirrorlist.centos.org/?release=5&arch=x86_64&repo=os"
CentOS 5.9 end of life : about a month ago
The main links are here http://vault.centos.org/5.11/
See http://mirror.centos.org/cent
Tried this one and it works
Quote:
echo "http://vault.centos.org/5.11/os/x86_64/" > /var/cache/yum/base/mirrorlist.txt
echo "http://vault.centos.org/5.11/extras/x86_64/" > /var/cache/yum/extras/mirrorlist.txt
echo "http://vault.centos.org/5.11/updates/x86_64/" > /var/cache/yum/updates/mirrorlist.txt
------
centos 6
removing mirrorlist with no valid mirrors: /var/cache/yum/x86_64/6/base/mirrorlist.txt YumRepo Error: All mirror URLs are not using ftp, http[s] or file
[root@localhost ~]# yum update
Loaded plugins: fastestmirrorLoading mirror speeds from cached hostfileYumRepo Error: All mirror URLs are not using ftp, http[s] or file. Eg. </html>/removing mirrorlist with no valid mirrors: /var/cache/yum/i386/6/base/mirrorlist.txtError: Cannot find a valid baseurl for repo: base# vi /etc/yum.repos.d/CentOS-Base.repo
Change all
baseurl=http://mirror.centos.org/centos/$releasever/centosplus/$basearch/
to
baseurl=http://vault.centos.org/$releasever/centosplus/$basearch/
Resolution
To fix this problem you edit /etc/yum.repos.d/CentOS-Base.repo and replace all mirrorlist
1. Go to /etc/yum.repos.d/ directory:
# cd /etc/yum.repos.d/
2. Make copy of original file:
# cp CentOS-Base.repo CentOS-Base.repo.old
3. Open and edit file with any text editor:
# vi CentOS-Base.repo
4. Replace mirrorlist‘s
Replace sections:
[base][updates][extras]With following:
[base]name=CentOS-$releasever - Base# mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os&infra=$infra# baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/baseurl=https://vault.centos.org/6.10/os/$basearch/gpgcheck=1gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6# released updates[updates]name=CentOS-$releasever - Updates# mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates&infra=$infra# baseurl=http://mirror.centos.org/centos/$releasever/updates/$basearch/baseurl=https://vault.centos.org/6.10/updates/$basearch/gpgcheck=1gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
# additional packages that may be useful[extras]name=CentOS-$releasever - Extras# mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras&infra=$infra# baseurl=http://mirror.centos.org/centos/$releasever/extras/$basearch/baseurl=https://vault.centos.org/6.10/extras/$basearch/gpgcheck=1gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
5. Clean yum cache
# yum clean all
6. Run again yum update command:
# yum update
------------------------