LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   rpm - how to search for packages? (https://www.linuxquestions.org/questions/linux-newbie-8/rpm-how-to-search-for-packages-736668/)

eskaiem 06-30-2009 07:17 AM

rpm - how to search for packages?
 
Hi,,

(My distro is OpenSuse 11.x)

I'd like to use the rpm on the command line to install a package.

I know how to check for installed RPMs:

rpm -a | grep <pacakge>

and I know how to install an RPM:

rpm -ivh <package>

But I don't know the full package name (e.g. Apache, PHP, MySQL) from the default OpenSuse repository.

How could I search the available packages that came with my OpenSuse distro?

Many Thanks

mrrangerman 06-30-2009 07:22 AM

I don't use .rpm but I think you want to use the -qa option for query all. Just do a man search man rpm in a terminal.

Edit: Just use -q

eskaiem 06-30-2009 07:27 AM

thanks, although rpm -qa only queries installed packages

I have checked the manual for rpm (man rpm), but there doesn't seem to be anything to search or view available packages for install.

Perhaps i'm missing something - or I need to check somewhere else to see what available packages there are in my distro

Cheers

knudfl 06-30-2009 10:13 AM

The command line tool for dealing with the
Suse repo's is 'zypper'

Search : # zypper se <name> ( or part of name ).
Install : # zypper in <package>
which will download and install the package +
all dependencies.

Please run 'man zypper' for more options.
.....

eskaiem 06-30-2009 11:19 AM

perfect, thanks :)


All times are GMT -5. The time now is 11:51 AM.