(Warning: this file is old. If needed, don’t hesitate to report a bug on the github page.)
Some packages that you may not already have.
sudo apt install m4
sudo apt install libffi-dev
sudo apt install libsdl2-dev libsdl2-ttf-dev libsdl2-image-dev
sudo apt install pkg-config
Just in case you don’t have them already.
If you want opam2 with ubuntu 16.04, you need to first install bubblewrap from a more recent distro: for instance:
wget http://mirrors.kernel.org/ubuntu/pool/main/b/bubblewrap/bubblewrap_0.3.1-2_amd64.deb
sudo dpkg -i bubblewrap_0.3.1-2_amd64.deb
First check the SDL version you have:
If you have Ubuntu 14.04 (Trusty) or lower, which ships SDL 2.0.2, or if you have Ubuntu 16.04 (Xenial), which ships SDL 2.0.4, then you should install tsdl.0.9.2:
If you have Ubuntu 17.10 (Artful) or higher, then the SDL version is at least 2.0.6, and you can install the most recent tsdl (at this date, 0.9.6):
either
opam install bogue
or follow the instructions on the main install page.