Someone can help me to install Haxe 4.0.0-rc.5 from the binaries on Ubuntu 19.4. The repository pointed out by the page does not have the new versions and on the official page there are no instructions on how to do it. Thanks!
Asked
Active
Viewed 602 times
1 Answers
4
Here's a script I use on CI servers running Ubuntu. It installs Haxe and Neko in /opt/
, but you could put them anywhere (replace /opt/
with whatever location you want, like /usr/local/
or $HOME/tools/
):
# Install neko and Haxe
cd /opt/
curl -sL http://nekovm.org/media/neko-2.1.0-linux64.tar.gz | tar -xz
curl -sL https://github.com/HaxeFoundation/haxe/releases/download/4.0.0-rc.5/haxe-4.0.0-rc.5-linux64.tar.gz | tar -xz
mv haxe_* haxe-4.0.0-rc5
ln -s haxe-4.0.0-rc5 haxe # symlink makes it easy to switch versions
Then you'll want these environment variables defined in your ~/.bashrc
or equivalent:
export NEKOPATH=/opt/neko-2.1.0-linux64/
export HAXE_STD_PATH=/opt/haxe/std
export PATH=/opt/haxe/:/opt/neko-2.1.0-linux64/:$PATH
export LD_LIBRARY_PATH=/opt/neko-2.1.0-linux64/:$LD_LIBRARY_PATH
And to finish the install (after the exports are setup), you need to run once:
haxelib setup ~/haxelib
I've also written up how I manage multiple versions of Haxe on Ubuntu on the Haxe forums: https://community.haxe.org/t/quick-write-up-of-how-i-manage-haxe-versions-under-linux/1694
To uninstall:
- remove the exports from
.bashrc
rm -rf /opt/haxe* /opt/neko* ~/haxelib
-
Tested on a 19.04 docker image, quick edits -- haxelib must be run after setting up the exports. – Jeff Ward Sep 23 '19 at 14:23