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?

Braiam
  • 69,112
Dave
  • 189

9 Answers9

2

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/

Panther
  • 104,528
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.

Oli
  • 299,380
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).

Vikramjeet
  • 5,936
  • 10
  • 37
  • 43
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

Raja G
  • 105,327
  • 107
  • 262
  • 331
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

Tachyons
  • 17,455
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)

tumbleweed
  • 8,106
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

Ringtail
  • 16,285
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.