Welcome to Linux Forums! With a comprehensive Linux Forum, information on various types of Linux software and many Linux Reviews articles, we have all the knowledge you need a click away, or accessible via our knowledgeable members.
Find the answer to your Linux question:
New to Linux Forums? Register here for free!
    Linux Forums > Your Distro > Ubuntu Help > Command to see dependencies of a package in Ubuntu

Forgot Password?
 Ubuntu Help   Discussion and help about Ubuntu, Kubuntu, Xubuntu, and all the Ubuntu family

Site Navigation
Linux Articles
Linux Forums
Linux Downloads
Linux Hosting
Free Magazines
Job Board
IRC Chat
RSS Feeds


Linux Forum Topics
Linux Forums
Your Distro
Linux Resources
GNU Linux Zone
The Community
Closed Thread
 
Thread Tools Display Modes
Old 06-20-2006   #1 (permalink)
Just Joined!
 
Join Date: Jun 2006
Posts: 15
Command to see dependencies of a package in Ubuntu

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
vinayasurya is offline  


Old 06-20-2006   #2 (permalink)
Just Joined!
 
Join Date: Apr 2006
Posts: 97
Code:
dpkg-deb -I file
Be wary of which architectures you're downloading.

Here's the output for Firefox 1.5.0.1 i386:
Code:
bforbes@ben:~$ dpkg-deb -I packages/firefox_1.5.dfsg+1.5.0.1-1ubuntu12_i386.deb
 new debian package, version 2.0.
 size 7895392 bytes: control archive= 14274 bytes.
     348 bytes,    10 lines      conffiles
    1333 bytes,    18 lines      control
   32563 bytes,   428 lines      md5sums
    1002 bytes,    30 lines   *  postinst             #!/bin/sh
     293 bytes,     8 lines   *  postrm               #!/bin/sh
    2134 bytes,    60 lines   *  preinst              #!/bin/sh
     805 bytes,    23 lines   *  prerm                #!/bin/sh
 Package: firefox
 Version: 1.5.dfsg+1.5.0.1-1ubuntu12
 Section: web
 Priority: optional
 Architecture: i386
 .
Depends: fontconfig, psmisc, debianutils (>= 1.16), libatk1.0-0 (>= 1.9.0), libc6 (>= 2.3.4-1), libcairo2 (>= 1.0.2-2), libfontconfig1 (>= 2.3.0), libfreetype6 (>= 2.1.10-1), libgcc1 (>= 1:4.0.2), libglib2.0-0 (>= 2.10.0), libgtk2.0-0 (>= 2.8.0), libidl0, libjpeg62, libpango1.0-0 (>= 1.12.1), libpng12-0 (>= 1.2.8rel), libstdc++6 (>= 4.0.2-4), libx11-6, libxcursor1 (>> 1.1.2), libxext6, libxfixes3, libxft2 (>> 2.1.1), libxi6, libxinerama1, libxrandr2, libxrender1, libxt6, zlib1g (>= 1:1.2.1), libnspr4 (>= 2:1.firefox1.5.dfsg+1.5.0.1-1ubuntu12), libnss3 (>= 2:1.firefox1.5.dfsg+1.5.0.1-1ubuntu12)
 Suggests: firefox-gnome-support (= 1.5.dfsg+1.5.0.1-1ubuntu12), latex-xft-fonts, libthai0
 Conflicts: mozilla-firefox (<< 1.5.dfsg+1.5.0.1-1ubuntu12)
 Replaces: mozilla-firefox (<< 1.5.dfsg+1.5.0.1-1ubuntu12)
 Provides: www-browser, mozilla-firefox
 Installed-Size: 22848
 Maintainer: Eric Dorland <eric@debian.org>
 Description: lightweight web browser based on Mozilla
  Firefox is a redesign of the Mozilla browser component, similar to
  Galeon, K-Meleon and Camino, but written using the XUL user interface
  language and designed to be lightweight and cross-platform.
  .
  This browser was previously known as Firebird and Phoenix.
Those dependencies may be available for different architectures.
bforbes is offline  
Old 06-21-2006   #3 (permalink)
Just Joined!
 
Join Date: Jun 2006
Posts: 15
Thanks, one more question. This command shows full depedency list for package installed in system right. My question is suppose i downloaded xmms package. I want to install it . Then there will be some dependencies needed to install which are not installated in the default installation, right. Plz tell me some way to the dependecy list to make the pacakge running on my system.
vinayasurya is offline  
Old 06-21-2006   #4 (permalink)
Just Joined!
 
Join Date: Apr 2006
Posts: 97
You just need to find .deb files for each dependency. You should be able to find them here:

http://www.debian.org/distrib/packages

For example, let's look at the dependencies of xmms.
Code:
Depends: libc6 (>= 2.3.4-1), libglib1.2 (>= 1.2.0), libgtk1.2 (>= 1.2.10-4), libice6, libsm6, libssl0.9.7, libx11-6, libxext6, libxi6
I just searched for libc6 and found this:
http://packages.debian.org/stable/base/libc6

Just get each one and install them. If they have dependencies, do the same process recursively.
bforbes is offline  
Old 06-21-2006   #5 (permalink)
Just Joined!
 
Join Date: Jun 2006
Posts: 15
Some of those dependencies is there in a installed system. How can I know what all dependency packages to download.
vinayasurya is offline  
Old 06-21-2006   #6 (permalink)
Just Joined!
 
Join Date: Apr 2006
Posts: 97
To find out if you have a particular package:
Code:
dpkg -l packagename
Here's the output I get for libc6:
Code:
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Installed/Config-files/Unpacked/Failed-config/Half-installed
|/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad)
||/ Name                      Version                   Description
+++-=========================-=========================-==================================================================
ii  libc6                     2.3.5-1ubuntu12.5.10.1    GNU C Library: Shared libraries and Timezone data
The "ii" on the left indicates it's installed.

Alternatively:
Code:
bforbes@ben:~$ dpkg -l foo
No packages found matching foo.
Since the package "foo" doesn't exist.

So just perform that command on every dependency to find out if you have it or not.
bforbes is offline  
Old 07-03-2009   #7 (permalink)
Just Joined!
 
Join Date: Jun 2009
Posts: 1
isnt there any command line tool to do the same?actually i am looking to save the list of dependencies in a text file and work on them....Any way to generate the list of dependencies for a package that is yet to be installed?
mangologin is offline  
Old 07-03-2009   #8 (permalink)
Super Moderator
 
ozar's Avatar
 
Join Date: May 2004
Posts: 12,025
Quote:
Originally Posted by mangologin View Post
isnt there any command line tool to do the same?actually i am looking to save the list of dependencies in a text file and work on them....Any way to generate the list of dependencies for a package that is yet to be installed?
Welcome to the forums, mangologin!

Very sorry for any inconvenience, but this thread is over 3 years old and probably no longer monitored by any of the other posters. Please feel free to start a new thread of your own with the details of any problems you are having.

Thank you.
__________________
oz

New Members: * README *
ozar is offline  
Closed Thread


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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 On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Free Magazines
Run Your Own Web Server Using Linux & Apache - Free 191 Page Preview
Learn about everything you'll need to build and maintain your Linux servers, and to deploy Web applications to them.
subscribe
Open Source Security Myths Dispelled
Dispel the five major myths surrounding Open Source Security and gain the tools necessary to make a truly informed decision for your IT organization
subscribe
InformationWeek
InformationWeek is the only newsweekly you'll need to stay on top of the latest developments in information technology.
subscribe



All times are GMT. The time now is 10:13 AM.






© 2000 - 2009 - All Rights Reserved - Property of  MAS Media

Content Relevant URLs by vBSEO 3.3.0 RC2