yum/repositories is not using sub-folders from source - centos

I'm pretty much new to centOS. I was using Ubuntu for the last years. But I want to build an production openstack environment and switched os for this purpose. Now i have problems to came along with the yum-installer behaviour.
On my centOS system, there is a source-repository-file /etc /yum.repos.d/CentOS-OpenStack-mitaka.repo.
[centos-openstack-mitaka]
name=CentOS-7 - OpenStack mitaka
baseurl=http://mirror.centos.org/centos/7/cloud/$basearch/openstack-mitaka/
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-Cloud
(...)
I tried to install a package out of the repository, which seems to work just fine, but the package need a specific version of a dependency.
Error: Package: 1:python-keystone-9.0.2-1.el7.noarch (centos-openstack-mitaka)
Requires: python-sqlalchemy >= 1.0.10
Available: python-sqlalchemy-0.9.8-1.el7.x86_64 (base)
python-sqlalchemy = 0.9.8-1.el7
Error: Package: python2-oslo-db-4.6.0-1.el7.noarch (centos-openstack-mitaka)
Requires: python-sqlalchemy >= 0.9.9
Installing: python-sqlalchemy-0.9.8-1.el7.x86_64 (base)
python-sqlalchemy = 0.9.8-1.el7
Error: Package: 1:python-keystone-9.0.2-1.el7.noarch (centos-openstack-mitaka)
Requires: python-sqlalchemy >= 1.0.10
Installing: python-sqlalchemy-0.9.8-1.el7.x86_64 (base)
python-sqlalchemy = 0.9.8-1.el7
I was looking for this version, and found it. It is in a subfolder of the specific repository, but it is not used. I don't know why the yum-system does not use the subfolder of the repo. (http://mirror.centos.org/centos/7/cloud/x86_64/openstack-mitaka/common/python-sqlalchemy-1.0.11-1.el7.x86_64.rpm)
Perhaps someone with more experiance with the centOS yum installer can help me with this problem.

Found the answer to this strange (for me it's very strange) behaviour. There is a plugin calles 'priority'. This prevent using a package even if the version is newer because of priorities. I could install my package with a disable parameter.
--disableplugin=
Or even remove (CentOS 7) the plugin with
yum remove yum-plugin-priorities

Related

nodejs-16 dependency issue with libuv

This is what I'm getting on my Amazon Linux 2 instance while trying to run yum update.
Do you suggest I use --skip-broken or wait until AWS rolls out a fix?
--> Processing Dependency: libuv >= 1:1.42.0 for package: 1:nodejs-16.13.2-8.el7.x86_64
--> Finished Dependency Resolution
Error: Package: 1:nodejs-16.13.2-8.el7.x86_64 (epel-testing)
Requires: libuv >= 1:1.42.0
Installed: 1:libuv-1.39.0-1.amzn2.x86_64 (#amzn2-core)
libuv = 1:1.39.0-1.amzn2
Available: 1:libuv-1.23.2-1.amzn2.0.2.i686 (amzn2-core)
libuv = 1:1.23.2-1.amzn2.0.2
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest
Version libuv-1.44.xx is available In amzon linux2 AMI 2022.
For those instances launched before Feb 2022, yum update might be disabled by priorities plugin.
You might see message like 285 packages excluded due to repository priority protections. In this case, you may disable priority plugin and install latest version of libuv. Below commands should help to resolve such case.
yum remove libuv -y
yum install libuv --disableplugin=priorities
Please install libuv from RPM using the below steps:-
yum remove libuv -y
wget https://rpmfind.net/linux/epel/7/x86_64/Packages/l/libuv-1.44.2-1.el7.x86_64.rpm
rpm -i libuv-1.44.2-1.el7.x86_64.rpm
Smooth install of nodejs 16 after that.
Yeah, plus 1 to this issue. OP, the --skip-broken flag will only temporarily fix your currently running servers though. If you're baking any new AMIs or spinning up any new EC2s with Terraform, CDK, etc, that --skip-broken flag won't work as its not available as part of the aws cloud.init script. This will cause any new AMI or EC2 creations to timeout and fail.
One potential work around is to try compiling libuv directly from source as > 1.39 sadly isn't currently available from any linux distro.
I believe the issue is because you are using just multiple yum repos and there is a version mismatch for the latest version of the libuv package (epel-testing and amzn2-core).
What worked for me was to temporarily disable the epel repo, or disable temporarily all yum plugins (set plugins=0 on /etc/yum.conf) and perform the yum upgrade.
The workaround I used for this was to update to a newer version of the base Amazon Linux AMI. The one released on 3/15/2022 has a libuv version of 1.42.0-2 per this doc:
https://docs.aws.amazon.com/linux/al2022/release-notes/all-packages-al2022-20220308.html

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

cloudera-manager-agent.rpm: does not update installed package error

I was installing CM and CDH on CentOS6.9, some errors happended on one of the hosts.
So I want to reinstall cloudera-manager-agent, but failed.
Then I used rpm to reinstall(I had download the rpms), here is the result:
[root#xxx yum.repos.d]# rpm -e cloudera-manager*
error: package cloudera-manager-agent-5.12.0-1.cm5120.p0.120.el6.x86_64.rpm is not installed
error: package cloudera-manager-daemons-5.12.0-1.cm5120.p0.120.el6.x86_64.rpm is not installed
error: package cloudera-manager.repo is not installed
error: package cloudera-manager-server-5.12.0-1.cm5120.p0.120.el6.x86_64.rpm is not installed
error: package cloudera-manager-server-db-2-5.12.0-1.cm5120.p0.120.el6.x86_64.rpm is not installed
[root#vm8034 yum.repos.d]# rpm -U cloudera-manager*
error: cloudera-manager.repo: not an rpm package (or package manifest):
[root#vm8034 yum.repos.d]# rpm -U cloudera-manager*.rpm
package cloudera-manager-daemons-5.12.0-1.cm5120.p0.120.el6.x86_64 is already installed
package cloudera-manager-server-5.12.0-1.cm5120.p0.120.el6.x86_64 is already installed
package cloudera-manager-server-db-2-5.12.0-1.cm5120.p0.120.el6.x86_64 is already installed
package cloudera-manager-agent-5.12.0-1.cm5120.p0.120.el6.x86_64 is already installed
[root#xxx yum.repos.d]# rpm -q cloudera-manager*
package cloudera-manager-agent-5.12.0-1.cm5120.p0.120.el6.x86_64.rpm is not installed
package cloudera-manager-daemons-5.12.0-1.cm5120.p0.120.el6.x86_64.rpm is not installed
package cloudera-manager.repo is not installed
package cloudera-manager-server-5.12.0-1.cm5120.p0.120.el6.x86_64.rpm is not installed
package cloudera-manager-server-db-2-5.12.0-1.cm5120.p0.120.el6.x86_64.rpm is not installed
Try using yum instead of rpm and see if that works:
yum update cloudera-manager*
UPDATE:
Try a yum update. This will search for the available updates of your system and display a list with them. You can check if cloudera is in the list or not.
Then check the official website and see if there is any new version for download:
https://www.cloudera.com/downloads/manager/5-12-0.html
If there is try downloading the package, save it on your server and manually install it:
rpm -Uhv package-version-.rpm
Also you should check the content of /etc/yum.conf for an exclude = option. Usually that's used to exclude certain packages from update. If you find cloudera there, then that's why it will never update that package.

unable to install CPAN using Yum on CentOS 7.3

while trying to install "CPAN" using Yum command [CentOS 7.3(64-bit)] I am getting below error:
---> Package glibc.i686 0:2.17-157.el7 will be installed
--> Processing Dependency: glibc-common = 2.17-157.el7 for package: glibc-2.17-157.el7.i686
---> Package kernel-headers.x86_64 0:3.10.0-514.el7 will be installed
---> Package nss-softokn-freebl.i686 0:3.16.2.3-14.4.el7 will be installed
--> Finished Dependency Resolution
Error: Package: glibc-2.17-157.el7.i686 (cent-7_1-os)
Requires: glibc-common = 2.17-157.el7
Installed: glibc-common-2.17-157.el7_3.4.x86_64 (#updates_latest)
glibc-common = 2.17-157.el7_3.4
Available: glibc-common-2.17-157.el7.x86_64 (cent-7_1-os)
glibc-common = 2.17-157.el7
Now on other hand when in run:
yum install glibc-2.17-157.el7.i686
It shows since I have already updated package:
Package matching glibc-2.17-157.el7.x86_64 already installed. Checking for update
how to work around this? for many of the Perl Modules is throws same error and requires glibc-2.17-157.el7.i686.
Below are list of some modules which throws the error (though there are many other packages which are throwing same error):
yum install perl-ExtUtils-Embed
yum install perl-ExtUtils-ParseXS
yum install perl-ExtUtils-Install
I have also tries to install using source packages, but no success :(
Please guide me if I am asking at wrong platform (No down votes plz)
It worked after changing the yum repo. I have edited the repository:
vim /etc/yum.repos.d/CentOS-Base.repo
And added below lines:
[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
Previously it was :
[cent-7_1-os]
name=CentOS-7_1 - os
#baseurl=http://mhxrpmsrv001sas.dsone.3ds.com/rpms/cent/7_1/$basearch/os/latest/
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os&infra=$infra
enabled=1
gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
priority=1
I think your glibc-common installed is of higher version than required.
first check if there is a version to downgrade to, by
yum list --showduplicates glibc
downgrade the glibc* by
yum downgrade glibc glibc-common glibc-devel glibc-headers
install gcc again
yum install gcc

how to upgrade libvirt?

I'm trying to install openstack on RHEL 6.2. Following installation guide from openstack.org, I'm using the command:
yum install openstack-nova openstack-glance
After resolved many dependencies, I got the final error:
Error: Package: openstack-nova-compute-2012.2.2-1.el6.noarch (epel)
Requires: libvirt >= 0.9.6
Installed: libvirt-0.9.4-23.el6.x86_64 (#anaconda-RedHatEnterpriseLinux-201111171049.x86_64/6.2)
libvirt = 0.9.4-23.el6
I installed libvirt 0.9.4 from the RHEL 6.2 DVD, but it seems I have to upgrade libvirt 0.9.6. How to do the upgrade? Or where can I download libvirt 0.9.6 rpm? Or can I use yum to upgrade libvirt?
You could try searching for the RHEL6 or CentOS 6 rpms from
http://rpm.pbone.net/index.php3?stat=3&limit=1&srodzaj=1&dl=40&search=libvirt&dist[]=74&dist[]=79&dist[]=0&field[]=1&field[]=2
Also, it looks like libvirt has got a lot of dependencies, so after downloading the appropriate libvirt-0.9.xxx.rpm, you could try
yum localinstall libvirt-0.9.xxx.rpm
if even after that you have some dependencies missing, you might want to download them manually like the libvirt rpm itself, managing which can soon start to become a nightmare!