linux如何卸载openssl

2025-10-03 10:55:50

1、       首先从httpd开始,先卸载在安装倒是比较容易,不过后来像添加ssl功能,发现编译的时候需要用openssl的安装目录,本人比较愚笨,一顿好找也没有找到,于是就想把openssl也以源代码方式安装。先卸载,此时出现问题,系统好多东西依赖于openssl的库,我查了好多资料也没找到什么办法,于是我最后一狠心,用rpm -e --nodeps给卸载了,然后手动安装了openssl,然后重新启动,这下坏了,好多服务都起不来了,smb,ssh等等,图形模式也起不来了,我欲哭无泪。

linux如何卸载openssl

2、        因为我是在虚拟机上安装的,smb起不来了,我只能重新安装系统了。这次安装我大多数东西都没选择,一路安装完毕,结果在文本方式发现vi编辑没有颜色了,哎,也不知道是少装了那个东西弄得,只能按照猜测重新安装了又添加了一些东西。不过幸运的vi高亮显示功能又有了,遗憾的是具体是那个软件我还是不清楚。有了上次的教训我不敢轻易卸掉系统原来的openssl了,l。步骤简介如下(怕以后忘了)

linux如何卸载openssl

3、        安装zlib

Home : http://www.gzip.org/zlib/

Package(linux source) : http://www.gzip.org/zlib/

Our Configuration

Install to : /usr/local

Module types : dynamically and staticly loaded modules, *.so and *.a  

Build Instructions

zlib library files are placed into /usr/local/lib and zlib header files are placed into /usr/local/include, by default.

Build static libraries

linux如何卸载openssl

4、.../zlib-1.2.1]# ./configure

.../zlib-1.2.1]# make test

.../zlib-1.2.1]# make install

Build shared libraries

.../zlib-1.2.1]# make clean

.../zlib-1.2.1]# ./configure --shared

.../zlib-1.2.1]# make test

.../zlib-1.2.1]# make install

.../zlib-1.2.1]# cp zutil.h /usr/local/include

.../zlib-1.2.1]# cp zutil.c /usr/local/include

/usr/local/lib should now contain... 

linux如何卸载openssl

5、libz.alibz.so -> libz.so.1.2.1libz.so.1 -> libz.so.1.2.1libz.so.1.2.1

/usr/local/include should now contain... zconf.hzlib.hzutil.h

[Optional] Instructions for non-standard placement of zlib

Create the directory that will contain zlib

.../zlib-1.2.1]# mkdir /usr/local/zlib

Follow the given procedure above, except

.../zlib-1.2.1]# ./configure --prefix=/usr/local/zlib

Update the Run-Time Linker

/etc/ld.so.cache will need to be updated with the new zlib shared lib: libz.so.1.2.1

For standard zlib installation...

Add /usr/local/lib to /etc/ld.so.conf, if specified path is not present

/etc]# ldconfig

If zlib was installed with a prefix...

Add /usr/local/zlib/lib to /etc/ld.so.conf

/etc]# ldconfig

linux如何卸载openssl

6、    安装openssl

Download

Home : http://www.openssl.org/

Package(source) : openssl-0.9.7d.tar.gz

Our Configuration

install to : /usr/local/ssl

module types : dynamically and staticly loaded modules, *.so *.a

Build Instructions

.../openssl-0.9.7d]# ./config

--prefix=/usr/local/ssl

[default location]

7、shared

[in addition to the usual static libraries, create shared libraries]

zlib-dynamic

[like "zlib", but has OpenSSL load the zlib library dynamically when needed]

.../openssl-0.9.7d]# ./config -t

[display guess on system made by ./config]

.../openssl-0.9.7d]# make

.../openssl-0.9.7d]# make test

.../openssl-0.9.7d]# make install

linux如何卸载openssl

8、Update the Run-time Linker

ld.so.cache will need to be updated with the location of the new OpenSSL shared libs: libcrypto.so.0.9.7 and libssl.so.0.9.7

Sometimes it is sufficient to just add these two files to /lib, but we recommend you follow these instructions instead.

Edit /etc/ld.so.conf

Add /usr/local/ssl/lib to the bottom.

...]# ldconfig

Update the PATH

linux如何卸载openssl

声明:本网站引用、摘录或转载内容仅供网站访问者交流或参考,不代表本站立场,如存在版权或非法内容,请联系站长删除,联系邮箱:site.kefu@qq.com。
猜你喜欢