CentOS7 CMake安装

cmake安装


参考地址:https://www.tecmint.com/install-openssl-from-source-in-centos-ubuntu/

1.安装最新版本 OpenSSL

sudo yum install perl-core libtemplate-perl zlib-devel
wget -c https://www.openssl.org/source/openssl-1.0.2p.tar.gz
tar -xzvf openssl-1.0.2p.tar.gz
cd openssl-1.0.2p/
./config -fPIC
make
make test
sudo make install

 

2.编辑 ~/.bash_profile 文件 

PATH添加openssl的路径 /usr/local/ssl/bin
在添加其他3个路径

OPENSSL_ROOT_DIR=/usr/local/ssl
OPENSSL_CRYPTO_LIBRARY=/usr/local/ssl/lib
OPENSSL_INCLUDE_DIR=/usr/local/ssl/include

export OPENSSL_ROOT_DIR
export OPENSSL_CRYPTO_LIBRARY 
export OPENSSL_INCLUDE_DIR

 

3.刷新环境变量

source  ~/.bash_profile

 

4.安装好OpenSSL之后,再下载cmake源码,然后编译和安装cmake

参考地址:https://cmake.org/install/

./bootstrap
make
sudo make install

 

posted @ 2020-05-16 14:51  He_LiangLiang  阅读(2093)  评论(0编辑  收藏  举报