欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

PostgreSQL安装时,出现 configure: error: library 'ssl' is required for OpenSSL

程序员文章站 2022-04-28 09:34:30
...

首先,在configure时,出现configure: error: library 'ssl' is required for OpenSSL.(ssl 库被openssl需要)

PostgreSQL安装时,出现 configure: error: library 'ssl' is required for OpenSSL

而网上太多的是.

/configure: error: SSL modules require the OpenSSL library.(SSL需要openssl) ,与此error相反.  这个错误centos :yum -y install openssl-devel

                                                            debian:sudo apt-get install openssl;

                                                                                            sudo apt-get install libssl-dev;

试着安装一下,看看;=是不是缺少文件,发现openssl,libssl-dev已安装

PostgreSQL安装时,出现 configure: error: library 'ssl' is required for OpenSSL

从网上查询资料发现一篇论坛:https://bbs.archlinux.org/viewtopic.php?id=225658 发现一段话:

Arch provides separate packages for openssl (currently 1.1.0.e) and openssl-1.0 (1.0.2.k). OpenSSL 1.1 has some major breaking changes, and some older software doesn't support it. Specifically, I've gotten stuck now on Ruby 2.3.4 and PostgreSQL 9.4.11. Both of these are still supported by upstream, and can be easily downloaded and compiled. Both, however, do not work on openssl-1.1, only 1.0.

What is the proper way to make use of the includes and libs provided by the openssl-1.0 package when running something like `./configure`? For example, the postgresql-9.4 package on AUR is currently broken, and fails with:

Arch为openssl(目前1.1.0.e)和openssl-1.0(1.0.2.k)提供了单独的软件包。 OpenSSL 1.1有一些重大改变,一些较旧的软件不支持它。 具体来说,我现在已经停留在Ruby 2.3.4和PostgreSQL 9.4.11上。 这两种方式仍然受上游支持,并且可以轻松下载和编译。 但是,两者都不适用于openssl-1.1,只有1.0。
运行`。/ configure`之类的东西时,使用openssl-1.0包提供的includes和lib的正确方法是什么? 例如,AUR上的postgresql-9.4软件包当前被破坏,并失败:


检查一下 openssl 的版本信息.apt-get install libssl-dev,

[email protected]:~/Desktop $ openssl version
OpenSSL 1.1.0f  25 May 2017

原来自己的是openssl 1.1.加载1.0版本的依赖包吗?

PKG_CONFIG_PATH=/usr/lib/openssl-1.0/pkgconfig \
  CFLAGS+=" -I/usr/include/openssl-1.0" \
  LDFLAGS+=" -L/usr/lib/openssl-1.0 -lssl" \
  ./configure --with-openssl ...

最后,原来是缺少 libssh-dev开发包.

sudo apt-get install libssh-dev
解决问题.