dnf and yum: can not find package
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.