Debian/Linux 上的 Ruby 不支持的协议(protocol) (OpenSSL::SSL::SSLError)

标签 ruby ssl openssl ruby-1.8 libssl

如何修复在 Debian Linux 上使用带有 ruby​​ 的 ssl 命令的错误?

/usr/lib/ruby/1.8/net/http.rb:586:in `connect': SSL_connect returned=1 errno=0 state=unknown state: 不支持的协议(protocol) (OpenSSL::SSL::SSLError)

我找到了答案,我把它贴出来供其他用户引用。

最佳答案

您需要将 ruby​​ 版本更改为至少 1.8.7-p358

将 openssl 库从 openssl_1.0.0h-1 (amd64) 升级到 openssl_1.0.1-4 后出现此错误。

我正在紧张地进行 Debian 测试。

只需使用 https://github.com/sstephenson/rbenv安装 ruby​​ 1.8.7-p358。我有来自 debian 测试的标准 ruby​​ 1.8.7.352。

希望对您有所帮助,如果有请评论!

关于Debian/Linux 上的 Ruby 不支持的协议(protocol) (OpenSSL::SSL::SSLError),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10102018/

相关文章:

ruby - 从单例方法访问实例变量

azure - Win2012R2 新自签名证书 : A parameter cannot be found that matches parameter name 'Provider'

ssl - 保护私有(private) IP 地址(https 证书)

.net - 提取C#中的私钥字节

ruby - 使用 float 在 Ruby 中打开范围?

ruby-on-rails - Ruby on Rails 中 Postgresql 的线性同余生成器,用于生成唯一的、不重复的随机数?

c - C 中的 SHA1 错误实现

c++ - SSL_read 失败并显示 SSL_ERROR_SSL

ruby-on-rails - Rails 4 Devise 重新激活 "soft deleted"帐户

asp.net-core - 如何在 Visual Studio 2019 16.8.3 Build 中禁用 ASP.NET Core API 3.1 项目的 SSL?