2

I had no problem installing any package with dnf or yum but after a while, with these commands:

sudo -c 'yum(or dnf) install [package name]'
sudo yum(or dnf) install [package name]

i get this error:

Last metadata expiration check: 0:01:34 ago on Thu 05 Jul 2018 12:27:36 AM +0430.
No match for argument: [package name]
Error: Unable to find a match

i get with every package i try to install. any solution?

  • what repositories do you have enabled? is it a package from epel? – thebtm Jul 4 '18 at 20:24
  • @thebtm i don't know.i haven't touch anything but i'm sure the packages are available. – Faramarz Jul 4 '18 at 20:27
  • 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. – thebtm Jul 4 '18 at 20:34
1

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
1

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.

  • yes, actually i didn't know fedoras repositories does not support some packages which ubuntu does. searched and found that there's a RPM Fusion which support those packages (like MPV or Mocp) and need to be installed. – Faramarz Jul 5 '18 at 9:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.