Command to see dependencies of a package in Ubuntu

Discussion in 'Open Source' started by vinayasurya, Jun 20, 2006.

Thread Status:
Not open for further replies.
  1. vinayasurya

    vinayasurya New Member

    Joined:
    Jun 12, 2005
    Messages:
    127
    Likes Received:
    0
    Trophy Points:
    0
    Can anyone suggest me a command to view the dependencies needed to install a particular package in the ubuntu. As I don't have a net connection at home i need to download packages. It will be very useful if there is some command to show dependencies needed in that system to install a particular package downloaded. For example if i download xmms.deb , the depencies needed to install it my system.
     
  2. JGuru

    JGuru Well-Known Member

    Joined:
    Dec 25, 2005
    Messages:
    1,726
    Likes Received:
    32
    Trophy Points:
    48
    Location:
    Space-time continuum
    Use Synaptic Package manager. Open a terminal type :
    gksudo /usr/sbin/synaptic . search for the package & if found mark it for installation. Now from the Edit menu -> Apply Marked Changes. Synaptic will
    automatically install the package & its dependencies automatically. So you don't need to worry about anything!!
     
  3. GNUrag

    GNUrag FooBar Guy

    Joined:
    Jun 22, 2004
    Messages:
    1,246
    Likes Received:
    5
    Trophy Points:
    0
    Location:
    Interwebs
    He perhaps knows how to do that. Please read carefully.. He wants to know the dependency tree.

    vinayasurya, You might want to read through this file. /var/lib/apt/lists/us.archive.ubuntu.com_ubuntu_dists_dapper_main_binary-i386_Packages

    In there you'll find different sections
    Code:
    Depends: libart-2.0-2 (>= 2.3.16), libatk1.0-0 (>= 1.9.0), libc6 (>= 2.3.4-1), libcairo2 (>= 1.0.2-2), libenchant1c2a (>= 1.2.0), libfontconfig1 (>= 2.3.0), libfreetype6 (>= 2.1.10-1), libfribidi0 (>= 0.10.7-1), libgcc1 (>= 1:4.0.2), libglade2-0 (>=
    1:2.5.1), libglib2.0-0 (>= 2.10.0), libgnomecanvas2-0 (>= 2.11.1), libgnomeprint2.2-0 (>= 2.12.1), libgnomeprintui2.2-0 (>= 2.12.1), libgtk2.0-0 (>= 2.8.0), libpango1.0-0 (>= 1.12.2), libperl5.8 (>= 5.8.7), libpng12-0 (>= 1.2.8rel), libpopt0 (>= 1.7), libstdc++6 (>= 4.0.2-4), libx11-6, libxcursor1 (>> 1.1.2), libxext6, libxfixes3, libxft2 (>> 2.1.1), libxi6, libxinerama1,
    libxml2 (>= 2.6.24), libxrandr2, libxrender1, zlib1g (>= 1:1.2.1), abiword-common (>= 2.4.1)
    Conflicts: abiword-gtk, abiword-gnome
    
    Above it the output for Abiword.. then you have to find dependencies for libart, libatk.. this is all a pyramid chain.. so if you are willing to identify all the packages and download then separately then, well.. go ahead!!

    There might be a command to view these details, but i dont know of them as yet.. if none exists then i might write a script to do this in near future.
     
    Last edited: Jun 20, 2006
  4. mehulved

    mehulved 18 Till I Die............

    Joined:
    Jul 15, 2004
    Messages:
    5,790
    Likes Received:
    44
    Trophy Points:
    0
    Location:
    India, Mumbai, Marine Lines
    But, GNUrag is dependancy calculated before hand? I mean vinyasurya has said that he doesn't have a internet connection. So, by default not all the repositories are enabled. So, the amount of software that will be shown will be limited. Will all the software in the portage be shown by synaptic without updating the repository?
    Will he only see the softwares and their dependancies that are enabled by default/installed or can he see all? If he can't see all the softwares and their dependancies it won't be of much use.
     
  5. OP
    OP
    vinayasurya

    vinayasurya New Member

    Joined:
    Jun 12, 2005
    Messages:
    127
    Likes Received:
    0
    Trophy Points:
    0
    I think there is some confusion in my question. I will explain. Suppose i want to install xmms. I go to http://packages.ubuntu.com and downloaded the xmms1.2.10+cvs20050809-4ubuntu5.deb package. Then there will be some dependenices right, which are not installed in the default installation and that are not in the ubuntu cdrom. I want to know if there exists any command to show those depedency list that are needed to get the package running in my system so that i can those separately and install. This is because the pacakge manager shows only one dependency at a time and some with different versions little confusing as well. Thanks in advance. The problem is that i can't access net in linux because my modem is not detected.
     
    Last edited: Jun 21, 2006
Thread Status:
Not open for further replies.

Share This Page