Document Home

Nokia 770 Internet Tablet
Using Apt-Get

James F. Carter <jimc@ma th.ucla.edu>, 2006-10-10

For complicated or difficult installations you may have better luck using apt-get on the command line, rather than the Maemo application installer. To use apt-get, first edit /etc/apt/sources.list and provide this line:

deb http://www.math.ucla.edu/~jimc/nokia770 mistral user
Or you may have already done this step using the Maemo application installer. Then apt-get update to update the package catalogs.

For this example we'll download the Gnumeric spreadsheet. The download repository is http://www.maemo.org.br/platform/apt. However, for this demo I'll be downloading from my intranet cache, and I happen to know that I don't have all the dependencies for Gnumeric.

I've already run apt-get update, so the installer knows which sites (of the ones I've authorized) have what packages. Before trying apt-get, let's see what happens if I just use the web browser. First I navigate to the site's package index page and click on the download link, obtaining gnumeric_1.7.0-1indt3_armel.deb. The installer opens, requests permission to install, then announces some packages required for the installation are missing (duh). Hit details and the error output will be shown. (This is a big improvement over Maemo-1.1.) However, at least one of the packages is not missing; rather, the installer knows where it is, but has not installed it, and isn't going to. That's a problem with downloading off the web page: you need to mind the dependencies manually, which is a pain.

Instead you can use apt-get, which will install dependencies automatically -- sometimes. The Maemo Application Manager is a GUI front end to apt-get. Should you use it, or should you start an xterm and do it on the command line? I've found that the Maemo Application Manager is great for simple installations, but if anything goes wrong you're kind of in the dark about why. Thus I generally use the command line interface.

I'll have to download about 7 packages to my cache to do the installation. If I were doing it the easy way and downloading direct from the remote site, the dependent packages would all be either on that site or in the Maemo repository, and known to apt-get. Well, that was a bust. I obtained all the dependent libraries except one: libgsf-gnome-1-114. Nobody on the web seems to know where it is. I'll have to send a message to the developer...

In web postings I see this kind of thing a lot -- missing libraries. The most common problem is that the user needs to add all the repositories containing all the libraries to /etc/apt/sources.list. One user turned on only one repository at a time, which prevented installing a package that had dependencies on multiple sites. If you get a message like packagename: Depends: libwhatever (>= 0.5.1) but it is not going to be installed the most likely reason is that the dependent package has additional dependencies that weren't found. Try a separate operation to install the package that is not going to be installed, and it will tell you why apt-get won't install it. Then you need to find the additional dependencies.

I'm starting the demo again with Evince, on the same site. Again there are 5 unmet dependencies, plus the various dependencies of those packages. Now I have all of them located, /etc/apt/sources.list configured, and I ran apt-get update yet again so the installer knows where they are. I execute apt-get install evince on the command line. Here is the session transcript; a discussion follows:

[root selen ~ 14] apt-get install evince
Reading package lists... Done
Building dependency tree... Done
The following extra packages will be installed:
  libdjvulibre15 libglade2-0 libpoppler1 libpoppler1-glib shared-mime-info
  unrar unzip
Suggested packages:
  zip
Recommended packages:
  python2.3
The following NEW packages will be installed:
  evince libdjvulibre15 libglade2-0 libpoppler1 libpoppler1-glib unrar unzip
The following packages will be upgraded:
  shared-mime-info
1 upgraded, 7 newly installed, 0 to remove and 0 not upgraded.
Need to get 2472kB of archives.
After unpacking 7086kB of additional disk space will be used.
Do you want to continue [Y/n]? y
WARNING: The following packages cannot be authenticated!
  libdjvulibre15 libglade2-0 libpoppler1 libpoppler1-glib shared-mime-info
  unzip unrar evince
Install these packages without verification [y/N]? y
Get:1 http://fafnir.cft.ca.us mistral/cache libdjvulibre15 3.5.16-1indt1 [676kB]
Get:2 http://fafnir.cft.ca.us mistral/cache libglade2-0 1:2.4.0-1osso [79.0kB]
Get:3 http://fafnir.cft.ca.us mistral/cache libpoppler1 0.5.3-0ubuntu6-indt1 [538kB]
Get:4 http://fafnir.cft.ca.us mistral/cache libpoppler1-glib 0.5.3-0ubuntu6-indt1 [53.9kB]
Get:5 http://fafnir.cft.ca.us mistral/cache shared-mime-info 0.17-0indt1 [337kB]
Get:6 http://fafnir.cft.ca.us mistral/cache unzip 5.52-6ubuntu4 [160kB]        
Get:7 http://fafnir.cft.ca.us mistral/cache unrar 1:3.5.4-0.1 [89.3kB]         
Get:8 http://fafnir.cft.ca.us mistral/cache evince 0.5.2-indt5 [539kB]         
Fetched 2472kB in 10s (247kB/s)                                                
/bin/sh: /usr/sbin/dpkg-preconfigure: not found
Selecting previously deselected package libdjvulibre15.
(Reading database ... 11619 files and directories currently installed.)
Unpacking libdjvulibre15 (from .../libdjvulibre15_3.5.16-1indt1_armel.deb) ...
Selecting previously deselected package libglade2-0.
Unpacking libglade2-0 (from .../libglade2-0_1%3a2.4.0-1osso_armel.deb) ...
Selecting previously deselected package libpoppler1.
Unpacking libpoppler1 (from .../libpoppler1_0.5.3-0ubuntu6-indt1_armel.deb) ...
Selecting previously deselected package libpoppler1-glib.
Unpacking libpoppler1-glib (from .../libpoppler1-glib_0.5.3-0ubuntu6-indt1_armel.deb) ...
Preparing to replace shared-mime-info 0.15-4 (using .../shared-mime-info_0.17-0indt1_armel.deb) ...
Unpacking replacement shared-mime-info ...
Selecting previously deselected package unzip.
Unpacking unzip (from .../unzip_5.52-6ubuntu4_armel.deb) ...
Selecting previously deselected package unrar.
Unpacking unrar (from .../unrar_1%3a3.5.4-0.1_armel.deb) ...
Selecting previously deselected package evince.
Unpacking evince (from .../evince_0.5.2-indt5_armel.deb) ...
Setting up libdjvulibre15 (3.5.16-1indt1) ...

Setting up libglade2-0 (2.4.0-1osso) ...

Setting up libpoppler1 (0.5.3-0ubuntu6-indt1) ...

Setting up libpoppler1-glib (0.5.3-0ubuntu6-indt1) ...

Setting up shared-mime-info (0.17-0indt1) ...
***
* Updating MIME database in /usr/share/mime...
* Warning: Unknown media type in type 'sketch/png'
Wrote 486 strings at 20 - 2838
Wrote aliases at 2838 - 29e4
Wrote parents at 29e4 - 3388
Wrote literal globs at 3388 - 33e4
Wrote suffix globs at 33e4 - 6c9c
Wrote full globs at 6c9c - 6cc0
Wrote magic at 6cc0 - cd44
Wrote namespace list at cd44 - cd54
***

Setting up unzip (5.52-6ubuntu4) ...
Setting up unrar (3.5.4-0.1) ...
Setting up evince (0.5.2-indt5) ...

These points should be noted in the transcript:

This installation was successful: I was able to view a PDF file using Evince. I'll need to jigger the mime-types so it's used by the web browser instead of the Osso document viewer (which, by the way, is quite a bit faster than it used to be in Maemo-1.1, at least on text documents).