致命错误:openssl/ssl.h:没有这样的文件或目录
fatal error: openssl/ssl.h: No such file or directory
我来自Python,刚接触C++,正在尝试测试一个通过websockets检索数据的程序。
我复制了这个 github 存储库
git clone https://github.com/tensaix2j/binacpp
我正在尝试运行该示例,因此我填写了 api 密钥和秘密:
/binacpp/example/example.cpp
现在从/binacpp/示例文件夹我正在尝试
make example
我收到此错误:
Making example
g++ -I../lib/libcurl-7.56.0/include -I../lib/jsoncpp-1.8.3/include -I../lib/libwebsockets-2.4.0/include -I../lib/libbinacpp/include
example.cpp
-L../lib/libcurl-7.56.0/lib
-L../lib/libwebsockets-2.4.0/lib
-L../lib/libbinacpp/lib
-lcurl -ljsoncpp -lcrypto -lwebsockets -lbinacpp -o example
In file included from ../lib/libbinacpp/include/binacpp_websocket.h:16:0,
from example.cpp:8:
../lib/libwebsockets-2.4.0/include/libwebsockets.h:214:10: fatal error: openssl/ssl.h: No such file or directory
#include <openssl/ssl.h>
^~~~~~~~~~~~~~~
compilation terminated.
Makefile:25: recipe for target 'example' failed
make: *** [example] Error 1
user@ip:/opt/binacpp/example$ ^C
user@ip:/opt/binacpp/example$ ./example.run.sh
./example: error while loading shared libraries: librtmp.so.0: cannot open shared object file: No such file or directory
我试图弄清楚为什么我会收到此错误以及如何处理它?
1(自述文件中说依赖项是
jsoncpp-1.8.3
libcurl-7.56.0
libwebsockets-2.4.0
但是,这些都包含在存储库中
2(如果假设OpenSSL通常已经安装,我怎么知道要安装哪个版本?我该如何安装它,因为使用 Python,您只需使用 pip,所有内容都将放置在正确的目录中,以将其包含在您的程序中。
看起来没有安装 openssl 的开发包:
https://stackoverflow.com/a/3016986/5147260
相关文章:
- 将 OpenSSL 包含在 CMakeList.txt 文件中
- 使用 openssl 构建静态二进制文件的正确方法是什么?
- 致命错误:openssl/ssl.h:没有这样的文件或目录
- 从文件进行 Openssl EVP 加密和解密
- 使用 c++/openssl 使用密码解密文件
- 在 vscode 上找不到'openssl/crypto.h'文件
- openssl rc4 命令行加密和 cpp 文件实现 rc4 之间的区别
- 致命错误:openssl/rsa.h:没有这样的文件或目录
- 获取errro openssl/rsa.h:没有这样的文件或目录
- OpenSSL和JSON文件加密和解密
- 如何使用openssl/sha.h对文本文件进行SHA256哈希处理
- OpenSSL dll文件存储在哪里
- 无法打开包含文件:"openssl/opensslconf.h",MSVS2017
- 用OpenSSL解密c++中的PKCS7文件
- OpenSSL:我使用存储外部文件的RSA密钥加密和解密文件,但有时我的程序会崩溃
- 解密C++中的文件,该文件是用openssl -aes-128-cbc加密的
- 在 PHP 中使用 OpenSSL 对文件进行签名,并在 C++ 中进行验证
- D8048:无法使用 /ZW 选项编译 C 文件 'openssl\applink.c'
- openssl c++ 3DES文件加密解密失败
- libcurl + openssl不能下载大于2GB的文件