Reputation: 923
I am following the instructions on this website to install Lua on my Windows 10 PC using MinGW. The problem is, when I use the make clean
command, the following error message appears:
make[1]: rm: Command not found
make[1]: *** [clean] Error 127
make[1]: Leaving directory `/c/temp/lua-5.3.3/src'
make: *** [clean] Error 2
I am using Windows 10 and Lua 5.3.3, rather than Windows 7 and Lua 5.1.5, but those are the only differences that I have noticed. I have mingw32-base
, mingw-gcc-g++
, and msys-base
installed as required. It looks like there is a problem with the PATH
variable which is making the commands inaccessible.
Here is the full output when I follow the instructions up to the error (the path before all of this is shown, if that helps):
C:\Users\Laurence>path
PATH=C:\Python33\;C:\ProgramData\Oracle\Java\javapath;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\Program Files (x86)\Skype\Phone\;C:\MinGW\bin\;C:\Program Files\Java\jdk1.8.0_51\bin
C:\Users\Laurence>SET PATH=%PATH%;c:\mingw\msys\1.0\bin
C:\Users\Laurence>CD c:\temp\lua-5.3.3
c:\temp\lua-5.3.3>make clean
cd src && make clean
make[1]: Entering directory `/c/temp/lua-5.3.3/src'
rm -f liblua.a lua luac lapi.o lcode.o lctype.o ldebug.o ldo.o ldump.o lfunc.o lgc.o llex.o lmem.o lobject.o lopcodes.o lparser.o lstate.o lstring.o ltable.o ltm.o lundump.o lvm.o lzio.o lauxlib.o lbaselib.o lbitlib.o lcorolib.o ldblib.o liolib.o lmathlib.o loslib.o lstrlib.o ltablib.o lutf8lib.o loadlib.o linit.o lua.o luac.o
make[1]: rm: Command not found
make[1]: *** [clean] Error 127
make[1]: Leaving directory `/c/temp/lua-5.3.3/src'
make: *** [clean] Error 2
Adding c:mingw\msys\1.0\bin
to PATH
via the control panel did not make any difference. Any help would be appreciated.
Upvotes: 0
Views: 2529
Reputation: 28968
make does not have access to the rm.exe through the path variable.
SET PATH=%PATH%;c:\mingw\msys\1.0\bin
will only add that folder to PATH within your current commandline. You can run rm.exe from that command line after you have added the folder to PATH but make can't. Once you close the command line you your changes to PATH will be lost.
Use SETX PATH "%PATH%;c:\mingw\msys\1.0\bin"
to permanently add a user variable PATH in the windows registry instead. Most likely you'll have to open a new console to make the changes available.
It is also possible to change system (LOCAL_MACHINE) variables by adding /m. Enter SETX /?
for more options.
You could also do this through the Window GUI. At least in your question there is a typo (missing backslash after c):
c:mingw\msys\1.0\bin
Maybe you had one as well when you tried it through the control panel? Make sure rm.exe is available through the path you add to PATH!
Upvotes: 1