Building Tezos on Ubuntu 14.04

Install opam and ocaml utilities. At this time this results in opam version 1.2.2 and ocaml 4.02.3.

add-apt-repository ppa:avsm/ppa
apt-get update
apt-get install ocaml ocaml-native-compilers camlp4-extra opam

Add repo needed for libsodium-dev (at least) that the Tezos installation scripts will install.

add-apt-repository ppa:ondrej/php
apt-get update

Switch to Ocaml 4.03.0.

opam init
opam switch 4.03.0
eval `opam config env`

Clone the tezos source repo to /opt/tezos.

Build dependencies per https://github.com/tezos/tezos

cd /opt/tezos
make build-deps

Install additional dependency manually:

opam install irmin.0.11.1

Build Tezos binaries.

make

Addendum

Thanks to @arthurb on the Tezos slack and to the folks on the #ocaml IRC list for all the help.

When I ran into trouble and had to start from near scratch, here are the (drastic) steps. (I don’t have other Ocaml projects, yet).

rm -r $HOME/.opam
cd /opt/tezos
git clean -dxf

Then start again at opam init.

Leave a Reply

Your email address will not be published. Required fields are marked *

To create code blocks or other preformatted text, indent by four spaces:

    This will be displayed in a monospaced font. The first four 
    spaces will be stripped off, but all other whitespace
    will be preserved.
    
    Markdown is turned off in code blocks:
     [This is not a link](http://example.com)

To create not a block, but an inline code span, use backticks:

Here is some inline `code`.

For more help see http://daringfireball.net/projects/markdown/syntax