<?xml version='1.0' encoding='utf-8'?>
<html lang="en">
<program name='0install'
title='Install from Source'
author='Thomas Leonard'
git='https://github.com/0install/0install'
license='GNU Lesser General Public License'>
<p>
<strong>This is the older (but better tested) version of 0install. Consider trying the newer <a href='install-source.html'>OCaml version</a> (faster, but less well tested).</strong>
0install 2.3 is written entirely in Python, so installing from source is quite simple.
</p>
</program>
<p>
To use 0install, you will need the following (these are installed on most Linux systems by default):
</p>
<ul>
<li><a href="http://python.org">Python</a> (version 2.6, 2.7 or 3.2+).</li>
<li><a href="https://live.gnome.org/PyGObject/">PyGObject</a> (this is a dependency of PyGTK, but is also available separately). If PyGObject is not available, 0install can use <a href='http://code.google.com/p/tulip/'>Tulip</a> instead (which is pure Python, but requires Python >= 3.3).</li>
<li><a href="http://www.gnupg.org/">GnuPG</a> (to check the digital signatures).</li>
</ul>
<p>Note: the last version to support Python 2.5 was 0install 1.0.</p>
<p>
For the optional (but recommended) GUI:
</p>
<ul>
<li>If using <b>Python 2</b>: <a href="http://freshmeat.net/projects/pygtk/?branch_id=12503">PyGTK 2.12</a> or later.</li>
<li>If using <b>Python 3</b>: GTK3, including the GIRepository bindings (gir1.2-gtk-3.0).</li>
<li><a href="http://portland.freedesktop.org/wiki/">xdg-utils</a> (optional; GNOME and KDE desktop integration).</li>
</ul>
<p>
If you are looking for a package, try the <a href='injector.html'>main downloads page</a>.
</p>
<h2>Instructions</h2>
<p>
Download the latest .tar.bz2 archive from <a
href="https://sourceforge.net/projects/zero-install/files/0install/">the
SF.net download page</a> (and the corresponding .sig file if you want to verify it), or using wget:
</p>
<pre>
$ <b>wget https://downloads.sf.net/project/zero-install/0install/2.3.4/0install-2.3.4.tar.bz2</b>
$ <b>wget https://downloads.sf.net/project/zero-install/0install/2.3.4/0install-2.3.4.tar.bz2.sig</b>
</pre>
<p>
Check that the signature is correct using GPG (this also ensures that GPG is installed correctly).
You'll need <a href="http://0install.net/public_key.gpg">my GPG key</a>, which you can download and import
using --recv-key (or <a href='http://rox.sourceforge.net/desktop/GPG'>manually</a>):
</p>
<pre>
$ <b>gpg --recv-key --keyserver pgp.mit.edu CA74D8BA</b>
$ <b>gpg 0install-2.3.4.tar.bz2.sig</b>
gpg: Signature made Sun Nov 16 17:21:21 2014 UTC using RSA key ID CA74D8BA
gpg: Good signature from "Thomas Leonard <XXXXX@gmail.com>"
gpg: Good signature from "Thomas Leonard <XXXXX@users.sourceforge.net>"
gpg: WARNING: This key is not certified with a trusted signature!
gpg: There is no indication that the signature belongs to the owner.
Primary key fingerprint: DA98 25AE CAD0 8975 7CDA BD8E 0713 3F96 CA74 D8BA
</pre>
<p>
The warning is just to tell you that you haven't yet established that the key really
belongs to me (ultra-paranoid users will now cross-check the finger-print using
some other source of information).
</p>
<p>
You should now extract the archive, and change directory inside it:
</p>
<pre>
$ <b>tar xjf 0install-2.3.4.tar.bz2</b>
$ <b>cd 0install-2.3.4</b>
</pre>
<table class='split'>
<col id="col1"/>
<tr><th>Installing normally</th><th>Installing without root access</th></tr>
<tr>
<td>
<p>For a normal install, either su to root, install, and exit from root, or use sudo:</p>
<pre>$ <b>sudo python setup.py install</b>
</pre>
</td><td>
<p>
If you don't have the root password, use this command.
You'll need to make sure that ~/bin is in $PATH in this case.
</p>
<pre>$ <b>python setup.py install --home ~ --install-data ~/.local</b>
$ <b>export PATH=$HOME/bin:$PATH</b>
</pre>
<p>
Logging out and back in again will ensure $PATH and the Applications menu get updated correctly,
on Ubuntu at least.
</p>
</td>
</tr>
</table>
<dl>
<dt>choosing the Python version</dt>
<dd>The installed scripts will use whichever version of python you used for the install. e.g. use "<b>python3 setup.py ...</b>" if you want to force Python 3.</dd>
<dt>error: invalid Python installation: unable to open /usr/lib/python2.X/config/Makefile</dt>
<dd>You need to install the <i>python-dev</i> package, not just <i>python</i>.</dd>
<dt>package init file 'zeroinstall/0launch-gui/__init__.py' not found (or not a regular file)</dt>
<dd>This is just a warning and is harmless.</dd>
</dl>
<p>
You now have some new commands: <b>0launch</b>, which takes the URL of a program and runs it, and
<b>0install</b>, which provides access to other features.
</p>
<div class='note'>Note (mainly for packagers): there is an optional OCaml front-end, which makes starting
applications (and tab-completion) faster. Do "make ocaml" before installing to get that. You'll need to
install OCaml and various extra library packages to build this.</div>
<quicklinks>
<link href='users.html' img='tango/go-next.png'>Continue to tutorial</link>
</quicklinks>
</html>