繁体   English   中英

致命错误: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 / example文件夹中尝试

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

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM