找不到 OPENSSL 的头文件

发布于 2025-01-18 21:12:19 字数 590 浏览 2 评论 0 原文

我正在尝试在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

“在此处输入图像描述”

那么我该如何继续?

I am trying to install Luasec on Ubuntu terminal, but it just keeps displaying this error to me:

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.

When I check OpenSSL version it says its 1.1.1f

enter image description here

So how do I proceed?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

药祭#氼 2025-01-25 21:12:19
sudo apt -y install libssl-dev
sudo apt -y install libssl-dev
临风闻羌笛 2025-01-25 21:12:19

我认为上述答案没有解决问题。因此分享对我有用的东西。

OS:Macos Ventura

在运行此命令之前,我有 lua 已安装OpenSSL 。

您需要弄清楚这两者的路径。开始在/usr/local/cellular 文件夹中开始查找它们,然后以下面的格式进行更新:

luarocks --lua-dir /usr/local/Cellar/lua/5.4.4_1/ install luasec OPENSSL_DIR=/usr/local/Cellar/[email protected]/1.1.1t

这样,我们明确地告诉命令所需的目录在哪里。

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:

luarocks --lua-dir /usr/local/Cellar/lua/5.4.4_1/ install luasec OPENSSL_DIR=/usr/local/Cellar/[email protected]/1.1.1t

This way we are explicitly telling the command where the required directory are.

春风十里 2025-01-25 21:12:19

尽管是小写的 l 这个解决方案对我有用(独立于一些响应者在这里所说的)

luarocks install openssl

Despite the lowercase l this solution works for me (independent of what some responders told here)

luarocks install openssl

烟燃烟灭 2025-01-25 21:12:19

通过命令通过Luarocks安装OpenSSL通过终端安装OpenSSL来修复问题:

Luarocks install openssl

现在安装它后,它可以正常工作。

Fixed the issue by Installing OpenSSL with terminal through Luarocks with the command:

Luarocks install openssl

And now after installing it, it works.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文