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:
Code:
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,
Gary

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]                                 
    findutils:/usr/bin/locate
    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.

https://en.opensuse.org/Portal:Libzypp

man zypper

https://en.opensuse.org/Portal:Zypper

https://en.opensuse.org/SDB:Zypper_manual

https://doc.opensuse.org/documentation/leap/reference/html/book.opensuse.reference/cha.sw_cl.html

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:

https://en.opensuse.org/images/1/17/Zypper-cheat-sheet-1.pdf

https://github.com/openSUSE/artwork/blob/master/Marketing%20Materials/Cheat%20Cube/Zypper/Zypper-cheat-sheet-2.pdf

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

Hi,

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

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’