How to: Using zypper to determine what package contains a certain file

Lets say that you are trying to run a piece of software but it comes up with an error like:

error while loading shared libraries: cannot open shared object file: No such file or directory

You can use zypper to determine what package that library belongs to by using ‘zypper wp’:

# zypper wp
Loading repository data...
Reading installed packages...
S | Name             | Type    | Version    | Arch   | Repository       
 | libpng12-0       | package | 1.2.44-2.1 | x86_64 | openSUSE-11.3-Oss
 | libpng12-0       | package | 1.2.44-2.1 | i586   | openSUSE-11.3-Oss
 | libpng12-0-32bit | package | 1.2.44-2.1 | x86_64 | openSUSE-11.3-Oss

As you can see I need to install libpng12-0 which can easily be done with:

zypper in libpng12-0

Then that application should run fine.

**rpm -qf /usr/lib/**

On 2010-10-04 14:36, please try again wrote:
> Code:
> --------------------
> libpng12-0-32bit-1.2.44-2.1.x86_64
> --------------------

Only if it is already installed.

Cheers / Saludos,

Carlos E. R.
(from 11.2 x86_64 “Emerald” at Telcontar)

Yes. :frowning:
Bold looks capitalized again on nntp.