miney-py / mineysocket

A network api for minetest
GNU Lesser General Public License v3.0
14 stars 9 forks source link

Missing lua socket lib #9

Open pintman opened 2 years ago

pintman commented 2 years ago

When I use the mod on a Manjaro Linux I get the following error after starting the mod that claims to have not found socket lib. lua-socket is installed by the package mangager.

Minetest-Version: 5.6.0 mineysocket-Version: HEAD

ModError: Failed to load and run script from /home/user/.minetest/mods/mineysocket/init.lua:
/home/user/.minetest/mods/mineysocket/init.lua:45: module 'socket.core' not found:
    no field package.preload['socket.core']
    no file './socket/core.lua'
    no file '/usr/share/luajit-2.1.0-beta3/socket/core.lua'
    no file '/usr/local/share/lua/5.1/socket/core.lua'
    no file '/usr/local/share/lua/5.1/socket/core/init.lua'
    no file '/usr/share/lua/5.1/socket/core.lua'
    no file '/usr/share/lua/5.1/socket/core/init.lua'
    no file './socket/core.so'
    no file '/usr/local/lib/lua/5.1/socket/core.so'
    no file '/usr/lib/lua/5.1/socket/core.so'
    no file '/usr/local/lib/lua/5.1/loadall.so'
    no file './socket.so'
    no file '/usr/local/lib/lua/5.1/socket.so'
    no file '/usr/lib/lua/5.1/socket.so'
    no file '/usr/local/lib/lua/5.1/loadall.so'
stack traceback:
    [C]: in function 'require'
    /home/user/.minetest/mods/mineysocket/init.lua:48: in main chunk

Patching around the path does not lead to any success.

ie.package.cpath = "/usr/lib/lua/5.4/?.so;" .. ie.package.cpath

but results in the following error:

ModError: Failed to load and run script from /home/user/.minetest/mods/mineysocket/init.lua:
error loading module 'socket.core' from file '/usr/lib/lua/5.4/socket/core.so':
    /usr/lib/lua/5.4/socket/core.so: undefined symbol: lua_newuserdatauv
stack traceback:
    [C]: at 0x7f032741b0c0
    [C]: in function 'require'
    /home/user/.minetest/mods/mineysocket/init.lua:48: in main chunk
alwayshopeless commented 1 year ago

Same trouble on Arch-based system. You know any similar package for external API in Minetest?