找不到 OPENSSL 的头文件
我正在尝试在Ubuntu终端安装Luasec,但它只是不断向我显示此错误:
Error: Could not find header file for OPENSSL
No file openssl/ssl.h in /usr/local/include
No file openssl.h/ssl.h/ in /usr/include
No file openssl/ssl.h in /include
You may have to install OPENSSL in your system and/or pass OPENSSL_DIR or OPENSSL_INCDIR to the luarocks command.
当我检查OpenSSL版本时,它说其1.1.1f
那么我该如何继续?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
我认为上述答案没有解决问题。因此分享对我有用的东西。
OS:Macos Ventura
在运行此命令之前,我有 lua 已安装OpenSSL 。
您需要弄清楚这两者的路径。开始在
/usr/local/cellular
文件夹中开始查找它们,然后以下面的格式进行更新:这样,我们明确地告诉命令所需的目录在哪里。
I don't think any of the mentioned answers solves the problem. Hence sharing what worked for me.
OS: macOS Ventura
Before running this command, I had lua and openssl (
brew install openssl
) installed.What you need to figure out is the path for these two. Start looking them inside
/usr/local/Cellular
folder and update in below format:This way we are explicitly telling the command where the required directory are.
尽管是小写的
l
这个解决方案对我有用(独立于一些响应者在这里所说的)luarocks install openssl
Despite the lowercase
l
this solution works for me (independent of what some responders told here)luarocks install openssl
通过命令通过Luarocks安装OpenSSL通过终端安装OpenSSL来修复问题:
现在安装它后,它可以正常工作。
Fixed the issue by Installing OpenSSL with terminal through Luarocks with the command:
And now after installing it, it works.