Closed yanNotDev closed 2 years ago
Solution:
liblua5.2
deps and lua5.2
../configure
, use ./configure --lua-version=5.2
wget https://luarocks.org/releases/luarocks-3.8.0.tar.gz
tar zxpf luarocks-3.8.0.tar.gz
cd luarocks-3.8.0
./configure --lua-version=5.2 && make && sudo make install
sudo luarocks install luasocket
lua
Lua 5.3.5 Copyright (C) 1994-2018 Lua.org, PUC-Rio
> require "socket"
DOWNLOAD/INSTALLATION
If using LuaRocks:
luarocks install lua-bit-numberlua
Otherwise, download <https://github.com/davidm/lua-bit-numberlua/zipball/master>.
Alternately, if using git:
git clone git://github.com/davidm/lua-bit-numberlua.git
cd lua-bit-numberlua
Optionally unpack:
./util.mk
or unpack and install in LuaRocks:
./util.mk install
require 'bit'
to require 'bit.numberlua'
The issue was, that a package was required, that is not present on every system. This was due to me only testing using luajit, where the "bit" package is included. I changed
local bit32 = require("bit");
to
local bit32 = require("prometheus.bit").bit32;
This change is incorporated in the newest release v0.1.6.
Please keep in mind that prometheus was developed for lua51, so it may fail when running on other lua versions.
Thanks to @tornadia for proposing a quick fix for this issue.
Describe the bug Upon running
lua ./cli.lua --preset Strong ./test.lua
i get the following outputExpected behavior The file was supposed to run properly
To Reproduce Steps to reproduce the behavior: Have an arch system with the following lua-related packages installed: lua 5.4.3-1 lua51 5.1.5-9 lua52 5.2.4-5 lua53 5.3.6-1 luajit 2.0.5-3 luarocks 3.8.0-1
git clone the repo, cd into it, and do
lua ./cli.lua --preset Strong ./test.lua