Skip to playerSkip to main content
  • 5 days ago
Transcript
00:00hi I wanted to set up Lua the programming language on my Mac and that
00:07involves compiling it from source I have prepared my Mac this is a VNC
00:18connection in which you can see a terminal emulator running the command
00:23I have config to know the IP address of the Mac in my case it's 10.1.0.8 or .7
00:32also I have two connections here I wanna run the commands of compiling Lua on the
00:39computer you're seeing me from where I record myself which is running Arch Linux
00:45so to establish an SSH connection to Mac you need to know your IP address which I
00:52have shown you few seconds ago the username and the password then in your
01:00client in my case it's the computer where you're seeing me from you run in the
01:06terminal emulator SSH the username in my case it's like this and then the IP
01:12address you can put your password here and you're good to go so I have
01:33I have installed wget you may need to install it from brew which itself you
01:41install it from brew.search which you open in your in your browser web browser you
01:50run a command that you find in the middle and then you are given a command to put
01:55in your Z profile so let's see
02:02this one to know what is the current version of Lua we have 5.5.0 let's
02:255.5.5.5.5.0 is beta version which means it's not the most stable and current version so we have 5.4.8 you run run these commands in your
02:55you run these commands on your terminal emulator for Mac so this should be 8 this is 4
03:15yeah it's not found so
03:21and that one this one and it should be
03:51yeah so we should make it with the correct link we copy this link clear out the screen on the terminal emulator connected to Mac and we run that command here
04:18it's not that big which means the compilation it's not that big which means the compilation won't take so long
04:24clear out the screen again
04:26unless to see what if the file is there
04:29it should be
04:31here it should be
04:33here it should be
04:34here it is Lua
04:38and then tar clear again tar xvf Lua tab helps the auto completion
04:55and then cd Lua tab again I always press tab it helps a lot
05:02and we we go another directory which is src
05:11clear clear and here on make mac os 10 you need to have xcode installed there are many tutorials on the internet it's very intuitive and easy to do run this command to start the compilation process
05:39should definitely take some time though
05:43the compilation is done
05:46you should have Lua here
05:51and here it is we can run it by typing dot forward slash Lua and it should take us to the shell we can try to print something using the syntax of Lua programming language itself it's like this print Lua
06:19if Lua works please subscribe like this
06:30yes it works as you can see
06:46and we can exit out of it by running control by pressing control D
06:51we clear out the screen
06:53you have two options either by going every time you want to use Lua to slash users
07:01u is uppercase that's the home directory for mac os slash your username slash Lua with the version slash src and then dot slash Lua or copying the executable that you got
07:15that you got to your slash usr slash bin slash Lua we should make such directory
07:22sudo usr bin we have the option also to run it from another path and that path is recognized by the system as the path of executables you have many of them you can know which which is which by running echo
07:42path all uppercase you have all these options all these directories separated with colon make sure that you copy the executable to one of them
07:57I'm considering using opt maybe that's an option or let's just go with the recommendation since each has its uses we run this command Lua
08:16usr bin Lua bin Lua it should complain if Lua directory doesn't exist under slash usr slash bin which I believe is the case
08:36password I guess usr bin Lua doesn't exist so we need to make such directory by running the command mkdir with sudo command in the beginning Lua
09:04...
09:06...
09:10...
09:32and if we move the executable of the programming language to slash usr
09:40slash local slash bin slash lua we are able to run it as you can see here and
09:49this is the proof when we run which it tells about the path
09:56we can check again usr local bin lua
10:06yes it works as you can see that was how you compile lua on your mac
10:25please don't forget to subscribe like share and comment and peace
Be the first to comment
Add your comment

Recommended

4:54
Up next