问题原文
原帖链接 · stackedAndOverflowed · CC BY-SA 4.0
Hosting: new droplet on Digital Ocean
Operating system: fresh install of CentOS 7.6.1810
Question: I installed OpenSSL 1.1.1 from source using a tutorial but I don't understand what the following 2 lines do. I understand the basics of Linux but I don't know how to read these.
:~# export LD_LIBRARY_PATH=/usr/local/lib:/usr/local/lib64
:~# echo "export LD_LIBRARY_PATH=/usr/local/lib:/usr/local/lib64" >> ~/.bashrc
Secondarily when I check the version it returns 1.1.1.
:~# openssl version
:~# OpenSSL 1.1.1 11 Sep 2018
However when I look at what's installed it still shows the old OpenSSL 1.0.2k.
:~# yum list installed | grep openssl
openssl.x86_64 1:1.0.2k-16.el7_6.1 installed
openssl-devel.x86_64 1:1.0.2k-16.el7_6.1 @updates
openssl-libs.x86_64 1:1.0.2k-16.el7_6.1 installed
My sense is that somehow those first two lines are connected to this problem but I can't understand them. I hate to robotically do something without understanding what is going on.
已采纳解答
原帖链接 · Michael Hampton · CC BY-SA 4.0
The ld.so(8) man page explains:
LD_LIBRARY_PATH
A list of directories in which to search for ELF libraries at
execution time. The items in the list are separated by either
colons or semicolons, and there is no support for escaping
either separator.
This variable is ignored in secure-execution mode.
By setting this in your environment, you cause programs you run to search for shared libraries in those directories first. It looks like your tutorial author intends for this to override the system OpenSSL packages with your locally installed OpenSSL version.
摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。
