Ask Your Question
2

dnf provides usually cannot find anything

asked 2016-06-15 10:37:38 -0500

ring gravatar image

For a long time yum provides was great. I could usually type in yum provides and it would usually find things for me. Enter dnf provides, I find it to be more or less useless. What am I doing wrong?

For example:

dnf provides make
<returns something>

But then:

dnf provides qmake
Error: No Matches found

(but qmake exists and it's installed)

I can test dnf provides with lots of tools and files that I know to be installed and I usually get Error: No Matches found. Seldom does it actually find a tool. This makes dnf provides pretty much useless to me.

dnf provides ping
Error: No Matches found

This problem exists on every Fedora box I have.

dnf provides gcc
<found something>

I know it must be me. What am I doing wrong?

edit retag flag offensive close merge delete

Comments

In my opinion, you are not using the right command option for what you want to do. You are basically searching for a package, so why not using dnf search ..., e.g.: dnf search make, dnf search qmake, , dnf search gcc, or even better dnf search ping returns you iputils even though the command comes from a package with a totally different name.

florian gravatar imageflorian ( 2016-06-15 16:30:04 -0500 )edit

2 Answers

Sort by ยป oldest newest most voted
3

answered 2016-06-15 13:50:54 -0500

skytux gravatar image

In the way you use dnf, it looks for the name of the package, then dnf provides make returns something because it found the package make-1:4.0-5.1.fc23.x86_64. On the other hand, dnf doesn't find ping because there is no package called ping. The executable command called ping belongs to the package iputils-20140519-7.fc23.x86_64. In order to look for executable commands, you should provide the full path, for example dnf provides /usr/bin/ping will find the package it belongs to, i.e., iputils-20140519-7.fc23.x86_64. In this way, if you want to install ping now you know which package to install. HTH.

edit flag offensive delete link more

Comments

And how do you know the full path if the program isn't already installed? We could find packages containing uninstalled programs with yum; isn't it a significant regression that dnf can't?

sideburns gravatar imagesideburns ( 2016-06-15 14:18:21 -0500 )edit

I'm not justifying the behaviour of dnf, only explaining to the user above :-)

skytux gravatar imageskytux ( 2016-06-15 14:25:58 -0500 )edit

OK, fair enough. But wouldn't a regression of this sort deserve being reported as a bug?

sideburns gravatar imagesideburns ( 2016-06-15 14:54:30 -0500 )edit

I agree with you. I think it is worth trying.

skytux gravatar imageskytux ( 2016-06-15 15:25:27 -0500 )edit
1

answered 2016-06-15 13:32:25 -0500

mithrial gravatar image

updated 2016-06-15 13:33:42 -0500

When you specify the full filename with the path you can find it.

dnf provides /usr/bin/ping
dnf provides /usr/bin/qmake-qt4
dnf provides /usr/bin/qmake-qt5

Additionally you can install it right away with

dnf install /usr/bin/qmake-qt4
edit flag offensive delete link more

Comments

That's definitely a little better. I observe that wildcard works too (*). Is this the best we can do? Sometimes we aren't all that sure where the file is supposed to be stored in order to supply the full name.

ring gravatar imagering ( 2016-06-15 13:36:56 -0500 )edit
1

Binary files are usually going into /usr/bin/. You can use asteriks, but you have to escape them, so your shell doesn't expand prior to giving it to dnf: dnf provides "*"/qmake-qt4

mithrial gravatar imagemithrial ( 2016-06-15 14:33:44 -0500 )edit

Another way to escape the asterisk: \*/qmake-qt4

sideburns gravatar imagesideburns ( 2016-06-15 14:53:23 -0500 )edit

Question Tools

2 followers

Stats

Asked: 2016-06-15 10:37:38 -0500

Seen: 3,509 times

Last updated: Jun 15 '16