install software in ubuntu without internet

By arundavidp

I have found a very working way to install any software in ubuntu without direct internet
in your linux box. I found this method first in the site ( link ) , now I have made some little
modifications so that you can make a structured local repository in your computer.

In your computer
$> apt-get –qq ––print-uris update | awk -F\‘ ‘{ print $2}‘ > get.lst

In windows open command prompt go to the folder containing wget.exe
type: wget -c -i get.lst -x
Now you can see a directory tree created on the folder containing both wget and get.lst
you can find Package.gz and Source.bz2 in some folders in that directory tree. copy that entire directory tree into your usb.

In your linux paste that directory tree. Open the terminal in root mode.
$>gksudo gedit /etc/apt/sources.lst
Now a gedit window will appear, it contains some lines without ‘#’ in front.
copy those lines and paste it in the same file after replacing http:// with file:///<directory>/<wher your pasted the direcoty structure>/ Now you may understand
that we have created a local repository equivalent to ubuntu web repository and added the
data in sources.lst, now save the file. Open the synaptic package manager you can find the new
package data in it. Now click vlc and click install, instead of clicking ‘Apply Changes’ click
‘File>Generate Package download script’ . Now open the file in which you have saved the
script in gedit. Replace file:///<directory>/<wher your pasted the direcoty structure>/
with http://. Now copy the file into your usb and take it to the windows.

In your windows, copy the file you have generated and edited using the synaptic and
gedit into the folder containing wget.
Open the folder in command prompt and type : wget -c -i <file_name> -x
Now you can see a direcory structure similar to earlier case but with a number of
.deb files. copy the entire directory structure into your usb.

In linux, paste the directory structure in your usb that you have just downloaded,
into the folder where you have earlier pasted the previous directory structure
using terminal
$>cp -R <directory tree in your usb> <direcoty where you stored your previous
directory tree>
Note : We used this command to merge the new directory tree with the existing one.
Open the synaptic package manager and click on the vlc and click to install.
Now click ‘Apply Changes’. Now you can see synaptic downloading the necessary
packages from the lo0cal directory and installing the vlc media player.

You can do the same procedure with any software package you found in the synapitc
package manager.

Next time I will show you an example code to do this with all the necessary lines.

Good Bye.

Leave a Reply