[问题已处理] fatal error zlib.h No such file or directory

[问题已处理] fatal error: zlib.h: No such file or directory

 

cd /tmp

wget https://www.openssl.org/source/openssl-1.0.2q.tar.gz

 

yum install -y zlib

yum install -y gcc

 

tar zxvf  openssl-1.0.2q.tar.gz

 

cd /tmp/openssl-1.0.2q/

/config shared zlib

make

如果出现下面错误  需要用zlib标准安装

[问题已处理] fatal error zlib.h No such file or directory_第1张图片

 

cd /tmp

wget http://www.zlib.net/zlib-1.2.11.tar.gz

tar zxvf zlib-1.2.11.tar.gz

cd zlib-1.2.11

./configure

make test

make install

构建共享库

make clean

./configure --shared

make test

make install

cp zutil.h /usr/local/include

cp zutil.c /usr/local/include

 

重新执行不会报错了

cd /tmp/openssl-1.0.2q/

./config shared zlib

make

 

make install
mv /usr/bin/openssl /usr/bin/openssl.bak
mv /usr/include/openssl /usr/include/openssl.bak
ln -s /usr/local/ssl/bin/openssl /usr/bin/openssl
ln -s /usr/local/ssl/include/openssl /usr/include/openssl
echo “/usr/local/ssl/lib” >> /etc/ld.so.conf
ldconfig –v

 

 

查看是否升级成功

openssl version -a

[问题已处理] fatal error zlib.h No such file or directory_第2张图片

 

 

你可能感兴趣的:([问题已处理] fatal error zlib.h No such file or directory)