Guides‎ > ‎

Ubuntu offline package management

Home >> Articles >> Ubuntu offline package management

The gadget spec URL could not be found


Update : Please visit http://keryxproject.org/ for offline package management in ubuntu. This program simplifies offline installation of packages without any need of using command line. 

This article describes steps to backup .deb files using APTonCD and to install them on a PC without internet connection.
Download all the required packages with 'Synaptic Package Manager' on the computer which has internet access. Also don't forget to download APTonCD and install on the source computer which has the internet access.

FYI: 'Synaptic Package Manager' keeps a backup of downloaded packages in         /var/cache/apt/archives folder.


1. Start APTonCD. System > Administration > APTonCD

2. Click 'Create' button to create backup of installed programs.

3. APTonCD lists the contents of /var/cache/apt/archives directory. You can add more packages by selecting Add > packages option.



4. Now click the 'Burn' button to create a .iso file of the packages.    
   
5. In the next window, I have selected options to create 'aptoncd-20100213.iso' file in home folder. 

Uncheck the option 'Create a meta-package' if you don't need a meta-package. A meta-package actually has dependencies on all the packages you selected in the previous window. So if you want to the same set of packages on another computer all you need is to install the meta-package only.

Click 'Apply'. The wizard finishes the task depending on the number packages in /var/cache/apt/archives folder. Please note that 'APTonCD' automatically adds date of creation to iso file name.





7. Open gedit or any text editor of your choice and type the following
    
sudo mkdir /mnt/iso
sudo mount -o loop aptoncd-20100213-CD1.iso /mnt/iso
sudo synaptic --add-cdrom /mnt/iso

'sudo' command runs the succeding commands with root privileges. Here 'mount -o loop' is used to mount the iso file as a block device, 'aptoncd-20100213-CD1.iso' is the iso filename and we are mounting the iso file in the '/mnt/iso' folder. 'synaptic –add-cdrom /mnt/iso' adds the iso to software repositories of synaptic package manager.


8. Save the file with filename of your choice (I've named it 'run_synaptic') in same folder of the iso file. 

Now we are going to set executable bit of the text file so that we can run the text file like a normal program. Open the folder where you have saved the iso file and the text file you have just created. Right click the text file and select 'Properties' option. Click the 'Permissions' tab, click 'Allow executing file as program' option and close the 'Properties' window.




9. Copy the iso file and the text file to the home folder of destination computer which does not have internet access.   


10. Once again make sure that the text file has the executable bit set. Please read the step 8 to know how to set the executable bit.

Now open the text file in the destination computer and select the option 'Run in Terminal'. Enter the password.



11. Synaptic Package Manager opens up when you have typed in the password.

12. Click 'Origin' button on the bottom left side. This displays software sources or repositories of synaptic package manager.



13. Left pane shows the available software sources.

Select the option 'APTonCD for ubuntu karmic–i386(2010-02-13 07:13) CD1/Main' to see packages under the 'Main' section. Please note that the name of the software source depends on the time and date of creation of the iso file. Also sometimes you may see the name of the software source repeated like 'contrib', 'non-free', 'main', 'restricted' etc.These names just informs the type of the packages i.e whether they are open-source, closed-source, supported by canonical etc.




14. Select the required packages for installation under each section and click 'Apply' button in toolbar. Enter the password if prompted.


Visit APTonCD @SourceForge http://aptoncd.sourceforge.net/

Thanks for reading this guide. If you have any comments or suggestions please visit the Guestbook section of this site.    


      
Comments