简体   繁体   中英

when I write require(“socket”), error occurs

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'

luasocket的文件丢失,或者您正在使用为不同版本的Lua编译的luasocket。

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM