Find the answer to your Linux question:
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 11
which command should I use? Can give an explicit example or links to specific examples? Thanks,...
  1. #1
    Just Joined!
    Join Date
    Nov 2011
    Posts
    13

    Unhappy how to search whether a software is installed?

    which command should I use? Can give an explicit example or links to specific examples? Thanks,

  2. #2
    Linux Guru rokytnji's Avatar
    Join Date
    Jul 2008
    Location
    Pecos, Texas
    Posts
    2,943
    In Debian or Ubuntu

    Code:
    @biker:~$ apt-cache policy fluxbox
    fluxbox:
      Installed: 1.3.2-2
      Candidate: 1.3.2-2
      Version table:
     *** 1.3.2-2 0
            901 http://ftp.us.debian.org/debian/ testing/main i386 Packages
            100 /var/lib/dpkg/status
    or look in synaptic package manager. You did not mention what distro you are using by the way.
    Linux Registered User # 475019
    Lead,Follow, or get the heck out of the way
    AntiX,Puppy,Ubuntu,Windows 7=(cuz of scooters)
    Open CourseWare for Linux Geeks

  3. #3
    oz
    oz is offline
    forum.guy
    Join Date
    May 2004
    Location
    arch linux
    Posts
    18,095
    Quote Originally Posted by bsmile View Post
    which command should I use? Can give an explicit example or links to specific examples?
    Hello

    You didn't give any info about which distribution or package tool you've been using, so it will be hard for anyone to answer your question precisely. Can you provide more information?
    oz

    new members/users: read this first | new member faq
    no private messages requesting computer support - post them on the forums!
    please use the "report post" button to alert our forum admins to problematic posts rather than responding to them yourself.

  4. #4
    Just Joined!
    Join Date
    Nov 2011
    Posts
    13
    Thanks for your quick response. Really a newbie here .... linux distribution is CentOS, but general methods to other distribution can also be tried here

  5. #5
    oz
    oz is offline
    forum.guy
    Join Date
    May 2004
    Location
    arch linux
    Posts
    18,095
    For the Red Hat derivatives such as CentOS, you can try the following commands:

    Code:
    rpm -qa | grep package_name*
    yum list installed package_name
    ...or to see all packages:

    Code:
    rpm -qa
    yum list installed
    One or more of those should work for you. Run man yum or man rpm for more details on using the commands.

    Which package are you trying to determine if it's installed?
    oz

    new members/users: read this first | new member faq
    no private messages requesting computer support - post them on the forums!
    please use the "report post" button to alert our forum admins to problematic posts rather than responding to them yourself.

  6. #6
    Just Joined!
    Join Date
    Nov 2011
    Posts
    13
    Quote Originally Posted by ozar View Post
    For the Red Hat derivatives such as CentOS, you can try the following commands:

    Code:
    rpm -qa | grep package_name*
    yum list installed package_name
    ...or to see all packages:

    Code:
    rpm -qa
    yum list installed
    One or more of those should work for you. Run man yum or man rpm for more details on using the commands.

    Which package are you trying to determine if it's installed?
    Thanks, very helpful. I did find out that the needed package is installed, but the problem is now how to find where it is located. The package of interest to me is libjpeg.x86_64

  7. #7
    Linux Guru Irithori's Avatar
    Join Date
    May 2009
    Location
    Munich
    Posts
    2,096
    Code:
    rpm -qvl libjpeg
    You can also define the details you want to see
    e.g:
    Code:
    rpm -q --queryformat "%{NAME} %{SIZE}\n" libjpeg
    This is just an example, there are a lot more tags:
    rpm: Query formats
    You must always face the curtain with a bow.

  8. #8
    Just Joined!
    Join Date
    Nov 2011
    Posts
    13
    Thanks for all your response. I should have googled on my last question first. But here is something I cannot find answers online. I need to locate a specific file --- jpeglib.h (the former are just efforts to locate this file, but failed). I tried "find -name jpeglib.h" but it does not work as it does not get permission to access many locations. So, is there any linux command which could help me to find out possible existence and access the location of this file without triggering alarm on permission stuff? This file should be common library to be related to jpeg graph format, thus accessing this file is fully legal, but I guess that the stupid adminstrator just made find not work here.

  9. #9
    Linux Guru Irithori's Avatar
    Join Date
    May 2009
    Location
    Munich
    Posts
    2,096
    Here is the deal:
    Take back the "stupid administrator"
    and I tell you where that file is, how to find, how to get it, and why the admin did not "...just made find not work here."
    You must always face the curtain with a bow.

  10. #10
    Just Joined!
    Join Date
    Nov 2011
    Posts
    13
    good joking, but does hint me a way out. I have shooted the administrator an email and see how he respond. He is terribly busy, but I think he can locate the file instantly if he gets on doing it.

Page 1 of 2 1 2 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...