postgresql 284 无法在动态链接库 SSLEAY32.dll 中定位
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/377724/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
284 could not be located in the dynamic link library SSLEAY32.dll
提问by Jonke
Postgres 8.3 is installed on a windows 2008 server. Ruby 1.8-6 installed. gem install ruby-postgres.
Postgres 8.3 安装在 Windows 2008 服务器上。安装了 Ruby 1.8-6。gem 安装 ruby-postgres。
When trying a simple connect I get
当尝试一个简单的连接时,我得到
ruby.exe - Ordinal Not Found
ruby.exe - 未找到序号
The ordinal 284 could not be located in the dynamic link library SSLEAY32.dll.
在动态链接库 SSLEAY32.dll 中找不到序号 284。
OK
好的
There seems to be some conflict betweeen the ssleay32 shipped with postgres 8.3 and the ruby 1.8-6
postgres 8.3 附带的 ssleay32 和 ruby 1.8-6 之间似乎存在一些冲突
I know I could use the gem postgres-pr but I would prefere to use the ruby-postgres because that is what I use on all my other setup even if most of them is running under linux and not windows.
我知道我可以使用 gem postgres-pr,但我更喜欢使用 ruby-postgres,因为这是我在所有其他设置中使用的,即使它们中的大多数是在 linux 而不是 Windows 下运行。
So the question is, Have any one solved this and how?
所以问题是,有没有人解决这个问题以及如何解决?
采纳答案by Bruce
Any even better solution, in so far as using the latest binaries for OpenSSL, is to rename both libeay32.dll and ssleay32.dll in both the ruby\bin folder and also the posgresql\lib folder and install the latest OpenSSL from http://www.slproweb.com/products/Win32OpenSSL.html, at the time of writing it was "Win32 OpenSSL v0.9.8j Light" put the dir in the path and away you go, it worked for me! You get the warm feeling of using the most up to date and secure OpenSSL libraries.
就使用最新的 OpenSSL 二进制文件而言,任何更好的解决方案是在 ruby\bin 文件夹和 posgresql\lib 文件夹中重命名 libeay32.dll 和 ssleay32.dll 并从http:/安装最新的 OpenSSL /www.slproweb.com/products/Win32OpenSSL.html,在撰写本文时它是“Win32 OpenSSL v0.9.8j Light”,将目录放在路径中,然后离开,它对我有用!您会感受到使用最新且安全的 OpenSSL 库的温暖感觉。
回答by Jonke
Miles Georgi
迈尔斯·乔治
That is probably the best way to start, but eventually you will want to be using ruby-postgres instead. The trick to getting that driver working is to copy 2 dll files to your c:\ruby\bin folder from your C:\program files\posgresql\lib folder. I think these 2 files are libeay32.dll and ssleay32.dll
这可能是最好的开始方式,但最终您会希望改用 ruby-postgres。使该驱动程序工作的技巧是将 2 个 dll 文件从 C:\program files\posgresql\lib 文件夹复制到 c:\ruby\bin 文件夹。我认为这两个文件是 libeay32.dll 和 ssleay32.dll
i think a different approch is to use trust instead of md5 from localhost. Because this need of ssleay should be somthing with authentication I suppose.
我认为另一种方法是使用信任而不是来自本地主机的 md5。因为我认为 ssleay 的这种需要应该与身份验证有关。
回答by Jonke
To get a minimal thing without doing to much stuff under windows.
在 Windows 下不做太多事情而得到最少的东西。
use: gem install ruby-postgres
使用: gem install ruby-postgres
then install the windows version of pgadmin and use all the needed files from there (cp from pgadmin\bin to ruby\bin or by setting PATH to the pgadmin\bin)
然后安装 Windows 版本的 pgadmin 并从那里使用所有需要的文件(从 pgadmin\bin cp 到 ruby\bin 或通过将 PATH 设置为 pgadmin\bin)
回答by Tim Matthews
I've never touched ruby or postgres but you are using an old version of openssl than the one it is compiled against. The newest version is openssl-0.9.8j so to build that:
我从未接触过 ruby 或 postgres,但您使用的是旧版本的 openssl,而不是编译时使用的版本。最新版本是 openssl-0.9.8j 以便构建:
Download and unpack then using visual c++ 2008 express + active perl:
下载并解压,然后使用visual c++ 2008 express + active perl:
C:\openssl-0.9.8j>perl Configure VC-WIN32
C:\openssl-0.9.8j>perl 配置VC-WIN32
C:\openssl-0.9.8j>ms\do_masm
C:\openssl-0.9.8j>ms\do_masm
C:\openssl-0.9.8j>nmake -f ms\ntdll.mak
C:\openssl-0.9.8j>nmake -f ms\ntdll.mak