• Announcement: Lua.org now officially recommends this forum as a meeting place for the Lua community

luarocks seems to "mix together" lua 5.3 and lua 5.4 (1 Viewer)


Mar 10, 2021
Reaction score

I now have in my Windows 10 Lua install
> dir c:\lua

    Répertoire : C:\lua

Mode                 LastWriteTime         Length Name
----                 -------------         ------ ----
-a----        13/10/2021     08:27         356234 lua54.dll
-a----        13/10/2021     08:27         122006 lua54.exe
-a----        13/10/2021     08:27         299268 luac54.exe
-a----        12/10/2021     20:37        4168704 luarocks-admin.exe
-a----        12/10/2021     20:37        4168683 luarocks.exe
-a----        13/10/2021     08:27         125374 wlua54.exe
I had previously Lua 5.3 in this directory and I removed it.

I run luarocks config
luarocks config --local lua_dir C:\lua     
        lua_interpreter = "lua54.exe"
        variables.LUA_BINDIR = "C:\\lua"
        variables.LUA_DIR = "C:\\lua"
        variables.LUA_LIBDIR = "C:\\lua"
Luarocks seems to find that I'm using now lua 5.4 interpreter version

but when I simply run luarocks I get
Warning: Lua 5.3 interpreter not found at C:\lua

Modules may not install with the correct configurations. You may want to configure the path prefix to your build of Lua 5.3 using

   luarocks config --local lua_dir <your-lua-prefix>

Usage: luarocks [-h] [--version] [--dev] [--server <server>]
       [--only-server <server>] [--only-sources <url>]
       [--namespace <namespace>] [--lua-dir <prefix>]
       [--lua-version <ver>] [--tree <tree>] [--local] [--global]
       [--verbose] [--timeout <seconds>] [--pin] [<command>] ...

LuaRocks 3.7.0, the Lua package manager

luarocks - LuaRocks main command-line interface

   -h, --help            Show this help message and exit.
   --version             Show version info and exit.
   --dev                 Enable the sub-repositories in rocks servers for
                         rockspecs of in-development versions.
   --server <server>     Fetch rocks/rockspecs from this server (takes priority
                         over config file).
   --only-server <server>
                         Fetch rocks/rockspecs from this server only (overrides
                         any entries in the config file).
   --only-sources <url>  Restrict downloads to paths matching the given URL.
   --namespace <namespace>
                         Specify the rocks server namespace to use.
   --lua-dir <prefix>    Which Lua installation to use.
   --lua-version <ver>   Which Lua version to use.
   --tree <tree>         Which tree to operate on.
   --local               Use the tree in the user's home directory.
                         To enable it, see 'luarocks help path'.
   --global              Use the system tree when `local_by_default` is `true`.
   --verbose             Display verbose output of commands executed.
   --timeout <seconds>   Timeout on network operations, in seconds.
                         0 means no timeout (wait forever). Default is 30.
   --pin                 Create a luarocks.lock file listing the exact versions
                         of each dependency found for this rock (recursively),
                         and store it in the rock's directory. Ignores any
                         existing luarocks.lock file in the rock's sources.

   help                  Show help for commands.
   completion            Output a shell completion script.
   build                 Build/compile a rock.
   config                Query information about the LuaRocks configuration.
   doc                   Show documentation for an installed rock.
   download              Download a specific rock file from a rocks server.
   init                  Initialize a directory for a Lua project using
   install               Install a rock.
   lint                  Check syntax of a rockspec.
   list                  List currently installed rocks.
   make                  Compile package in current directory using a rockspec.
   new_version           Auto-write a rockspec for a new version of a rock.
   pack                  Create a rock, packing sources or binaries.
   path                  Return the currently configured package path.
   purge                 Remove all installed rocks from a tree.
   remove                Uninstall a rock.
   search                Query the LuaRocks servers.
   show                  Show information about an installed rock.
   test                  Run the test suite in the current directory.
   unpack                Unpack the contents of a rock.
   upload                Upload a rockspec to the public rocks repository.
   which                 Tell which file corresponds to a given module name.
   write_rockspec        Write a template for a rockspec file.

   Variables from the "variables" table of the configuration file can be
   overridden with VAR=VALUE assignments.

      Version    : 5.3
      Interpreter: C:\lua/luarocks.exe (ok)
      LUA_DIR    : C:\lua (ok)
      LUA_BINDIR : C:\lua (ok)
      LUA_INCDIR :  (not found)
                   Use the command

                      luarocks config variables.LUA_INCDIR <dir>

                   to fix the location
      LUA_LIBDIR :  (not found)
                   Use the command

                      luarocks config variables.LUA_LIBDIR <dir>

                   to fix the location

   Configuration files:
      System  : C:/Program Files/luarocks/config-5.3.lua (not found)
      User    : C:/Users/scell/AppData/Roaming/luarocks/config-5.3.lua (not

   Rocks trees in use:
      C:\Users\scell\AppData\Roaming/luarocks ("user")

I don't understand what is going on.

luarocks seems now to be looking for a 5.3 version of lua... not 5.4 !

Any idea?

Kind regards
Last edited by a moderator: