lua - 使用 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,但再次没有运气。所以,现在我有点卡住了,不知道该怎么做......如果有人对如何进行有任何提示或建议,我将非常感激。
在此先感谢,祝您有美好的一天:)
解决方案
推荐阅读
- swiftui - 在 SwiftUI 中删除领域列表中的元素
- javascript - 如何利用所有 console.error 消息
- c++ - 三元运算符的右结合性
- firebase - 找不到 com.crashlytics.sdk.android:crashlytics:17.2.2
- listview - XE3 TImageList 在表单上的列表中显示相同的图像
- reactjs - 你如何在 React 中截断 html 文本?
- selenium - 在 pytest selenium 中找不到日志类型“客户端”
- rabbitmq - RabbitMQ:在使用 DLX 策略发送到 DLQ 之前向消息头添加异常
- sql - 如何在另一列的基础上写一个where?
- javascript - Openlayers绘制交互:错误:单击后拖放地图