Skip to content

Instantly share code, notes, and snippets.

@yongboy
Forked from marshyski/luajit-luarocks-osx.sh
Created March 16, 2017 01:15
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yongboy/0e67c9a46c3e5291a5a60e5c6527fe2e to your computer and use it in GitHub Desktop.
Save yongboy/0e67c9a46c3e5291a5a60e5c6527fe2e 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment