Haxe is in the official Ubuntu repositories, but the version is sometimes out of date. (At the time of writing, the official repositories only contain haxe 2.07, while 2.09 is the current release. For this reason we recomment using a ppa with the most recent version.
To do this:
Install haxe on Ubuntu:
sudo add-apt-repository ppa:eyecreate/haxe sudo apt-get update sudo apt-get install haxe
This will add Kevin W's PPA so you can install his up-to-date haxe package, update your list to include his PPA, and then install the latest version of haxe.
If this is the first time you've installed Haxe, you will also need to setup Haxelib. To do this:
sudo mkdir -p /usr/lib/haxe/lib sudo haxelib setup
and choose the default options.
sudo apt-get install haxe sudo mkdir -p /usr/lib/haxe/lib sudo haxelib setup