12

As i run these commands to install any packages with yum or dnf:

> 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

Any solution?

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

3 Answers 3

5

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
4

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.

1
  • 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. Commented Jul 5, 2018 at 9:36
1

I also encountered this issue and observed the following instructions after installing node:

curl -sL https://dl.yarnpkg.com/rpm/yarn.repo | sudo tee /etc/yum.repos.d/yarn.repo
sudo dnf install yarn

Check installation with

yarn -v
1
  • Can you update this answer? It's 2023 and it's not working anymore Commented May 2, 2023 at 1:45

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.