LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 02-18-2010, 04:19 PM   #1
pobman
Member
 
Registered: Jun 2005
Location: Wellington, New Zealand
Distribution: Fedora 9
Posts: 31

Rep: Reputation: 16
Best way to find programs not installed by a package manager


Hi peeps,

I am trying to think of the best way to find packages that have been installed by NOT using a package manager.

To find installed packages one would search rpm or pkg DB, but what if the software was installed by a tarball or bin or even compilled.

Anyone got any suggestions on how to script for these, I was hopeing to write a script to find all the third party stuff, I iknow there will be a lot of stuff that gets picked up so what is the best way to get minimise false positves?

Any ideas welcome.
 
Old 02-18-2010, 05:23 PM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 26,944
Blog Entries: 54

Rep: Reputation: 2731Reputation: 2731Reputation: 2731Reputation: 2731Reputation: 2731Reputation: 2731Reputation: 2731Reputation: 2731Reputation: 2731Reputation: 2731Reputation: 2731
The real problem lies in "third party stuff" (which is kind of vague a definition), what the FSSTND / FHS / LSB suggests one should do and how a system is actually managed ("let's dump everything in /srv anyway"). For RH.*L and derivatives a 'find /path/ -type f -print0|xargs -0 -iX rpm -qf 'X' |awk '/not owned/ {print $2}';' could be a start, AFAIK that's 'dpkg -S' for Debian and derivatives. Systems where package management can't even list package contents will obviously s*ck major as you will have no basis to work from whatsoever.
 
Old 02-18-2010, 05:26 PM   #3
CoderMan
Member
 
Registered: Jan 2009
Location: Gemini Capsule 25164
Distribution: Gentoo
Posts: 375
Blog Entries: 24

Rep: Reputation: 43
Well, you can install slocate. With slocate, after installation you can run "updatedb", and then "locate <application name>".
 
0 members found this post helpful.
Old 02-18-2010, 05:26 PM   #4
mattca
Member
 
Registered: Jan 2009
Distribution: Slackware 14.1
Posts: 321

Rep: Reputation: 51
I think if the software wasn't installed via some utility you have to keep track of it yourself. That's part of why people use package managers.

You could just look in your bin dirs and see what's there. Maybe grep -v it against output from your package manager to just see what wasn't installed via the manager.

[Edit: Also, yeah if you just want to find out if a certain package is installed (as opposed to getting a list of all packages that were installed without a manager) locate should do the trick]

Last edited by mattca; 02-18-2010 at 05:28 PM.
 
Old 02-18-2010, 05:35 PM   #5
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Linux Mint
Posts: 8,484

Rep: Reputation: 882Reputation: 882Reputation: 882Reputation: 882Reputation: 882Reputation: 882Reputation: 882
Slackware has
Quote:
src2pkg
which will create a package from the source file.
Then you can use the packagemanager to install.
Don't know for other distro's though
 
Old 02-18-2010, 08:50 PM   #6
pobman
Member
 
Registered: Jun 2005
Location: Wellington, New Zealand
Distribution: Fedora 9
Posts: 31

Original Poster
Rep: Reputation: 16
I know slocate and find quite well, and guessed I hoped for a solution that I may have overlooked.

The problem is I managee several linux servers, and wanted to be able to proivde lists of all the installed software, rpm -qa etc works well for software installed via an RPM but for those odd little besoke packages that some company 10 years ago provided a gz or even zip installer for gets left out, I hope most packages are instlled in the opt dir but you can never be sure.

I could check for files in /bin /sbin etc... and then find what proveds etc but it would take some time to run.
 
Old 02-19-2010, 04:07 AM   #7
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 13,519

Rep: Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495
For new "packages", suggest : use a tool like checkinstall
to create an rpm package.

For all programs available as an SRC RPM source, use rpmbuild.
That would be the most common 15,000 to 20,000 programs.
Or write your own spec file to be used by rpmbuild.
.....
 
Old 02-19-2010, 05:41 AM   #8
cantab
Member
 
Registered: Oct 2009
Location: England
Distribution: *buntu, Vector
Posts: 499

Rep: Reputation: 102Reputation: 102
In general, I guess best way is to make the package manager spit out a list of what it installed, compare that to a directory listing, and show what is in the latter but not the former.
You could do it for the obvious places (namely, the directories in root's $PATH ), or do it for everywhere. (Well, all of /bin, /lib, /sbin, /usr, /var, and /opt )
 
Old 02-19-2010, 06:21 AM   #9
JimBrewster
Member
 
Registered: Feb 2010
Location: usa:/dev/random
Distribution: Slackware, Salix
Posts: 237

Rep: Reputation: 59
Depending on how may packages you are dealing with, you could go back to a build tree and see where "make install" puts things.

I think this is why hand-compiled and installed packages usually default to /usr/local.
 
  


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
applications appearing in package manager as installed but not starting... Siljrath Linux - Newbie 1 12-03-2009 01:35 PM
Programs installed with package manager aren't recognised by other programs fraserm Linux - Software 3 04-21-2007 12:38 PM
RPM package manager says package needs to be installed. But I already installed it! nick623 Linux - Software 2 05-24-2005 02:15 AM
cant find installed programs Skankin Pickle Linux - Newbie 5 08-30-2004 11:59 AM
Can't find where my programs are been installed to??? Stevetgn Linux - Newbie 4 02-06-2004 05:15 PM


All times are GMT -5. The time now is 04:15 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration