Jump to content

Topic on Extension talk:Scribunto

Lua Scribunto error (status 126)

5
Probus (talkcontribs)

Hi everyone,

I've been trying to solve this using error fixing advice I found elsewhere on this site, but it hasn't worked. I'm desperate at this point and really need help. I'm afraid I also know very little about all this, so please be patient with me.

What I'm trying to do is import Infoboxes from Wikipedia onto my own wiki. I followed the instructions under [1] and believe I've imported everything I need, but when I load e.g. [2], I get the following red error message:

"Lua error: Internal error: The interpreter exited with status 126."

This is new actually. It had previously been "status 11" (I think), but after following the instructions I found at [3], the message changed to "status 126".

Please, please help me!! And thank you in advance! :)


[1] Manual:Importing Wikipedia infoboxes tutorial

[2] Trying to avoid the spam filter here. My wiki is at "lacerta.palfreyman.de/wiki". There, search for "Template:Infobox".

[3] (Solved) Lua scribunto error on many pages (status 127)

Mr. Stradivarius (talkcontribs)

Status 126 means that your Lua binary is not executable, according to bug T48135. To fix it, you need to change the permissions for the Lua binary. Probably running a command like this will work:

chmod +x path/to/lua

That bug report says that the message "The interpreter exited with status 126" was replaced with a more helpful error message, but on checking the code, it seems that the helpful error message is not output if you set the path to the Lua binary explicitly using the "luaPath" option.

Wilson0x4d (talkcontribs)

i ran into this issue after migrating to an arm64/ARMv8 cluster (Linux.)

Scribunto does not ship with a compatible binary.

my deployments are containerized and k8s-managed, so I was able to fix this by layering a standalone Lua5.1 package on top of the official mediawiki container image (1.39) using apt, then updating wiki settings to point at the compatible image:

$wgScribuntoEngineConf['luastandalone']['luaPath'] = '/usr/bin/lua5.1'

incidentally, I also purged the files which aren't necessary for my platform, to reduce the image size a bit, from

extensions/Scribunto/includes/engines/LuaStandalone/binaries/

pushed the container image and performed a rollout restart to the cluster and presto-chango! working as intended again! took all of 5 minutes :) hope this helps someone else someday!

2600:1700:10BA:AC00:7D3C:7257:8EDD:FFAF (talkcontribs)

Wilson, you're a G. Luckily, my arm64 came with its own lua5.1 package, and the same /usr/bin/lua5.1 command worked, with the exception that it requires a semicolon ; at the end of the line.

Adding

$wgScribuntoEngineConf['luastandalone']['luaPath'] = '/usr/bin/lua5.1';

Neil9327 (talkcontribs)

I've had the same status 126 error today.

So I added the following to LocalSettings.php:

$wgScribuntoEngineConf['luastandalone']['errorFile'] = '/var/lib/mediawiki/extensions/Scribunto/includes/Engines/LuaStandalone/ErrorFolder/luaerrors';

and this output the following:

/var/lib/mediawiki/extensions/Scribunto/includes/Engines/LuaStandalone/lua_ulimit.sh: 1: exec:

/var/lib/mediawiki/extensions/Scribunto/includes/Engines/LuaStandalone/binaries/lua5_1_5_linux_64_generic/lua: Exec format error

which seems to confirm the path to the lua executables.

However this was apparently incorrect, because when I then ran the command:

which lua

it output a different path:

/usr/bin/lua

So I updated the luaPath row in LocalSettings.php to:

$wgScribuntoEngineConf['luastandalone']['luaPath'] = '/usr/bin/lua';

which fixed the problem.

I found by running command-line command:

file lua

that the lua in the two paths were different, with the '/usr/bin/lua' one being for the ARM architecture, and the other not.

So error 126, on this occasion at least, is not that the lua is not executable. Instead it is that it is the incorrect version for the hardware.

Reply to "Lua Scribunto error (status 126)"