How To Install Package In Ubuntu When The System Is Offline No Internet Connectivity

normally we install package in Linux ubuntu system using #apt-get install
it is possible only if the system (online) has the Internet connectivity . if the system does not have Internet connectivity follow the below step
 
1)First we need to collect what are package we need to install in the local system.
#apt-get --print-uris --yes install vlc | grep ^\’ | cut -d\’ -f2>>offline.txt
By using the above command it will store the package url in the offllinesource.txt
2) Then download the package from the files
#wget --input-file offllinesource.txt
3)after download the package the copy these package into removable device flash drive
then go to the Linux offline system.
4)using dpkg command install the list of package.
#dpkg -i *.deb

For the above example i give how to download the and install vlc for ubuntu system.
install package in Linux ubuntu offline no Internet connectivity.

Wget Different Option - Tricks Tips

#wget -r -A *.mp3 DOWLOAD URL
1)-A it will download the file only with Specified extension
2) -r Recursive Download - Download From Their Subfolder.
3) -X Excluded for the specifed Directories .

For Example
#wget -r -X */contact,*/accounts -A *.png http://www.google.co.in/
-r Dowload Sub Folder
-X Skip the Dowloaded Sub Directories Contack,Accounts
-A *.png Download only the Specified File type *.png

# wget -S http://redhat.com/

-S For Server Response
--2011-10-17 12:32:41-- http://redhat.com/
Connecting to 151.8.20.245:6588... connected.
Proxy request sent, awaiting response...
HTTP/1.0 301 Moved Permanently
Date: Mon, 17 Oct 2011 06:57:47 GMT
Server: Apache
Location: http://www.redhat.com/
Content-Length: 290
Content-Type: text/html; charset=iso-8859-1
X-Cache: MISS from localhost.localdomain
X-Cache-Lookup: MISS from localhost.localdomain:6588
Via: 1.0 localhost.localdomain:6588 (squid/2.6.STABLE21)

Server Details : Apache - Operating System Linux
If the server is Windows Server We will get Like.
Server: Microsoft-IIS/6.0 - Operating System Windows.
 

APT_GET Update Repository
apt-get Installation Error.
ERROR: W:Failed to fetch
> http:\\\us.archive.ubuntu.com/ubuntu/dists/oneric-backports/main/source/Sources
> 404 Not Found [IP: 91.189.92.180 80] , W:Failed to fetch
E:Some index files failed to download. They have been
> ignored, or old ones used instead.

Solution : Update the apt-get Package repositories Source list.
#sudo apt-get update (or) upgrade
UPDATE synchronize list of available package in source repositories.
/etc/apt/source.list (or) /etc/apt/preferences
Maintain the source list is up-to-date.
it is equal to Synaptic or Fetch updates"
system -> Administration -> Synapti
Upgrade download & install newer version of program.
APT - Advanced Packaging Tool Command
apt-get install <package-name>
apt-get check <package-name>
Command diagnostic tool. update package list and check for broken dependencies.
apt-get build-dep <package-name>
Search repositories and install build dependencies.
For More Information : https://help.ubuntu.com/community/AptGet/Howto

Related post