Installation
Warning: This is the old version of Zero Install. You probably want to install the new injector version instead!
Although the system makes installing other software very easy, the Zero Install system itself still requires some work to install. You'll also need to have a few other things installed first (expat to parse the XML index files, wget to download archives, tar, bzip2 and gzip to extract them, GPG to check they are correctly signed, and D-BUS to report progress to graphical utilities). Most systems will have these installed already, although you may be missing the header files for expat (expat-dev). Note that, while you need libdbus installed, you don't need any DBUS daemons running (we only use the library part).
Security and stability note
This software is still under development and has not yet been carefully audited. Please do not run it on public machines (eg, in a school) where malicious users could exploit bugs in it. Please let me know if you find any problems.
Packages
If you don't want to build from source, choose your platform from the list below to get a package tailored for your system...
- For Debian see, the ROX-provided instructions and this chat session for help.
- Fedora Core instructions (from the ROX project; the first half is about getting Zero Install)
- Vector Linux package
- SourceMage GNU Linux spell
- Gobo Linux recipe
- Gentoo ebuild
- Mandrake RPMs: Mandrake 9.2 RPMs | Cooker RPM | Cooker Mirrors List | Mandrake club request
- Linux From Scratch
- SourceForge file releases page
Distributions that have Zero Install running by default:
- b00t Linux (minimal system running Zero Install by default)
Building from source
The Zero Install system requires a small Linux kernel module to provide the /uri/0install directory. Like all kernel modules, you must compile this using the actual kernel headers for the kernel you're actually running.
One way to ensure this is to have compiled your own kernel (eg, from kernel.org) and be running that. There are plenty of guides on the net if you don't feel confident about compiling your own kernel. For example, The Very Verbose Guide to Updating and Compiling Your Debian Kernel (which isn't very Debian specific, despite the name) and Compiling the Linux Kernel. When you install a kernel yourself, the headers get installed automatically at the same time.
If you're using a kernel provided with your distribution, you should find there is a package with the matching kernel headers supplied with the distribution, which you can install now. Use the uname -a command to find out which kernel version you are using. For example, on a Debian system, you could check the version and install the headers like this (things you type are shown in bold):
# uname -a Linux everest 2.4.25 #1 [...] i386 GNU/Linux # apt-get install kernel-headers-2.4.25-1-386
Supported kernels are:
- Linux 2.4 series
- Linux 2.6 series
If you want to port the (small) module to other kernels (BSD, MacOS X, etc) please get in touch.
We want to make the installation as easy as possible, so if you get stuck, please write to us or file a bug report.
Installing the LazyFS kernel module
Download the kernel module for your operating system:- lazyfs-linux-0.1.26.tgz.gpg (Linux 2.4 and 2.6 series kernels)
Check the GPG signature, unpack the archive, and move to the new directory (things you type are shown in bold):
$ gpg lazyfs-linux-0.1.26.tgz.gpg gpg: Signature made Mon 03 Jan 2005 15:01:28 GMT using DSA key ID 59A53CC1 gpg: Can't check signature: public key not found $ tar xzf lazyfs-linux-0.1.26.tgz $ cd lazyfs-linux-0.1.26
If you have my GPG key (see page header) in your keyring, the first step will tell you whether the archive is correctly signed. If not, you'll get the message shown above, but you can still continue anyway. The reason for using GPG here is partly to increase security, and partly to make sure you've got GPG installed (you'll need it later!).
Now, configure, make and install (use su to get root privileges):
$ ./configure $ make $ su -c 'make install' *** Testing kernel module ***
- The file ~/.../include/linux/version.h does not exist
- QM_MODULES: Function not implemented
- dmesg: version magic... (Debian custom kernel)
If you've got Python and sudo installed, now would be a good time to run the unit-tests. This is optional, but it makes it easier for us to diagnose bugs if they're detected here (save your work first!):
$ python tests/check.py lazyfs0d1d23: Device or resource busy test1CacheLink (__main__.Test1WithoutHelper) ... ok test2UnconnectedEmpty (__main__.Test1WithoutHelper) ... ok test01Nothing (__main__.Test2WithHelper) ... ok test02ReleaseHelper (__main__.Test2WithHelper) ... ok [...] test19BadRead (__main__.Test2WithHelper) ... ok test20FMapping (__main__.Test2WithHelper) ... ok test21Fstat (__main__.Test2WithHelper) ... ok ---------------------------------------------------------------------- Ran 23 tests in 3.424s OK
- sudo: command not found
- AssertionError: 'Linux-ix86' != 'Linux-ppc' -- edit tests/check.py for non-x86 systems
If any of the tests fail or (even more exciting!) your system hangs, please report it! Reliable crashes in the unit tests should be easy to track down and fix. Note that if your kernel crashes, it might be better to run the tests from a text console. You're more likely to get diagnostics printed there than from within X.
Installing Zero Install
Once you've got LazyFS installed (see above), you can install Zero Install. Download latest version:
Check the GPG signature and unpack as before:
$ gpg zero-install-0.1.27.tar.gz.gpg $ tar xzf zero-install-0.1.27.tar.gz $ cd zero-install-0.1.27
For security reasons, zero-install does not run as root. So you'll now need to create a new user for it (eg, using the adduser command, or with a tool such as SuSE's YaST). Run configure with the name of your chosen user (here called 'zeroinst'):
$ ./configure --with-user=zeroinst $ make $ su -c 'make install'
- undefined reference to `dbus_error_init'
- Can't find D-BUS? Try setting PKG_CONFIG_PATH=/usr/lib/pkgconfig:/usr/local/lib/pkgconfig
This will create the /uri/0install mount point and the /var/cache/zero-inst cache directory. It will also add an entry to /etc/fstab to allow mounting /uri/0install easily. If you were already running an older version, this step also unmounts /uri/0install.
Now, run zero install (it will just wait, without doing anything). You can look at /var/log/daemon.log (or whatever your system uses) to see what it's doing. SuSE uses /var/log/messages instead.
$ su -c '/etc/init.d/0install start'
Starting zero-install...
(mounting /uri/0install)
zero-install: libdbus 0.20 or 0.21 detected.
$ tail /var/log/daemon.log
Aug 22 15:35:55 everest zero-install: Started: using cache directory '/var/cache/zero-inst'
Aug 22 15:35:55 everest zero-install: Network errors are logged to
'/var/cache/zero-inst/.0inst-wget.log'
Aug 22 15:35:55 everest zero-install: libdbus 0.20 or 0.21 detected.
- mount: wrong fs type... (run 'dmesg' for hints)
- error while loading shared libraries: libdbus-1.so.0
- lazyfs kernel module not loaded automatically
As with lazyfs, users with python and sudo may run the unit-tests now. As the tests check that the digital signature stuff works, you'll be prompted to create a GPG key for a test site.
$ python tests/0test.py Logging to logfile 'log' test01Nothing (__main__.TestSimple) ... ok test02Fail (__main__.TestSimple) ... ok test03EmptySite (__main__.TestSimple) ... ok test04ReadFile (__main__.TestSimple) ... ok test05InvalidSites (__main__.TestSimple) ... ok test06ValidSites (__main__.TestSimple) ... ok ---------------------------------------------------------------------- Ran 6 tests in 3.362s OK
Testing the installation
With zero install still running, try the following command:
$ cat /uri/0install/zero-install.sourceforge.net/demo/test.txt It worked!
- got_site_index_archive: Failed to fetch index archive in log file
- Input/output error: Failed to extract GPG signature/keyring/mirrors! (with old version of tar)
- I/O error and nothing in the log (try 'chsh zeroinst' if the shell in /etc/passwd is /bin/false; use /bin/sh)
- Using a web-proxy with http_proxy
- Multi-processor SMP machines
- zero-install: handle_root_request: Unable to write ... (check permissions and don't use libtrash)
Users can see what they are currently downloading with the ZeroProgress utility, itself available via Zero Install:
$ /uri/0install/zero-install.sourceforge.net/apps/ZeroProgress/AppRun & Starting ZeroProgress... Ready and waiting...
No windows appear on the screen when you run this, but any further downloads will display a progress box. Note that the GTK library is not yet in Zero Install, so you need to have that installed by traditional methods. In the same apps directory as ZeroProgress, you will also find 'ShowLog', which will display Zero Install's download log in case you get any errors.
You can open the ROX-Filer window shown on the main page using these commands (which also fetch the filer itself through Zero Install):
$ alias rox=/uri/0install/rox.sourceforge.net/rox $ rox /uri/0install/rox.sourceforge.net/apps
This window will then appear (see the ROX Wiki page for more details):
Links to other sites with more software, including Mozilla, Python, Acrobat reader, pkg-config, GTK, Java and NEdit, can be found in the directory /uri/0install/zero-install.sourceforge.net/links, and on the wiki page Zero Install Sites.
Notes
- I/O errors indicate that zero install failed to fetch the requested file. ZeroProgress should pop up a box with an explanation, if it's running. Otherwise, check the log file (as shown above).
- When you reboot, /uri/0install is automatically mounted, but the zero-install helper program is not run automatically. Therefore, you will get I/O errors when trying to access anything new, until you do /etc/init.d/0install start.
- Starting Zero Install automatically at boot time
Further reading
Please see the documentation for more information.