<?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 newer OCaml version of 0install.</strong>
There is also an older <a href='install-python.html'>pure Python version</a>.
The OCaml version is completely backwards compatible with the Python version.
</p>
</program>
<p>
If you are looking for a package or the generic binaries, 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.12.2/0install-2.12.2.tar.bz2</b>
$ <b>wget https://downloads.sf.net/project/zero-install/0install/2.12.2/0install-2.12.2.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 1C325588</b>
$ <b>gpg 0install-2.12.2.tar.bz2.sig</b>
gpg: Signature made Sun 06 Aug 2017 19:01:16 BST using RSA key ID 1C325588
gpg: Good signature from "Thomas Leonard <XXX@gmail.com>"
gpg: aka "Thomas Leonard <XXX@docker.com>"
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: 5DD5 8D70 899C 454A 966D 6A51 7513 3C8F 94F6 E0CC
Subkey fingerprint: BB54 6E44 A179 B1AD 4240 41D7 0616 A2C6 1C32 5588
</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'll probably need to install some OCaml dependencies before you can build.
See the <a href='https://github.com/0install/0install/blob/b2.12/README.md'>README</a> for details.
You should then extract the archive, change directory inside it and build:
</p>
<pre>
<b>tar xf 0install-2.12.2.tar.bz2</b>
<b>cd 0install-2.12.2</b>
<b>make</b>
</pre>
<p>
</p>
<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 make 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>make install_home</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>
<p>
You now have a new <b>0install</b> command...
</p>
<quicklinks>
<link href='users.html' img='tango/go-next.png'>Continue to tutorial</link>
</quicklinks>
</html>