LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
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, 06: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 07:01 PM.
 
Old 08-06-2008, 07:03 PM   #2
jay73
LQ Guru
 
Registered: Nov 2006
Location: Belgium
Distribution: Ubuntu 11.04, Debian testing
Posts: 5,019

Rep: Reputation: 130Reputation: 130
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, 07: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, 07:42 PM   #4
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Blue Ridge Mountain
Distribution: Debian Jessie, Linux Mint 17
Posts: 7,789

Rep: Reputation: 292Reputation: 292Reputation: 292
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 07:44 PM.
 
Old 08-06-2008, 07:51 PM   #5
jay73
LQ Guru
 
Registered: Nov 2006
Location: Belgium
Distribution: Ubuntu 11.04, Debian testing
Posts: 5,019

Rep: Reputation: 130Reputation: 130
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, 09:38 PM   #6
lazlow
Senior Member
 
Registered: Jan 2006
Posts: 4,362

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


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 06:22 AM
Is there a way to check what are the compile options of a binary package? Akhran Debian 1 12-09-2005 11:03 AM
How to check installed program in system? gmitra Programming 2 01-30-2005 04:22 PM
hi.. im new and having problem with prm instalition New In Linux 11 Linux - Software 4 07-23-2004 12:06 PM
comand to check if program is installed or not? awlad Linux - Newbie 10 05-18-2003 10:34 PM


All times are GMT -5. The time now is 07:30 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration