系统相关
首页 > 系统相关> > Linux高性能服务器编程之高性能I/O框架库Libevent

Linux高性能服务器编程之高性能I/O框架库Libevent

作者:互联网

高性能I/O框架库Libevent

1. 编译过程中出现的问题

问题一:"Could NOT find OpenSSL"

CMake Error at /usr/share/cmake-3.16/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
  Could NOT find OpenSSL, try to set the path to OpenSSL root folder in the
  system variable OPENSSL_ROOT_DIR (missing: OPENSSL_CRYPTO_LIBRARY
  OPENSSL_INCLUDE_DIR)
Call Stack (most recent call first):
  /usr/share/cmake-3.16/Modules/FindPackageHandleStandardArgs.cmake:594 (_FPHSA_FAILURE_MESSAGE)
  /usr/share/cmake-3.16/Modules/FindOpenSSL.cmake:570 (find_package_handle_standard_args)
  CMakeLists.txt:899 (find_package)

解法方式

sudo apt-get install libssl-dev

image
另外,如果安装openssl-dev时,提示如上图所示的信息,则需要先运行以下命令,再安装openssl-dev

sudo apt-get install libssl1.1=1.1.1-1ubuntu2.1~18.04.14

问题二: "Could NOT find MbedTLS"

CMake Error at /usr/share/cmake-3.16/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
  Could NOT find MbedTLS (missing: MBEDTLS_INCLUDE_DIR MBEDTLS_LIBRARY
  MBEDTLS_CRYPTO_LIBRARY MBEDTLS_X509_LIBRARY MBEDTLS_LIBRARIES
  MBEDTLS_VERSION)
Call Stack (most recent call first):
  /usr/share/cmake-3.16/Modules/FindPackageHandleStandardArgs.cmake:594 (_FPHSA_FAILURE_MESSAGE)
  cmake/FindMbedTLS.cmake:127 (find_package_handle_standard_args)
  CMakeLists.txt:914 (find_package)

解决方式

# 按照以下命令进行编译
mkdir build && cd build
cmake -DEVENT__DISABLE_MBEDTLS=ON ..
make
make install

标签:cmake,Linux,share,3.16,MBEDTLS,高性能,usr,Libevent,find
来源: https://www.cnblogs.com/danielweng/p/15837375.html