You can try adding the repo of your company manually. Add a new file named /etc/yum.repos.d/mycompany.repo
Add the following entry to that file.
[mycompany]
name=MyCompany Repo
baseurl=http://repo.mycompany.com/rhel8-x86_64/latest/RPMS.all
enabled=1
gpgcheck=0
After that, run yum clean all && yum update. If you are able to use the first repo, add another repo entry in the same file in another block. It should work.
Ref: https://www.redhat.com/sysadmin/add-yum-repository
In the reference, they've verified the manual entry using yum-config-manager. Since it is not preinstalled in Docker container, just skip the verification part.
If you face any issue while running this solution, feel free to paste the errors. To revert back, simply delete /etc/yum.repos.d/mycompany.repo file and run yum clean all && yum update.
[Question] Can't install specific yum package in clean Redhat Docker image?
Yum and dnf not find any package
yum-config-manager isn't always installed
fedora - dnf and yum: can not find package - Unix & Linux Stack Exchange
Hi everyone,
I'm messing around with trying to install MariaDb on Redhat. I'm starting from an empty Docker image (redhat/ubi8:latest) e and following the instructions here: https://mariadb.com/resources/blog/how-to-install-mariadb-on-rhel8-centos8/
When I get to the step:
sudo yum install perl-DBI libaio libsepol lsof boost-program-options
I get: Error: Unable to find a match: boost-program-options
I have tried adding this package repository that I found using Google: http://sodium.resophonic.com/boost-cmake/1.40.0.cmake0/
I did this with:
yum install -y yum-utils yum-config-manager --add-repo="http://sodium.resophonic.com/boost-cmake/1.40.0.cmake0/"
But then I get the following error:
Errors during downloading metadata for repository 'sodium.resophonic.com_boost-cmake_1.40.0.cmake0_': - Curl error (6): Couldn't resolve host name for http://sodium.resophonic.com/boost-cmake/1.40.0.cmake0/repodata/repomd.xml [Could not resolve host: sodium.resophonic.com] Error: Failed to download metadata for repo 'sodium.resophonic.com_boost-cmake_1.40.0.cmake0_': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried
I've been at this for the good part of an hour, and couldn't understand how to fix this problem. Any help would be greatly appreciated. Thanks!
yum repolist will display the active repo list, I suspect the packages your looking for are not in the base/update/extras repositories and you may need to add additional repositories.
A good way to find out is to google search the package your looking for to get an idea of repository you need to have setup or install.
A lot of repositories do have a RPM file that will install the repository for your or a "how to" for adding the repository.
Examples below
Red Hat has made the documentation free to read
9.5.2. Setting [repository] Options
IUS repo setup
IUS Getting Started
yum repolist example:
Loaded plugins: fastestmirror, ovl
Determining fastest mirrors
* base: mirror.its.sfu.ca
* extras: mirror.it.ubc.ca
* updates: centos.mirror.rafal.ca
base | 3.6 kB 00:00:00
extras | 3.4 kB 00:00:00
updates | 3.4 kB 00:00:00
(1/4): base/7/x86_64/group_gz | 166 kB 00:00:00
(2/4): extras/7/x86_64/primary_db | 150 kB 00:00:00
(3/4): updates/7/x86_64/primary_db | 3.6 MB 00:00:00
(4/4): base/7/x86_64/primary_db | 5.9 MB 00:00:01
repo id repo name status
base/7/x86_64 CentOS-7 - Base 9911
extras/7/x86_64 CentOS-7 - Extras 314
updates/7/x86_64 CentOS-7 - Updates 946
repolist: 11171
Have you tried yum search packageName ?
I have seen similar behavior from two other causes, DNS is not working or the cache is corrupted.
On that machine can you ping a host by name? i.e. ping google.com ?
If that works, try a yum clean all and then try to install your package when it is done.
Hi everyone,
My Rocky Linux server is deployed on GCP.
An application I am trying to install requires the 'mod_auth_openidc' package.
Somehow a "dnf install mod_auth_openidc" outputs this:
output for "dnf install mod_auth_openidc"I was a little surprised by this and checked different mirrors, and all of them seemed to have the package available, for example:
http://dl.rockylinux.org/pub/rocky/8.5/AppStream/x86_64/os/Packages/m/
mod_auth_openidc is in the repos
Meanwhile, for example, mod_auth_gssapi, which appears on the screenshot above, is listed as available:
output for 'dnf info mod_auth_gssapi'Here's my appstream repo file, for reference.
My appstream repo fileCould anyone explain what is going on ?
Centos has done it for you.
Create a repo file in /etc/yum.repos.d as
vi /etc/yum.repos.d/myrepo.repo
Then paste this in this file:
[centos]
name=CentOS-7
baseurl=http://ftp.heanet.ie/pub/centos/7/os/x86_64/
enabled=1
gpgcheck=1
gpgkey=http://ftp.heanet.ie/pub/centos/7/os/x86_64/RPM-GPG-KEY-CentOS-7
Saving it with wq! now run
yum repolist
Check if you can install any package (say nmap)
yum install nmap -y
Enjoy!!!
Red Hat doesn't use the /etc/yum.repos.d directory for official packages so the answer won't be in there. It will use the subscription plugin placed in /etc/yum/pluginconf.d.
You mentioned that the RHEL host is new. You will need to make sure your subscription is valid or yum will fail silently.
You can use the subscription-manager list command to gain info regarding subscriptions.