How can I install Lua on macOS Monterey, without admin powers and terminal access? (I have the vscose Terminal available)

Viewed 27

I have this school M1 MacBook Air, without admin rights or terminal access. They let me install a few things but only from their list of programs, like vscose and python. I'm trying to install Lua to get started with it, but facing problems with the installation.

I downloaded the source, but being unable to use terminal I thought I will use vscode's terminal. I opened the decompressed file and ran "make", but I get this error: "unable to load libxcrun (dlopen(/Library/Developer/CommandLineTools/usr/lib/libxcrun.dylib, 0x0005): tried: '/Library/Developer/CommandLineTools/usr/lib/libxcrun.dylib' (mach-o file, but is an incompatible architecture (have (x86_64), need (arm64e))))." The solutions online all use sudo commands, which I can't use (obviously). So, my questions is, any way to do this ? please?

1 Answers
  • Download lua: http://www.lua.org/download.html
  • Extract it: e.g. tar -xzvf lua-5.4.4.tar.gz; cd lua-5.4.4
  • Where is your home directory? pwd Let us assume /Users/swisscookieman.
  • Make a lua directory: mkdir /Users/swisscookieman/lua.
  • Edit the Makefile to change the line INSTALL_TOP= /usr/local to that directory.
  • For example: INSTALL_TOP= /Users/swisscookieman/lua.
  • Run make macosx && make install to compile and install.

Make sure to specify /Users/swisscookieman/lua/bin in your PATH variable to see the binary or always use the whole path (e.g. /Users/swisscookieman/lua/bin/lua).

Related