How to fix "Cannot retrieve repository metadata (repomd.xml)" error installing Ripple - yum - centos

I installed the Ripple rpm repo following documentation
(step 1)
$ sudo rpm -Uvh
https://mirrors.ripple.com/ripple-repo-el7.rpm
Then (step2) I run command:
sudo yum install --enablerepo=ripple-stable rippled
but I get the error:
https://mirrors.ripple.com/rpm/%24releasever/stable/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found"
Trying other mirror.
Error: Cannot retrieve repository metadata (repomd.xml) for repository: ripple-stable. Please verify its path and try again
Does anyone know how to resolve it?

That error message occurs when attempting to install the rippled package on an unsupported environment.
The rippled rpm package is currently only available for CentOS/RHEL 7 (and Ubuntu 15+ using alien)
You could try installing with:
sudo yum install --enablerepo=ripple-stable --releasever=el7 rippled
but YMMV.

\The URL is suspect - it says %24releasever which is URL-encoded $releasever which means your yum isn't filling in that blank, e.g. .../rpm/7/stable/.
Try hard-coding it in the file you can find in /etc/yum.repos.d/ that your step one installed.

Related

Failed to download metadata for repo appstream

Running on centos 8 today want to install new package and before it wants to run:
yum update -y
but got this:
Failed to download metadata for repo 'appstream': Cannot prepare
internal mirrorlist: No URLs in mirrorlist
Then I did search and found a solution to fix it:
sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-*
sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-*
I did this but still error persist, any idea? how to fix this? Is there new solution in 2022?
After use this solution
Now error:
Errors during downloading metadata for repository 'extras':
Status code: 403 for https://vault.centos.org/centos/8/extras/x86_64/os/repodata/repomd.xml
(IP: 13.249.9.66) Error: Failed to download metadata for repo
'extras': Cannot download repomd.xml: Cannot download
repodata/repomd.xml: All mirrors were tried

Couldn't open file /packages/repodata/repomd.xml

I am using Redhat Linux server and trying to install the MongoDB on it.
I am following steps given in the link: https://docs.mongodb.com/manual/tutorial/install-mongodb-on-red-hat/
Step 1: Create a /etc/yum.repos.d/mongodb-org-4.0.repo file so that you can install MongoDB directly, using yum.
sudo nano /etc/yum.repos.d/mongodb-org-4.0.repo
Step 2: Copy and paste below code in the newly created file.
[mongodb-org-4.0]
name=MongoDB Repository
baseurl=https://repo.mongodb.org/yum/redhat/$releasever/mongodb-org/4.0/x86_64/
gpgcheck=1
enabled=1
gpgkey=https://www.mongodb.org/static/pgp/server-4.0.asc
Step 3: To install a specific release of MongoDB, specify each component package individually and append the version number to the package name, as in the following example:
sudo yum install -y mongodb-org
After all this I am getting an error given below:
Loaded plugins: langpacks, product-id, search-disabled-repos, subscription-manager
file:///packages/repodata/repomd.xml: [Errno 14] curl#37 - "Couldn't open file /packages/repodata/repomd.xml"
Trying other mirror.`
One of the configured repositories failed (local),
and yum doesn't have enough cached data to continue. At this point the only
safe thing yum can do is fail. There are a few ways to work "fix" this:`
1. Contact the upstream for the repository and get them to fix the problem.
2. Reconfigure the baseurl/etc. for the repository, to point to a working
upstream. This is most often useful if you are using a newer
distribution release than is supported by the repository (and the
packages for the previous distribution release still work).
3. Run the command with the repository temporarily disabled
yum --disablerepo=localrepo ...
4. Disable the repository permanently, so yum won't use it by default. Yum
will then just ignore the repository until you permanently enable it
again or use --enablerepo for temporary usage:
yum-config-manager --disable localrepo
or
subscription-manager repos --disable=localrepo
5. Configure the failing repository to be skipped, if it is unavailable.
Note that yum will try to contact the repo. when it runs most commands,
so will have to try and fail each time (and thus. yum will be be much
slower). If it is a very temporary problem though, this is often a nice
compromise:
yum-config-manager --save --setopt=localrepo.skip_if_unavailable=true
failure: repodata/repomd.xml from localrepo: [Errno 256] No more mirrors to try.
file:///packages/repodata/repomd.xml: [Errno 14] curl#37 - "Couldn't open file /packages/repodata/repomd.xml"
Server OS
NAME="Red Hat Enterprise Linux Server"
VERSION="7.3 (Maipo)"
ID="rhel"
ID_LIKE="fedora"
VERSION_ID="7.3"
PRETTY_NAME="Red Hat Enterprise Linux"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:redhat:enterprise_linux:7.3:GA:server"
HOME_URL="https://www.redhat.com/"
BUG_REPORT_URL="https://bugzilla.redhat.com/"
REDHAT_BUGZILLA_PRODUCT="Red Hat Enterprise Linux 7"
REDHAT_BUGZILLA_PRODUCT_VERSION=7.3
REDHAT_SUPPORT_PRODUCT="Red Hat Enterprise Linux"
REDHAT_SUPPORT_PRODUCT_VERSION="7.3"
I already followed steps below but these are not working in my case:
sudo rm -rf /etc/yum.repos.d/mongodb-org-4.0.repo
sudo yum clean all
How could i resolve this error?
Based on your error message it looks like you had a nameserver problem, which can involve a variety of solutions as this answer from redhat.com describes. My mongodb-org-4.0.repo file looks just like yours except with version 4.4 and everything worked fine. Well not at first that's how I found this post, but my problem was a blank space I accidentally inserted at the end of the mongodb-org-4.4.repo file.
I found this Unix & Linux Stack Exchange post with some possible fixes, one of which is updating to the latest CentOS. This ServerFault post also had an Errno 14 error message like you're seeing, but this solution was to disable SELinux.
you should check with baseurl in /etc/yum.repos.d/mongodb-org-4.0.repo file. we can also change the releaseserver version in baseurl.
Here is my /etc/yum.repos.d/mongodb-org-4.0.repo file
[mongodb-org-4.0]
name=MongoDB Repository
baseurl=https://repo.mongodb.org/yum/redhat/7/mongodb-org/4.0/x86_64/
gpgcheck=1
enabled=1
gpgkey=https://www.mongodb.org/static/pgp/server-4.0.asc
It works for me.

centos yum fails installing anything or updating system

I am trying to install a package on CentOS, but it throws error when I run the "yum" command. The internet connection is working fine.
I try to yum clean all but problem persist.
Error:
[root#dcos-master3 ~]# yum install ntp
Loaded plugins: fastestmirror
One of the configured repositories failed (Unknown),
and yum doesn't have enough cached data to continue. At this point the only
safe thing yum can do is fail. There are a few ways to work "fix" this:
1. Contact the upstream for the repository and get them to fix the problem.
2. Reconfigure the baseurl/etc. for the repository, to point to a working
upstream. This is most often useful if you are using a newer
distribution release than is supported by the repository (and the
packages for the previous distribution release still work).
3. Run the command with the repository temporarily disabled
yum --disablerepo=<repoid> ...
4. Disable the repository permanently, so yum won't use it by default. Yum
will then just ignore the repository until you permanently enable it
again or use --enablerepo for temporary usage:
yum-config-manager --disable <repoid>
or
subscription-manager repos --disable=<repoid>
5. Configure the failing repository to be skipped, if it is unavailable.
Note that yum will try to contact the repo. when it runs most commands,
so will have to try and fail each time (and thus. yum will be be much
slower). If it is a very temporary problem though, this is often a nice
compromise:
yum-config-manager --save --setopt=<repoid>.skip_if_unavailable=true
Cannot find a valid baseurl for repo: base/$releasever/x86_64
My yum repolist is the next:
[root#dcos-master3 ~]# yum repolist list
Loaded plugins: fastestmirror
https://yum.dockerproject.org/repo/main/centos/%24releasever/repodata/repomd.xml: [Errno 14] HTTPS Error 403 - Forbidden
Trying other mirror.
To address this issue please refer to the below knowledge base article
https://access.redhat.com/solutions/69319
If above article doesn't help to resolve this issue please create a bug on https://bugs.centos.org/
repolist: 0
If I list the repolist:
[root#dcos-master3 ~]# yum repolist
Loaded plugins: fastestmirror
https://yum.dockerproject.org/repo/main/centos/%24releasever/repodata/repomd.xml: [Errno 14] HTTPS Error 403 - Forbidden
Trying other mirror.
To address this issue please refer to the below knowledge base article
https://access.redhat.com/solutions/69319
If above article doesn't help to resolve this issue please create a bug on https://bugs.centos.org/
repo id repo name status
base/$releasever/x86_64 CentOS-$releasever - Base 0
dockerrepo/$releasever Docker Repository 0
extras/$releasever/x86_64 CentOS-$releasever - Extras 0
updates/$releasever/x86_64 CentOS-$releasever - Updates 0
repolist: 0
BEFORE TRYING ANY OF THIS, HAVE A BACKUP OF YOUR MACHINE, YOU COULD DAMAGE YOUR OS MORE/COMPLETELY
It seems that your yum variable $releasever is somehow corrupt,
it usually is caused by missing centos-release package on the machine for some obscure reasons.
You can check if you have the package by:
rpm -qi centos-release
You will probably see:
"package centos-release is not installed"
First find out the exact centos version that you have by executing as root:
cat /etc/redhat-release
You will see something like this:
CentOS Linux release 7.3.1611 (Core)
You can fetch the centos-release package from repo by:
wget http://vault.centos.org/centos/7.3.1611/updates/x86_64/Packages/centos-release-7-3.1611.el7.centos.2.5.x86_64.rpm
Now run reinstall centos-release package via rpm:
sudo rpm -Uvh --replacepkgs centos-release-7-3.1611.el7.centos.2.5.x86_64.rpm
As next you can try to install something with yum and you might get:
[root#dcos-master3 ikerlan]# sudo yum install wget
error: db5 error(-30969) from dbenv->open: BDB0091 DB_VERSION_MISMATCH: Database environment version mismatch
error: cannot open Packages index using db5 - (-30969)
error: cannot open Packages database in /var/lib/rpm
CRITICAL:yum.main:
Error: rpmdb open failed
Now you can try to reboot the machine or try to use the following command to rebuild the rpm db:
rpm --rebuilddb
I came across the same issue while downloading some packages in centos 7. After days of search, I found the solution:
Go to the yum repo directory.
cd /etc/yum.repos.d.
Make a copy of the CentOS-Base.repo file.
cp CentOS-Base.repo CentOS-Base.repo.old
Edit the CentOS-Base.repo file. Comment mirrorlist and uncomment baseurl.
vi CentOS-Base.repo
[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/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
Now when you use yum, do the following.
sudo yum --disablerepo=* --enablerepo=base install httpd
Likewise for yum update.
sudo yum --disablerepo=* --enablerepo=base install httpd
It should work now.
I ran into this problem when attempting to install MariaDB on CentOS 7. I was super frustrated and after much searching found the answer at this link.
Here is what fixed this problem for me. Run as root.
# yum --disablerepo "*" --enablerepo epel install [package]
# yum clean all
"epel" can be whatever repo you like, but this one worked for me. Place [package] in the command just as written, not what package you are trying to install.
After you run the above, exit root and run whatever install you were attempting before encountering the error.
I noticed that in the failing url, your $releasever is %24releasever, but it should be 7 or 7.14.xx. Please check your yum config file at /etc/yum/var, or search in every .repo file, to see what is its value. It may be corrupted.
See Red Hat documentation for more information about how to set these variables.
https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/6/html/deployment_guide/sec-using_yum_variables
yum install http://rpms.remirepo.net/enterprise/remi-release-7.rpm -y
yum -y install yum-utils
yum-config-manager --enable remi-php74
Then proceed to your installation/updates/etc
Always make sure NAT is active on your centos7. Specially when there is a VMnet2 for host. Because sometimes VMNet2 can be active instead of NAT and because of that you will not be able to connect to the internet through centos7. This is just a one reason for getting that error.

How to fix installation error of missing dependencies (libmysqlclient_16) for Sphinx search 2.2.10 on RedHat/Centos 6.7 in cPanel/WHM

On my VPS mediatemple server with cPanel/whm, I've tried every which way installing Sphinx with yum as well as doing rpm -Uvc with a local download.
And it always returns these errors:
Error: Package: sphinx-2.2.10-1.rhel6.i386 (/sphinx-2.2.10-1.rhel6.i386)
Requires: libmysqlclient.so.16(libmysqlclient_16)
Error: Package: sphinx-2.2.10-1.rhel6.i386 (/sphinx-2.2.10-1.rhel6.i386)
Requires: libmysqlclient.so.16
I can see that I have these files are located at /usr/lib64/libmysqlclient.so.16, but it keeps throwing this error. I read that I was missing MySQL-community-libs-compat files, I tried but MySQL installation is handled through cpanel and got conflicting notices.
I had previously installed Sphinx 2.2.9 wiht no issues, and went ahead and removed it to upgrade. Now I can't install anything. No Bueno!
Can anyone help??
Did you try ?
yum install mysql mysql-devel mysql-lib
Always install local packages using yum , e.g. yum local install LocalPackage.rpm. Yum can handle package dependencies.
Remove sphinx and reinstall using yum localinstall .

yum update error on centos server

I tried to run "yum update" on my server but it gives me an error. Below is part of the output when I type "yum update"
--> Running transaction check
---> Package libtidy.i686 0:0.99.0-19.20070615.1.el6 will be installed
---> Package php-common.i686 0:5.3.3-46.el6_6 will be installed
---> Package pytalloc.i686 0:2.0.7-2.el6 will be installed
http://mirror01.idc.hinet.net/EPEL/6/i386/repodata/5d15e6d6e1b58456584beb7bbb0b6 46495aff0da11b1211c208afbddf9a73eed-filelists.sqlite.bz2: [Errno 14] PYCURL ERRO R 22 - "The requested URL returned error: 404 Not Found"
Trying other mirror.
http://ftp.jaist.ac.jp/pub/Linux/Fedora/epel/6/i386/repodata/5d15e6d6e1b58456584 beb7bbb0b646495aff0da11b1211c208afbddf9a73eed-filelists.sqlite.bz2: [Errno 14] P YCURL ERROR 22 - "The requested URL returned error: 404 Not Found"
Trying other mirror.
Then, I tried typing "yum clean all" thinking it would solve my problem. However, it became worst, it gives me another error message and doesn't even show any package that will be installed. (See below).
Loaded plugins: fastestmirror, refresh-packagekit, replace, security
Loading mirror speeds from cached hostfile
Error: Cannot retrieve metalink for repository: epel. Please verify its path and try again
How do I fix this?
Solved by removing all php and reinstalling it again using yum install php php-common.