lua-enet icon indicating copy to clipboard operation
lua-enet copied to clipboard

error loading module enet

Open The-Error opened this issue 11 years ago • 1 comments

Hi. I'm getting the following error on Ubuntu 14.04 while trying to use enet in lua. It's installed using luarocks. The enet lib is installed from source, version 1.3.12. What could be the problem?

lua5.1: error loading module 'enet' from file '/usr/local/lib/lua/5.1/enet.so': libenet.so.7: cannot open shared object file: No such file or directory stack traceback: [C]: ? [C]: in function 'require' server.lua:2: in main chunk [C]: ?

The-Error avatar Dec 31 '14 19:12 The-Error

I have the same problem, and I found out the solution at last.

The reason is that enet.so cant find the libenet.so.7 file at the default path.

Here is the solution

  • find libenet.so.7 $ find / libenet.so.7 /usr/local/lib/libenet.so.7

  • add path to LD_LIBRARY_PATH $ export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH

tiomke avatar Feb 11 '18 11:02 tiomke