2

On (Ubuntu) Debian how do I use dpkg -i to install packages on a computer with no internet. I have all the packages and dependencies together all in one folder. I don't need the internet to download anything.

For example, If chrome and all of it's dependencies are together in one folder the command dpkg -i *.deb wants to install chrome BEFORE the dependencies and spits out dependency errors even though the files are right there with chrome in the same directory.

In order to get it to work I have to move all the dependencies out of the folder and into a separate folder in order to run dpkg -i *.deb on the dependencies first then afterward go back into the folder with chrome and run the same command again for the chrome package.

In past versions of Ubuntu all I would have to do is use the following command on all of files in the same directory: dpkg -i --force-all *.deb and it would install the package and all of it's dependencies if they were there together in the same folder.

If I have a folder with a package and it's dependencies together in a single folder how do I install the package without using apt-get to connect to the internet?

  • 1
    (Ubuntu) Debian ? Ubuntu is one distro. Debian is another distro. Ubuntu has its own tab. The Debian tab says"Questions specific to the Debian official distribution (stable, testing, or unstable); if you are using a derivative of Debian (e.g. Mint, Ubuntu, Kali, etc), then use that distribution’s tag instead." – user8779 May 22 '17 at 7:35
4

I am writing Ubuntu specific answer, it should work on Debian as well(never used Debian).

So if you have a .deb file with all it's dependencies,

  • First move these dependencies to /var/cache/apt/archives/ directory.
  • Now execute sudo dpkg -i <your_deb_file>. After this command your .deb file will be half installed(unconfigured) and it will show error about unsatisfied dependency .
  • Now execute sudo apt-get install -f. It will pick all the dependencies form /var/cache/apt/archives/ and will install them and will configure the previously unconfigured package.

You can refer this answer for better understanding.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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