6

I have an application with a .deb package to install it. If the user is online, everything works fine. However, I need to support installing on offline computers from a CD-ROM, and I can only assume default applications are installed, i.e. I can't tell them, "First download XYZ and then it will work." My CD-ROM needs to be self-contained. (Users have little or no internet connectivity ... think "jungles of Papua New Guinea.") The CD-ROM includes all the necessary dependency packages, assuming a stable base install of the operating system.

This is for 11.10. (Hopefully it doesn't all change again in 12.04.)

I have tried:

  • Ubuntu Software Center - The "install" button is disabled if you are offline. This is true even if you add the CD as a software source.
  • Using dpkg directory - This does not resolve the dependencies. I would never be able to explain to our users how to manually resolve the dependencies in a command line.

Some of the tools that would help (keryx, gdebi, aptoncd, synaptic) are not included in the default install of 11.10.

Is there any way to tell aptitude to get and resolve packages from a CD-ROM while offline?

Basically, if a user out in the middle of nowhere installs Ubuntu from a plain ol' Desktop CD, he should then be able to install my application from a different CD. What needs to be on that CD to make that possible?

4
  • Unfortunatly there is no gui method for it I dont know why canonical remove offline installation support from ubuntu software centre ,i really hate this new change because my internet connection is too slow . Another fact is that offline users cant complaint about it you have better to create an aptoncd image and send to offline friends , add this into repository using apt-cdrom command(it is default in 11.10) then install via apt-get if you want avoid this extra pain just use ubuntu 10.04(which is my first and best ubuntu distro:))
    – Tachyons
    Mar 17, 2012 at 2:01
  • And if you need installation simplicity in ubuntu 11.10 it is better to create .bin file instead of debian packaging (even if it makes difficulty in upgrading ),untill canonical considers the offline users
    – Tachyons
    Mar 17, 2012 at 2:19
  • Hi dave, what is the actual structure of your cd ? Where are the debs located inside your cd structure ? How have you made this cd ? Mar 22, 2012 at 20:13
  • @Antoine: I have no set structure at this point. I have tried a raw CD with just a bunch of .deb files in the root. I have also tried an AptOnCD structure, which creates a "Packages" folder and the like. I have total control over how to create the CD, but can't find a format that works in Ubuntu offline.
    – Dave
    Mar 22, 2012 at 20:28

9 Answers 9

2
+100

You have to install the .deb , and the dependencies, with dpkg. As long as you have all the dependencies, you should be able to install them with dpkg.

If you are having a problem, pastebin the command and output you are getting.

A more automated method would be to use Aptoncd

http://aptoncd.sourceforge.net/

3
  • Yes, aptoncd would be great, but the whole point is I can't depend on an external tool because the user might not have that installed, and if he had an internet connection to install it, we wouldn't have a problem in the first place.
    – Dave
    Mar 14, 2012 at 19:13
  • dpkg won't resolve the dependencies. You have to install them in the right order. Or is there some switch that enables this behavior?
    – Dave
    Mar 14, 2012 at 19:14
  • 1
    IMO aptoncd is still the best work around as it will resolve dependencies. I would file a bug report / feature request for an Ubuntu DVD with more packages on it that could be uses as an off-line repository. If the packages are part of the default install you can use the alternate CD (not the desktop) as a repository, and then use apt-get. help.ubuntu.com/community/Repositories/Ubuntu#CD-ROM.2BAC8-DVD
    – Panther
    Mar 14, 2012 at 20:12
2

In a new computer with the Internet, create a script with Synaptic package manager, download .deb files and burn them to a CD.

In other computers, put all the .deb files in a folder and

sudo dpkg -i *.deb

will work.

2

Well considering you want to make this super-simple with no extra downloading, no extra applications, you're left with one option (and it's not that bad):

  1. Fill the CD with all the debs and their dependencies
  2. Stick it in the destination computer, cd into it and run:

    sudo dpkg -i *.deb
    

Yeah, there's no selection, there's no cleverness but if you want to deploy something with minimal fuss, it's all fairly simple.

Either that or you collate your packages and then play around with dpkg-scanpackages (a default app AFAICS) to create index files.

2

Run sudo apt-get clean first.This will clear you var/cache/apt/archives directory. Then install it on the system with only default applications.All the dependencies will be saved in var/cache/apt/archives directory. Copy contents of var/cache/apt/archives to your CD along with your deb file.

Alternatively if you know package name Run these commands to download the package with all its necessary dependencies from repository:-

sudo apt-get --download-only -o Dir::Cache="/path/to/destination/dir/" \
    -o Dir::Cache::archives="./" install package_name

Copy the folder on your CD. Run sudo dpkg -i *.debto install the software (along with its dependencies).

1

if its a .deb file you can install it by using this command

sudo dpkg -i filename.deb

If you all the required dependencies and all then place all those .deb files in /var/cache/apt/archives then install them by using aptitude .

all the best.

For more information look at this https://help.ubuntu.com/community/InstallingSoftware

1
  • dpkg does not resolve the dependencies. I can't ask an end-user to move files around into a cache location. That communicates, "Your product sucks." :-)
    – Dave
    Mar 14, 2012 at 19:12
1
  1. Create package cd-rom using aptoncd and give to your customer enter image description here
  2. insert disk into your customer's computer
  3. Use apt-cdrom comand to add the cd to the software repository
  4. sudo apt-get install package-name to install the package

Alternatively you can try

  1. Autopackage

    enter image description here

  2. Listaller enter image description here

0

There's no GUI method (software center is the only GUI package manager on the CDs as far as I know). But apt-get should be able to handle this just fine.

If you disable all Internet-requiring apt sources, and leave CD ones, then apt-get should work without any trouble.

(apt-cdrom add will add a CD to sources.list)

0

You might consider using SuperDeb Creator. Ubuntu has no practical tools natively installed.

SuperDeb Creator is a program that creates SuperDebs that can be installed offline, shared on CDs, DVDs, etc... Their main goal not only to provide an easy-to-use installer to users that don't have an internet connection, but also to provide an easy way to share software in a de-centralized way, reducing dependency on online software repositories.

Source

Can create a SuperDeb for Debian 5.0.7, Ubuntu 9.10, 10.04, 10.10, 11.04 (alpha 1 or above)

Download Page

enter image description here

0

You do not have any option than those two that I suggest you :

Assuming that your cd structure is a basic one (just a copy/paste of the debs inside the cdrom)

Then the procedure would be :

  • Insert CD to the computer
  • let ubuntu automount the cd if it's desktop edition, if not mounting the cdrom
  • type inside a terminal or console : sudo cp /media/CDROMPOINT/DebFolder/* /var/cache/apt/archives
  • With apt-get or Software center : install your app

however you may have trouble with the local repository database witch can block you from ...

If this is the case you must create a cd as a repository. Just like bodhi.zazen told : use aptoncd for creating your cd. Then add the cdrom as repository with apt-cdrom add just like tumbleweed has suggested.

You can try to automate this by creating a autorun.sh

Best regards.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .