Need help understanding repositories

I am working through some curriculum on learning Linux, in it they showed using the locate command but I could not get it to run in OpenSuse. I did some research and discovered that it is not installed by default. I tried using Yast to install “findutils-locate” and it had trouble with what looked like updating it’s database ebut eventually finished, I searched for “findutil” in what I believe is called the Software Manager. I was in the “Add-on Product” screen and clicked on the “Run Software Manager” so now I can see findutils in the RPM Groups -> Productivity -> File utilities but I was still unable to get locate to run on the command line. I found this forum and a post by wolfi323 in which he wrote

It is not installed by default anymore.

But you can easily install it by typing:
sudo zypper in findutils-locate

So I ran that on the command line and now it works. I see that it says “findutils-locate” which I was unable to find in the Software Manager. So, what am I doing wrong? What should I have searched for? and what is zypper?

Thanks in advance,

zypper se findutils-locate

No matching items found.

zypper in findutils-locate

The following 2 NEW packages are going to be installed:
mlocate mlocate-lang

I don’t know why zypper se findutils-locate fails to find it.

zypper info --provides mlocate

Information for package mlocate:
Repository     : openSUSE-Leap-42.3-0                
Name           : mlocate                             
Version        : 0.26-25.1                           
Arch           : x86_64                              
Vendor         : openSUSE                            
Installed Size : 143.5 KiB                           
Installed      : No                                  
Status         : not installed                       
Source package : mlocate-0.26-25.1.src               
Summary        : An utility for finding files by name
Description    :                                     
    A new locate implementation. The m character
    stands for merging, because updatedb reuses the
    existing database to avoid re-reading most of the
    file system.
Provides       : [5]                                 
    config(mlocate) = 0.26-25.1
    **findutils-locate** = 5.0.26
    mlocate = 0.26-25.1
    mlocate(x86-64) = 0.26-25.1
zypper se --provides findutils-locate
S | Name    | Summary                              | Type   
  | mlocate | An utility for finding files by name | package

So, mlocate was what I should’ve been looking for in the Software Manager?

what is zypper?

yast, yast2 and zypper all use zypp.

man zypper

I wouldn’t say “should’ve” – how were you supposed to know that?

You could’ve:

zypper se --provides findutils-locate


In the YaST2 package manager there is a checkbox for “RPM Provides” under the search tab.

Thank you for the help, I have so much to learn…:frowning:

Cheat sheets can help. :cool:

Because your reference was very old. The packaging for this utility changed sometime between openSUSE-11.4 (2011) and 13.1 (2013).


Simply running the command in the terminal should show you some useful info. For example the program locate.

if 'locate' is not a typo you can use command-not-found to lookup the package that contains it, like this:
    **cnf locate**

Now you have some info about the command is not found and then it tells you what to do next.

cnf locate

The output would be something like this.

The program 'locate' can be found in the following package:
  * mlocate  path: /usr/bin/locate, repository: zypp (repo-oss) ]

Try installing with:
    sudo zypper install mlocate

Although even if you don’t know the exact package/program name you can still use zypper.

zypper se locate

Loading repository data...
Reading installed packages...

S | Name                      | Summary                                    | Type   
  | libfallocate-devel        | Header and devel files for libfallocate    | package
  | libfallocate-devel-static | Static library for libfallocate            | package
  | libfallocate0             | Filesystem preallocation interface library | package
  | mlocate                   | An utility for finding files by name       | package
  | mlocate-lang              | Languages for package mlocate              | package
  | vim-plugin-locateopen     | Edit file without entering the whole path  | package

Not very precise but still the Summary column can tell what/which program is it.

When I search for packages, I stick to the lowest common denominator. I would recommend ‘zypper se locate’.

You can also search the package descriptions to, default searches names only, with:
‘zypper se -d locate’