actboy168 / lua-debug

Lua Debug Adapter for Visual Studio Code
MIT License
437 stars 95 forks source link

error while loading shared libraries: libreadline.so.6: cannot open shared object file: No such file or directory #137

Closed hemmerling closed 3 years ago

hemmerling commented 3 years ago

The plugin "lua-debug 1.38.0 does not work at all on VSC / Debian Linux 10.7, 64bit-

When trying to run or debug a LUA script file, e.g. /home/<user>/lua/test.lua

( with the default user with which you are logged in )

, it aborts operation by a VSC terminal window (!) message


`cd /home//lua ; /home//.vscode/extensions/actboy168.lua-debug-1.39.0/runtime/linux/x86_64/lua53/lua -e "dofile[[/home//.vscode/extensions/actboy168.lua-debug-1.39.0/script/launch.lua]];DBG{9017}" /home//lua/test.lua

/home//.vscode/extensions/actboy168.lua-debug-1.39.0/runtime/linux/x86_64/lua53/lua: error while loading shared libraries: libreadline.so.6: cannot open shared object file: No such file or directory`


With the same Debian Linux 10.7 64-bit system, executing Lua files works fine both by Bourne shell and by VSC with some other LUA debugger plugins.

actboy168 commented 3 years ago

I can't reproduce it.

hemmerling commented 3 years ago

Now with LuaDebug 1.40.0, with Debian Linux 10.7, again total failure, looks like same error.

"node8" is my Debian Linux username of course.

The TERMINAL output of VSC:

cd /home/node8/lua ; /home/node8/.vscode/extensions/actboy168.lua-debug-1.40.0/runtime/linux/x86_64/lua53/lua -e "dofile[[/home/node8/.vscode/extensions/actboy168.lua-debug-1.40.0/script/launch.lua]];DBG{9257}" /home/node8/lua/run_my_first_module.lua /home/node8/.vscode/extensions/actboy168.lua-debug-1.40.0/runtime/linux/x86_64/lua53/lua: error while loading shared libraries: libreadline.so.6: cannot open shared object file: No such file or directory

is well known for Linux, but also for other programming languages... ( like R ), see Google search results for that.

A workaround fix for Linux is named here: https://askubuntu.com/questions/1168787/libreadline-so-6-issue-in-ubuntu-18-04

$ cd /lib/x86_64-linux-gnu/ $ sudo ln -s libreadline.so.7.0 libreadline.so.6

So now your debugger works fine.

actboy168 commented 3 years ago

Same as #138