LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-06-2008, 05:59 PM   #1
cy163
LQ Newbie
 
Registered: Jun 2007
Posts: 23

Rep: Reputation: 15
Can I check if a binary packageinstalled program has been installed using prm -q xxxx


Hello ALL,


If I installed a program from binary package (*.tar.gz), then does it make sense i use 'rpm -q xxxx' to check its existence on the system.


Thanks

Last edited by cy163; 08-06-2008 at 06:01 PM.
 
Old 08-06-2008, 06:03 PM   #2
jay73
LQ Guru
 
Registered: Nov 2006
Location: Belgium
Distribution: Ubuntu 11.04, Debian testing
Posts: 5,019

Rep: Reputation: 133Reputation: 133
As a rule, that won't work. rpm -q queries the rpm database. You may want to consider packing up your binaries in rpm format to make this work.
 
Old 08-06-2008, 06:06 PM   #3
cy163
LQ Newbie
 
Registered: Jun 2007
Posts: 23

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by jay73 View Post
As a rule, that won't work. rpm -q queries the rpm database. You may want to consider packing up your binaries in rpm format to make this work.
Thanks Jay73,
Then, Can I conclude that a program MUST have been installed by using a rpm package if I can check it using 'rpm -q xxxx'?
 
Old 08-06-2008, 06:42 PM   #4
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Virginia, USA
Distribution: Debian 12
Posts: 8,337

Rep: Reputation: 548Reputation: 548Reputation: 548Reputation: 548Reputation: 548Reputation: 548
rpm -q xxxx

will show that the package is recorded in the rpm data base as being installed by rpm. You can check whether the files actually exist using:

rpm --verify xxxx

-----------------
Steve Stites

Last edited by jailbait; 08-06-2008 at 06:44 PM.
 
Old 08-06-2008, 06:51 PM   #5
jay73
LQ Guru
 
Registered: Nov 2006
Location: Belgium
Distribution: Ubuntu 11.04, Debian testing
Posts: 5,019

Rep: Reputation: 133Reputation: 133
Non-rpm programs can be queried using
which program_name
or
whereis program_name.
Bear in mind that both commands check only your PATH so if the program was installed in an out-of-the-way location, they won't be found, whether they are installed or not. That can be solved by doing some editing on your path variable (or linking the binary to a location that does belong to the path).
 
Old 08-06-2008, 08:38 PM   #6
lazlow
Senior Member
 
Registered: Jan 2006
Posts: 4,363

Rep: Reputation: 172Reputation: 172
When it really can get ugly is when both an rpm version and a compiled version are installed. Which part belongs to which install can be a horrid mess to clean up. In the long run one is usually better off taking the extra step of building your own rpm and installing it.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how to see which libraries a binary program needs r00tb33r Linux - Software 4 02-23-2008 05:22 AM
Is there a way to check what are the compile options of a binary package? Akhran Debian 1 12-09-2005 10:03 AM
How to check installed program in system? gmitra Programming 2 01-30-2005 03:22 PM
hi.. im new and having problem with prm instalition New In Linux 11 Linux - Software 4 07-23-2004 11:06 AM
comand to check if program is installed or not? awlad Linux - Newbie 10 05-18-2003 09:34 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:58 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration