elrepo archive metadata doesn't list kernel-lt as of 2018-10-01 0600 UTC - centos

Anyone seeing problems with the elrepo archive mirrors not able to install or list all available kernels?
yum list available --showduplicates \
--disablerepo=* --enablerepo elrepo-amirror-kernel kernel-lt
Prior to 10 am today / 6 am UTC our artifactory instance could report multiple kernel-lt packages. After whether I use artifactory or go directly to the remote repository I see nothing:
Loading "fastestmirror" plugin
Loading "presto" plugin
Running "config" handler for "presto" plugin
Config time: 0.018
Running "init" handler for "fastestmirror" plugin
Yum Version: 3.2.29
COMMAND: yum list available --showduplicates --disablerepo=* --enablerepo elrepo-amirror-kernel kernel*
Installroot: /
Ext Commands:
available
kernel*
Reading Local RPMDB
rpmdb time: 0.000
Setting up Package Sacks
Running "postreposetup" handler for "fastestmirror" plugin
Loading mirror speeds from cached hostfile
pkgsack time: 0.003
Error: No matching Packages to list
Repo definition
[elrepo-amirror-kernel]
name=ELRepo.org Community Enterprise Linux Kernel Repository - el6
baseurl=http://lon.mirror.rackspace.com/elrepo/archive/kernel/el6/$basearch/
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-elrepo.org
protect=0
Mirrors Tested
http://mirrors.coreix.net/elrepo-archive-archive
http://lon.mirror.rackspace.com/elrepo/archive/kernel
Direct access to repos fails, so it cannot be artifactory.
The following had no impact:
clean all, makecache
rm -rf /var/cache/yum/ and makecache

Well, there may have been a problem with our artifactory instance but this problem above was caused by an exclude for kernels to avoid automatically changing kernel upon reboot.
Adding --disableexcludes=all to the line allow us to see the kernel-lt packages.

Related

Cannot install pglogical

I cannot install pglogical. I'm fallowing this tutorial: https://docs.aws.amazon.com/dms/latest/sbs/chap-manageddatabases.postgresql-rds-postgresql-full-load-pglogical.html#chap-manageddatabases.postgresql-rds-postgresql-full-load-pglogical-replication
And part about pglogical installation has two steps (I'm using postgres 10.4):
curl https://access.2ndquadrant.com/api/repository/dl/default/release/10/rpm | bash
yum install postgresql10-pglogical
I'm getting an error though:
Loaded plugins: extras_suggestions, langpacks, priorities, update-motd
https://dl.2ndquadrant.com/default/release/rpm/packages/amzn/2/x86_64/10/repodata/repomd.xml: [Errno 14] HTTPS Error 404 - Not Found
Trying other mirror.
One of the configured repositories failed (2ndQuadrant packages (PG10) for 2 - x86_64),
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=2ndquadrant-dl-default-release-pg10 ...
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 2ndquadrant-dl-default-release-pg10
or
subscription-manager repos --disable=2ndquadrant-dl-default-release-pg10
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=2ndquadrant-dl-default-release-pg10.skip_if_unavailable=true
failure: repodata/repomd.xml from 2ndquadrant-dl-default-release-pg10: [Errno 256] No more mirrors to try.
https://dl.2ndquadrant.com/default/release/rpm/packages/amzn/2/x86_64/10/repodata/repomd.xml: [Errno 14] HTTPS Error 404 - Not Found
How can I install it?

Limit Yum Repo to Specific package names

I am familiar with creating my own hosted yum repository on a Linux host as well as mirroring public yum repositories. What I am looking for is a solution (paid or free) that will allow me to essentially proxy the Vendor Repo (so packages can remain current) but I would only like to allow specific packages and their dependencies. For example, the repo will allow httpd but also allow users to pull bash, mailcap, shadow-utils, httpd-tools, apr, apr-util, glibc, libdb, expat, lua, pcre, libselinux, systemd-libs, zlib, systems.
Any information would be very useful. I tried limiting via the "/etc/yum.conf" file however it still has the limitation that I know all of the dependencies.
You can exclude specific packages from yum install, example:
# yum install gcc
Dependencies resolved.
===============================================================================================================
Package Architecture Version Repository Size
===============================================================================================================
Installing:
gcc x86_64 8.4.1-1.el8 appstream 23 M
Installing dependencies:
glibc-devel x86_64 2.28-151.el8
if your /etc/yum.conf forbids installation:
[main]
...
exclude=glibc-devel <--- forbid installation
installation fails (proving that glibc-devel was not installed)
$ sudo yum install gcc | grep error
Problem: package gcc-8.4.1-1.el8.x86_64 requires glibc-devel >= 2.2.90-12, but none of the providers can be installed

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 7 - Correctly add local package to yum repository

I'm trying to add a local RPM package to yum and yet install it.
To add it to yum repository I run: yum-config-manager --add-repo file:///path/to/local/package.rpm and then yum install package to install it. However, I got this output:
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
* base: ftp.rrzn.uni-hannover.de
* epel: mirror.23media.de
* extras: centos.mirrors.psw.services
* nux-dextop: mirror.li.nux.ro
* updates: mirror.ratiokontakt.de
harbottle.gitlab.io_harbottle-main_7_x86_64_ | 2.9 kB 00:00:00
file:///path/to/local/package.rpm/repodata/repomd.xml: [Errno 14] curl#37 - "Couldn't open file /path/to/local/package.rpm/repodata/repomd.xml"
Trying other mirror.
One of the configured repositories failed (added from: file:/path/to/local/package.x86_64.rpm),
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=path_to_local_package.x86_64.rpm ...
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 path_to_local_package.x86_64.rpm
or
subscription-manager repos --disable=path_to_local_package.x86_64.rpm
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=path_to_local_package.x86_64.rpm.skip_if_unavailable=true
failure: repodata/repomd.xml from path_to_local_package.x86_64.rpm: [Errno 256] No more mirrors to try.
file:/path/to/local/package.x86_64.rpm/repodata/repomd.xml: [Errno 14] curl#37 - "Couldn't open file /path/to/local/package.rpm/repodata/repomd.xml"
I also tried to first run: yum-config-manager --add-repo file:///path/to/local/package.rpm and then createrepo --database /path/to/local/ but I got the same output.
Does anybody know how to correctly add a local RPM package to the yum repository?
Thanks!
a repository is different from a rpm package. A repository is a directory containing multiple rpms. So if you just want to install your rpm; you can just
yum install /path/to/package.rpm
if you want to start hosting your own repository; then you need to look into createrepo. For example a local directory can be turned into a repository like this:
mkdir /myrepo
cp package.rpm /myrepo
cd /myrepo
createrepo .
now you can add this directory to yum:
yum-config-manager --add-repo file:///myrepo
now you can also keep adding rpms to this directory (don't forget to run createrepo each time).

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.