LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 07-08-2007, 05:26 PM   #1
AriciU
Member
 
Registered: Jul 2007
Location: Bucharest, Romania
Distribution: Ubuntu 7.04, Slackware 12
Posts: 87

Rep: Reputation: 15
How to find out if you have a specific package installed?


What is the command? For example......... check if you have python.

$ whereis python

?
 
Old 07-08-2007, 05:28 PM   #2
erklaerbaer
Member
 
Registered: Mar 2006
Posts: 381

Rep: Reputation: 30
which python if you are looking for the binary
ls /var/log/packages/ if you are looking for the package
 
Old 07-08-2007, 10:58 PM   #3
kite
Member
 
Registered: Aug 2003
Location: Shenzhen, China
Distribution: Slackware
Posts: 301

Rep: Reputation: 47
bash-3.1$ ls /var/log/packages/ |grep python
python-2.5.1-i486-1
bash-3.1$

I put the following lines into $HOME/.bashrc, so every time I only need to do "spkg xxx" (partial name is working too) to see whether a package is installed or not (note: I am a newbie to shell scripting):

Code:
##### A simple package search script #####
##### for installed slackware packages ######
spkg() {
read keyword
echo "+==========================+"
echo "|Here is the search result:|"
echo "+==========================+"
ls /var/log/packages |grep $1 
if [ $? -eq 1 ]
then
echo "The package(s) NOT FOUND"
fi
}
 
  


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
pkg-config can't find installed package JAKK Slackware 16 08-11-2008 09:07 AM
How to find if package is installed Redbone981sl Ubuntu 4 01-23-2007 06:03 PM
installed firefox package on slackware 10.0, i can't find it salviadud Slackware 10 03-04-2005 09:22 PM
How to find the complete path of an installed package samik Linux - Newbie 1 10-26-2003 02:19 PM
Can't find package Red Hat Update Agent installed poison5151 Linux - Software 4 04-12-2003 11:40 AM


All times are GMT -5. The time now is 10:17 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