Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

This question already has an answer here:

I used to install packages with dpkg -i *.deb command for off-line installation. Because all deb files are in one folder.

I want to avoid dependency error and stop installing packages as broken.

Ultimately my aim is to check dependencies and generate download script (if all dependencies are not satisfied) for only those package which is missing in mentioned folder. so-that I can first download missing packages and Then confidently install package by dpkg -i *.deb

apt-cache showpkg $(find -iname '*.deb' -exec dpkg --info '{}' \; | awk '/Package:/ {print $2}') shows dependencies but long list and not helpful to check whethter it is satisfied (exist) in mentioned folder or not. Also dpkg -I *.deb errors following:

   dpkg-deb: 'cabextract_1.4-4_i386.deb' contains no control component 'chromium-codecs-ffmpeg-extra_34.0.1847.116-0ubuntu2_i386.deb'
   dpkg-deb: 'cabextract_1.4-4_i386.deb' contains no control component 'flashplugin-installer_11.2.202.350ubuntu1_i386.deb'
..
..
so on for each deb

Hence, That commands are not useful for me.

Further Clarification:

  1. First check all deb dependencies in my folder.
  2. according to package already installed, check this deb's are able to installed without dependency error or not.
  3. if yes then execute dpkg -i *.deb
  4. else list missing package which not fond installed or in mentioned folder

Thanks.

share|improve this question

marked as duplicate by Eric Carvalho, Aditya, Warren Hill, souravc, BuZZ-dEE Mar 12 at 17:47

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

1  
Do I understand correctly that you expect to get a complete script from us? Why don't you use the results and write it yourself? –  guntbert Apr 26 at 19:21
    
This question is no longer supported from my side because now I am using Local repository method to install debs offline (as APT is standard method) –  Pandya Dec 2 at 5:53

3 Answers 3

You can always try a dry run before the install,

dpkg --dry-run -i *.deb
share|improve this answer

You can get a list of the packages dependencies with:

find *deb -exec dpkg -f {} Depends \;
share|improve this answer

You can also try one of these

 dpkg -I package
 apt-cache rdepends package.deb
 apt-cache showpkg package-name

this one is a combination of steps incase it's just a .deb file

 ar -x <package-name>.deb
 tar -xzf control.tar.gz
 grep Depends control

or

 apt-cache depends package-name

for example

 apt-cache depends mplayer

but i think the last option is what might serve you best

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.