Skip to content

Instantly share code, notes, and snippets.

@marshyski
Last active March 20, 2019 21:31
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save marshyski/bb404717b86ffc155b64ca4026780d55 to your computer and use it in GitHub Desktop.
Save marshyski/bb404717b86ffc155b64ca4026780d55 to your computer and use it in GitHub Desktop.
LuaJIT and luarocks on Mac OS X El Capitan
# This is to install both on OS X if you don't want to use homebrew
# xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
xcode-select --install
curl -O http://luajit.org/download/LuaJIT-2.0.4.zip
unzip LuaJIT-2.0.4.zip
cd LuaJIT-2.0.4
make && make install
curl -O http://keplerproject.github.io/luarocks/releases/luarocks-2.3.0.tar.gz
tar -zxvf luarocks-2.3.0.tar.gz
cd luarocks-2.3.0
mkdir -p /usr/local/include/lua/5.1
ln -s /usr/local/include/luajit-2.0/* /usr/local/include/lua/5.1/
./configure --lua-suffix=jit
make build && make install
@azat-co
Copy link

azat-co commented May 13, 2016

😸

@HeinrichHartmann
Copy link

nice. Thx!

@jansowinski
Copy link

jansowinski commented Mar 23, 2017

Great script, thank you for this! In my case curl -O http://keplerproject.github.io/luarocks/releases/luarocks-2.3.0.tar.gz hasn't worked, I had to download file manually.

@sanjayrsrivatsan
Copy link

Thank you!

@luc-tielen
Copy link

Curl command now also needs -L to follow redirects.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment