4

HOWTO: Installing Ubuntu Packages Offline

http://jeffhoogland.blogspot.com

Something that is difficult to do in Ubuntu (and Linux in general) is installing packages on a system without an active internet connection. This is a brief HOWTO for easily installing packages on an offline Ubuntu system. In order to do this you will need another system (preferably something with Linux) that has an active internet connection as well as a flash drive.Step 1 - Manually performing an apt-get updateThis step is optional if your system was online at some point, however if the system never had an internet connection (or never had apt-get update run) you will need to manually update the packages lists.To do this goto your system that has an active internet connection, open a terminal and run the following commands in order:wget http://archive.ubuntu.com/ubuntu/dists/lucid/main/binary-i386/Releasemv Release archive.ubuntu.com_ubuntu_dists_lucid_Releasewget http://archive.ubuntu.com/ubuntu/dists/lucid/main/binary-i386/Packages.bz2bunzip2 Packages.bz2mv Packages archive.ubuntu.com_ubuntu_dists_lucid_main_binary-i386_Packageswget http://archive.ubuntu.com/ubuntu/dists/lucid/restricted/binary-i386/Pack...bunzip2 Packages.bz2mv Packages archive.ubuntu.com_ubuntu_dists_lucid_restricted_binary-i386_Packageswget http://archive.ubuntu.com/ubuntu/dists/lucid/universe/binary-i386/Packag...bunzip2 Packages.bz2mv Packages archive.ubuntu.com_ubuntu_dists_lucid_universe_binary-i386_Packageswget http://archive.ubuntu.com/ubuntu/dists/lucid/multiverse/binary-i386/Pack...bunzip2 Packages.bz2mv Packages archive.ubuntu.com_ubuntu_dists_lucid_multiverse_binary-i386_PackagesThis should generate five files for you, copy them to your flash drive. Take the flash drive over to your Ubuntu system that is offline and copy them to/var/lib/apt/listsNote, you will need super user privileges to do this. To open a super user file manager on Ubuntu runsudo nautilusStep 2 - Generating Package ListOn your offline system we now need to generate the list of packages we want to install. For this example I am going to use the wine1.2 and filezilla packages, however it will work for any package(s). On the offline system run the following in terminalDue to issues with the terminal code posting on blogger the two lines needed can be found here.Note you can list as many (or as little) packages as you want to install. Take the apt_list_new file we just generated and copy it to your flash drive.Step 3 - Download the PackagesPlug the flash drive with the apt_list_new file into your computer that has an internet connection. Copy the file to the desktop of the computer and then run the following in terminalcd ~/Desktop && wget -i apt_list_newThe above command will download all the packages you need to your desktop, copy them to your flash drive.Step 4 - Installing the PackagesAttach the flash drive you copied all the packages onto to your offline system. Next, copy all the files ending in .deb to /var/cache/apt/archives as root. Finally runsudo apt-get install wine1.2 filezillaIt will tell you "Need to download 0 of XMB" just enter "y", press enter, and poof! Your software will be installing.Have any issues or suggestions on an easier method of installing software on an offline Ubuntu system please drop a comment below. Also, if you only have a windows system with an internet connection available to you a LiveCD is a good option or you can always install wget on Windows.Cheers,~Jeff Hoogland


Read »
Created by uioloio 1 year 34 weeks ago – Made popular 1 year 34 weeks ago
Category:   Tags: