openssl安装编译

Ubuntu openssl安装编译

编译cmake时报错缺少openssl依赖

[missing: OPENSSL_CRYPTO_LIBRARY]

CMake Error at /usr/share/cmake-3.10/Modules/FindPackageHandleStandardArgs.cmake:137 (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) (Required is at least version "1.1.0")

Ubuntu openssl安装

全局安装:
apt-get install libssl-dev
编译

cd /usr/src
wget https://www.openssl.org/source/openssl-1.1.1n.tar.gz --no-check-certificate

# 根据需要下载不同的版本

tar zxvf openssl-1.1.1n.tar.gz

cd openssl-1.1.1n/

./config shared --prefix=/usr/local/

make -j 4make install

cp libcrypto.so.1.1 /usr/lib/x86_64-linux-gnu/

cp libssl.so.1.1 /usr/lib/x86_64-linux-gnu/

rm /usr/bin/openssl

ln -s /usr/local/bin/openssl /usr/bin/openssl

openssl version
posted @   CleanSky  阅读(331)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 分享4款.NET开源、免费、实用的商城系统
· 全程不用写代码,我用AI程序员写了一个飞机大战
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· 白话解读 Dapr 1.15:你的「微服务管家」又秀新绝活了
· 上周热点回顾(2.24-3.2)
点击右上角即可分享
微信分享提示