Ubuntu Can';尽管安装了libssl dev,但不能使用SSL构建Postgres

Ubuntu Can';尽管安装了libssl dev,但不能使用SSL构建Postgres,ubuntu,openssl,cross-compiling,gnu-make,configure,Ubuntu,Openssl,Cross Compiling,Gnu Make,Configure,我目前正在尝试自己构建一个版本的Postgres,但我在SSL支持方面遇到了一些问题 我使用(Windows交叉编译)配置项目 但我犯了个错误 checking for library containing gethostbyname_r... no checking for library containing shmget... no checking for inflate in -lz... yes checking for library containing CRYPTO_new_e

我目前正在尝试自己构建一个版本的Postgres,但我在SSL支持方面遇到了一些问题

我使用(Windows交叉编译)配置项目

但我犯了个错误

checking for library containing gethostbyname_r... no
checking for library containing shmget... no
checking for inflate in -lz... yes
checking for library containing CRYPTO_new_ex_data... no
configure: error: library 'eay32' or 'crypto' is required for OpenSSL
我在互联网上搜索了一个解决方案,发现安装libssl-dev应该可以解决这个问题(这似乎对一些人有所帮助)。我检查过了,并且已经安装了libssl dev。 由于错误实际上没有提到SSL,我搜索了像
eay32
crypto
这样的库,可以找到几个名为
libcrypto++-dev
和类似的包,这些包已经安装,但据我所知,libcrypto应该是SSL库的一部分

我检查了
configure.in
中的错误源并找到了

if test "$with_openssl" = yes ; then
  dnl Order matters!
  if test "$PORTNAME" != "win32"; then
     AC_CHECK_LIB(crypto, CRYPTO_new_ex_data, [], [AC_MSG_ERROR([library 'crypto' is required for OpenSSL])])
     AC_CHECK_LIB(ssl,    SSL_new, [], [AC_MSG_ERROR([library 'ssl' is required for OpenSSL])])
  else
     AC_SEARCH_LIBS(CRYPTO_new_ex_data, [eay32 crypto], [], [AC_MSG_ERROR([library 'eay32' or 'crypto' is required for OpenSSL])])
     AC_SEARCH_LIBS(SSL_new, [ssleay32 ssl], [], [AC_MSG_ERROR([library 'ssleay32' or 'ssl' is required for OpenSSL])])
  fi
不幸的是,我对make、autoconf和这些构建工具几乎没有经验,但据我所知,它们只是试图找到ssl和crypto库,但却无法找到

所以我尝试显式地添加include和lib目录

/configure --host=x86_64-w64-mingw32 --with-openssl --with-includes=/usr/include/openssl/ --with-libraries=/usr/lib/x86_64-linux-gnu/ PKG_CONFIG_PATH=/usr/lib/x86_64-linux-gnu/pkgconfig/ --prefix=/home/fuchs/postgres-bin-9.6.12

然而,这并没有改变任何事情,现在我已经没有想法了。我在Kubuntu 18.04上,几乎是一个全新的安装,并尝试构建Postgres 9.6.12。

有类似的问题。在我的例子中,我试图交叉编译库。尽管将--with includes和--with libraries标志设置为指向正确的openssl,但仍然无法让脚本找到openssl!有类似的问题。在我的例子中,我试图交叉编译库。尽管将--with includes和--with libraries标志设置为指向正确的openssl,但仍然无法让脚本找到openssl!
/configure --host=x86_64-w64-mingw32 --with-openssl --with-includes=/usr/include/openssl/ --with-libraries=/usr/lib/x86_64-linux-gnu/ PKG_CONFIG_PATH=/usr/lib/x86_64-linux-gnu/pkgconfig/ --prefix=/home/fuchs/postgres-bin-9.6.12