4 ms·
Need : sudo sh -c "echo ':APE:M::MZqFpD::/bin/sh:' >/proc/sys/fs/binfmt_misc/register" to run redbean, this really should be documented for linux to run the de
by synergy20 5y ago
Need : sudo sh -c "echo ':APE:M::MZqFpD::/bin/sh:' >/proc/sys/fs/binfmt_misc/register" to run redbean, this really should be documented for linux
to run the demo, still I got lots of warning about "tool/net/redbean.c:1034:redbean:68740] (lua) failed to run lua code: /.init.lua:1: module 'fullmoon' not found", adding the path to LUA_PATH and LUA_CPATH did not help.
last, is there a lua version requirement for this? My system default to lua 5.1.
I was thinking about using this for an embedded board, but the code is actually quite large, 1.6M after zipped, which is too much for small boards.
- paulclinger 5y agoYes, that register patch may be needed on some Linux systems; I'll add this to the documentation. Redbean can't use the system Lua, so it comes bundled with its own Lua interpreter (Lua 5.4; there is also work being done to allow LuaJIT or Luau to be embedded instead). The modules need to be put in the .lua directory within redbean archive; redbean searches within its archive, so you don't need to set LUA_PATH/LUA_CPATH. I have instructions on how to get examples working included in the examples (https://github.com/pkulchenko/fullmoon/tree/more-links#examples https://github.com/pkulchenko/fullmoon/tree/more-links#examp...) section. In terms of the size, this includes MbedTLS and SQLite, so if you don't need those modules, you can compile redbean without them, which should reduce the size considerably.
- paulclinger 5y agoI updated the installation instructions [1] to add the register patch. [1] https://github.com/pkulchenko/fullmoon#installation https://github.com/pkulchenko/fullmoon#installation