简体   繁体   中英

CMake failing to build, can't find openssl

I'm trying to build cpp-netlib 0.12.0 stable in Ubuntu 18.04, but when I get to running

$ make -j4

I get a lot of errors, such as:

error: ‘SSL_R_SHORT_READ’ was not declared in this scope
         ERR_PACK(ERR_LIB_SSL, 0, SSL_R_SHORT_READ)

Google told me this was because the make variables -DOPENSSL_INCLUDE_DIR and -DOPENSSL_SSL_LIBRARY need to be defined. However, I can't find the directories/libraries I need to set them to. Examples give /usr/lib/openssl-1.0 and /usr/include/openssl-1.0 , but I can't find anything like those, even though I have the latest version of openssl installed through apt-get.

My /usr/include directory contains the folder 'openssl', but usr/lib doesn't have even that, only 'openssh', which doesn't appear to contain anything relevant.

How can I fix this?

通过从git存储库克隆最新版本并从中构建版本进行修复。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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