Tuesday, October 03, 2006

Installing Packges to ubuntu linux

A main problem for us who do not have Fast Internet access at home when
using ubuntu is the difficulty when installing packages.

To overcome this, THIS IS THE BEST SOLUSION

All the packages that you install in the lab's Machine are stored in
the /var/cache/apt/archives folder. You can take these .deb
packages and install the packages with the dependencies as well.

Here are little tips to create an apt cache on a local hard disk

...............................................................................................................................................
Step 1:
Install dpkg-dev package
sudo apt-get install dpkg-dev

...............................................................................................................................................

Step 2:
Create a directory where ever you like and copy your all
deb packages to it.
use a example dir to show how to do it,
#mkdir /var/newCache
#cp -a /folder of deb packages/ *.deb /var/newCache
...............................................................................................................................................

Step 3:
Open your favourite terminal and go to the directory
(folder) with deb packages
eg:-
#cd /var/newCache

...............................................................................................................................................

Step 4:
Run dpkg-scanpackages, send the output to a file Packages
and compress it.

#dpkg-scanpackages . /dev/null > Packages
#gzip Packages

You can also do the previous step in one command

#dpkg-scanpackages . /dev/null | gzip - > Packages.gz
...............................................................................................................................................

Step 5:
Add the directory (say /var/newCache) into /etc/apt/sources.list

deb file:///var/newCache ./

(NOTICE: The directotry '/foo/bar' should be replaced with your
actual directory path which contains deb packages)
...............................................................................................................................................
Step 6
Finally run `apt-get update' to update apt's list of packages.
#apt-get update

Good luck!!!!!

No comments:

State Machine implementation for Spring Boot Project

Well I do not write a lot about it. You have plenty of resources to read about it. The behavior of state machines can be observed in many d...