2

How to download a package with all its dependencies So that it can be installed later on another computer without the internet. I tried at Official packages for Ubuntu. But it also needs to be download individually all dependencies.

graham
  • 10,436
  • See http://askubuntu.com/questions/974/how-can-i-install-software-or-packages-without-internet-offline – muru Aug 13 '14 at 06:59
  • 1
    I would do this. sudo apt-get clean && sudo apt-get $PACKAGENAME -d --reinstall then you can simply copy the packages from /var/cache/apt/archives then place all these in a single folder. On the internetless machine do sudo dpkg -i *.deb in the folder that has the packages. – zeitue Aug 13 '14 at 07:04
  • 1
    @zeitue Interesting, but if OP has installed any packages already, some dependencies may be already present. – muru Aug 13 '14 at 07:10
  • I s there any website for all in all single package download ?? – Purnendu Nath Aug 13 '14 at 07:24
  • @muru perhaps I am just noting how I sent my GF tons of programs because she did not have internet – zeitue Aug 13 '14 at 07:55
  • hehe funny do u have any way ? – Purnendu Nath Aug 13 '14 at 07:58
  • does anyone know if pip packages require dependencies outside the basic python framework? I mean, it should just be code right? – mchid Aug 13 '14 at 09:05
  • @muru OK, I did not really see that the first time I did it, but that might be because I did it on a clean machine. – zeitue Aug 13 '14 at 17:18

1 Answers1

1

To see a list of a packages dependencies and to also see if the dependencies are already installed, use the application apt-rdepends

sudo apt-get apt-rdepends

To list dependencies and status of all dependencies as well use 'apt-rdepends -p' like this:

apt-rdepends -p packagename 

example:

apt-rdepends -p sl

The output will show the dependencies for the package "sl", the dependencies of the depnedencies, the dependencies of the dependencies dependencies etc.

The output will also show if these are installed or not installed on the computer (status).


Another option, try to get all of the installation packages installed on the box with no internet so that you can just build the packages from source. The source code ususally has the package dependencies that get compiled along with the package. What is not included is the build dependencies you need to compile the code. It's pretty straightforward; most of the time, the build compile and or make installation instructions are described in the "README" , the readme.md (markdown), or the "INSTALL" file. If automake, run ./autogen.sh first, then run ./configure, make, make install.

You can build from source with

sudo apt-get build-dep packagename
sudo apt-get source packagename

Replace "packagename" with the actual package name, of course.

This will first install the build-dependencies needed to compile and install the package (you can take note of what these are) and then, will download the source archives. You must have the "source code" repositories enabled in your /etc/apt/sources.list file (uncomment all "deb-src" entries) or in the ubuntu-software-center to download the source code.

Source code can also be downloaded from the projects website or better yet cloned from "github"

Also, if you have python installed, you can install python packages downloaded from pypi.python.org/

For example, to download and install "youtube-dl" you can download the source code from https://pypi.python.org/packages/source/y/youtube_dl/youtube_dl-2014.08.10.tar.gz#md5=d5d259bf8a2ec1b7bf3b744c173308d9 unzip the package in your home directory ( ~/ ) and to install, you would run these commands:

cd youtube_dl-2014.08.10
python setup.py install

if you get an error you may need to use sudo python setup.py install instead. Although it would be silly to try and download youtube videos with no internet. :)

mchid
  • 43,546
  • 8
  • 97
  • 150