0

I downloaded .deb packages with their dependencies.

How could I install it once? Like automically searches for its dependencies on my library.

Seth
  • 57,282
  • 43
  • 144
  • 200
T.N.
  • 1
  • 1
    If you really have all the correct packages and these packages are provided by a configured software source, you can put them in `/var/cache/apt/archives` as explained in [this answer](http://askubuntu.com/a/1016/22949). For this and other methods, see [How can I install software or packages without Internet (offline)?](http://askubuntu.com/questions/974/how-can-i-install-software-or-packages-without-internet-offline). If you believe that question doesn't apply or none of the solutions there are what you're looking for, please [edit] this question to explain more about your situation. Thanks! – Eliah Kagan Sep 15 '14 at 10:55
  • I'm not really sure this is a duplicate. The answer might be the same, but I think the questions are different. – Seth Oct 22 '14 at 02:25

2 Answers2

1

I downloaded .deb packages with their dependencies... How could I install it once?

You can use 1 installation instruction with the package names divided by a "space".

Example

 dpkg -i first.deb second.deb third.deb

You can also install all .DEBs in a directory with ...

dpkg -R --install packages/

If packages/ has first.deb second.deb third.deb it will install them all.

This will not "automically searches for its dependencies on my library...". It will install the packages listed; nothing more. It is you who needs to make sure the dependencies are all downloaded too.


There is a tool to help you with dpkg called "gdebi". Installation:

sudo apt-get install gdebi-core

You can install .deb packages like this ...

sudo gdebi /path/to/filename.deb

and it will also try to install dependencies.


And do not forget: when you get a broken package warning due to above: sudo apt-get -f install will fix most of those (if not all)

Rinzwind
  • 293,910
  • 41
  • 570
  • 710
  • could I copy it to /var/cache/apt and install it using apt-get? – T.N. Sep 15 '14 at 11:04
  • Yes but it can cause problems (mostly those pesky "broken packages" messages) if you have apt-get install something and you missed a package. – Rinzwind Sep 15 '14 at 11:36
1

If all deb's with dependencies are exist in one directory then you can install as below.

Open terminal (Ctrl+Alt+T) and change to directory (cd <path/to/directry>) containing all .deb's and install by following command:

sudo dpkg -i *.deb
Pandya
  • 34,843
  • 42
  • 126
  • 186