0

when I write

socket = require("socket")

This error occurs. How can I fix this errors? maybe I think this problem is about luasocket.

        no field package.preload['socket.core']
        no file '.\socket\core.lua'
        no file 'e:\Program Files\Algoryx\AgX-2.15.0.4\bin\x64\lua\socket\core.l
ua'
        no file 'e:\Program Files\Algoryx\AgX-2.15.0.4\bin\x64\lua\socket\core\i
nit.lua'
        no file 'e:\Program Files\Algoryx\AgX-2.15.0.4\bin\x64\socket\core.lua'
        no file 'e:\Program Files\Algoryx\AgX-2.15.0.4\bin\x64\socket\core\init.
lua'
        no file 'e:\Program Files (x86)\Lua\5.1\lua\socket\core.luac'
        no file '.\socket\core.dll'
        no file 'e:\Program Files\Algoryx\AgX-2.15.0.4\bin\x64\socket\core.dll'
        no file 'e:\Program Files\Algoryx\AgX-2.15.0.4\bin\x64\loadall.dll'
        no file '.\socket.dll'
        no file 'e:\Program Files\Algoryx\AgX-2.15.0.4\bin\x64\socket.dll'
        no file 'e:\Program Files\Algoryx\AgX-2.15.0.4\bin\x64\loadall.dll'
Jiman An
  • 49
  • 7

2 Answers2

0

Either luasocket's files is missing, or you're using luasocket compiled for different version of Lua.

Vlad
  • 5,450
  • 1
  • 12
  • 19
0

You are missing a dynamic library (usually comes as socket\core.dll) that is required for luasocket to work. You need to have a version of that library compiled for your version of Lua (whether it's Lua 5.1, 5.2 or 5.3) and for your architecture (x86 or x64). Since you seem to be using a particular product (Algoryx), you may want to check with the authors how they handle luasocket integration.

Paul Kulchenko
  • 25,884
  • 3
  • 38
  • 56