使用luarocks安装lua请求时出错

问题描述

Stackoverflow的好人,

我无法在命令行中使用luarocks install lua-requests安装lua-requests模块。所述模块的一些依赖项将被正确安装,但是luasec导致了问题。

起初,我遇到以下错误

C:\Users\user>luarocks install luasec
Installing https://luarocks.org/luasec-0.9-1.src.rock

Error: Could not find header file for OPENSSL
  No file openssl/ssl.h in c:/external/include
  No file openssl/ssl.h in c:/mingw/include
  No file openssl/ssl.h in c:/windows/system32/include
You may have to install OPENSSL in your system and/or pass OPENSSL_DIR or OPENSSL_INCDIR to the luarocks command.
Example: luarocks install luasec OPENSSL_DIR=/usr/local

但是,我能够通过下载OpenSSL并在命令行中使用以下命令来修复它:

C:\Users\user>luarocks install luasec OPENSSL_DIR=" *path to openssl directory* "

然后导致以下错误

C:\Users\user>luarocks install luasec OPENSSL_DIR=" *path to openssl directory* "
Installing https://luarocks.org/luasec-0.9-1.src.rock

c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe: cannot find -llibssl32MD
c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe: cannot find -llibcrypto32MD
collect2.exe: error: ld returned 1 exit status

Error: Build error: Failed compiling module ssl.dll

谷歌搜索一段时间后,发现以下问题https://github.com/brunoos/luasec/issues/150

我尝试重命名dll,但再次没有运气。所以,现在我有点困惑,不知道该怎么办...如果有人对如何进行操作有任何提示或建议,我将不胜感激。

预先感谢,祝您有美好的一天:)

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)