暂无图片
ubuntu22使用clion调试mysql8.0.28源码遇到openssl问题
我来答
分享
微信用户
2024-02-23
ubuntu22使用clion调试mysql8.0.28源码遇到openssl问题
暂无图片 5M

错误:


-- Performing Test HAVE_CXX_W_missing_profile
-- Performing Test HAVE_CXX_W_missing_profile - Success
-- ZLIB_VERSION (bundled) is 1.2.11
-- ZSTD_LEGACY_SUPPORT not defined!
-- ZSTD_VERSION (bundled) is 1.5.0
-- OPENSSL_INCLUDE_DIR = /usr/include
-- OPENSSL_LIBRARY = /usr/lib/x86_64-linux-gnu/libssl.so
-- CRYPTO_LIBRARY = /usr/lib/x86_64-linux-gnu/libcrypto.so
-- OPENSSL_MAJOR_VERSION = 
-- OPENSSL_MINOR_VERSION = 
-- OPENSSL_FIX_VERSION = 
-- Looking for SHA512_DIGEST_LENGTH
-- Looking for SHA512_DIGEST_LENGTH - found
-- 
Cannot find appropriate system libraries for WITH_SSL=system.
Make sure you have specified a supported SSL version. 
Valid options are : 
system (use the OS openssl library), 
yes (synonym for system), 
</path/to/custom/openssl/installation>

CMake Error at cmake/ssl.cmake:61 (MESSAGE):
  Please install the appropriate openssl developer package.

Call Stack (most recent call first):
  cmake/ssl.cmake:319 (FATAL_SSL_NOT_FOUND_ERROR)
  CMakeLists.txt:1631 (MYSQL_CHECK_SSL)


-- Configuring incomplete, errors occurred!


系统版本:

(base) hello@hello:~/CLionProjects/mysql-server/include/boost_1_73_0$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 22.04.2 LTS
Release:        22.04
Codename:       jammy

CMake参数:

-DCMAKE_BUILD_TYPE=Debug
-DDOWNLOAD_BOOST=1
-DWITH_BOOST=/home/hello/CLionProjects/mysql-server/build/boost_1_73_0
-DCMAKE_INSTALL_PREFIX=/home/hello/CLionProjects/mysql-server/build
-DMYSQL_DATADIR=/home/hello/CLionProjects/mysql-server/build/data
-DSYSCONFDIR=/home/hello/CLionProjects/mysql-server/build
-DMYSQL_UNIX_ADDR=/home/hello/CLionProjects/mysql-server/build/data/mysql.sock
-DWITH_SSL=system



openssl已经安装:

(base) root@hello:/home/hello# openssl version
OpenSSL 1.1.1u  30 May 2023

(base) hello@hello:~/CLionProjects/mysql-server/include/boost_1_73_0$ openssl version OpenSSL 1.1.1u 30 May 2023
我来答
添加附件
收藏
分享
问题补充
2条回答
默认
最新
微信用户

我已经安装了openssl,执行了以下命令,但是还是有上面的cmake错误 

(base) hello@hello:~/CLionProjects/mysql-server/include/boost_1_73_0$ sudo apt install libssl-dev
正在读取软件包列表... 完成
正在分析软件包的依赖关系树... 完成
正在读取状态信息... 完成
libssl-dev 已经是最新版 (3.0.2-0ubuntu1.14)。
升级了 0 个软件包,新安装了 0 个软件包,要卸载 0 个软件包,有 31 个软件包未被升级。

暂无图片 评论
暂无图片 有用 0
微信用户
题主
2024-02-23
openssl版本是: (base) hello@hello:~/CLionProjects/mysql-server/include/boost_1_73_0$ openssl version OpenSSL 1.1.1u 30 May 2023
lianR

这可能是因为你的系统中存在多个版本的  OpenSSL,而  cmake  可能没有找到正确的版本。你可以尝试以下方法:

1.  检查你的  OpenSSL  版本。在终端中输入  `openssl  version  -a`,查看  OpenSSL  的版本和安装路径。

2.  在你的  CMakeLists.txt  文件中,明确指定  OpenSSL  的路径。例如:

```cmake
set(OPENSSL_ROOT_DIR  /usr/local/ssl)
set(OPENSSL_LIBRARIES  /usr/local/ssl/lib)
find_package(OpenSSL  REQUIRED)
```

3.  重新运行  cmake。

如果上述方法仍不能解决问题,你可能需要卸载系统中的其他版本的  OpenSSL,或者在系统环境变量中设置  OpenSSL  的路径。

暂无图片 评论
暂无图片 有用 2
回答交流
提交
问题信息
请登录之后查看
邀请回答
暂无人订阅该标签,敬请期待~~
暂无图片墨值悬赏