libopenssl-ruby 的作用是什么? [英] what's the role of libopenssl-ruby?
问题描述
在 Ubuntu 中使用 Ruby 时,我需要安装 libopenssl-ruby 包.我想知道这个包的目的是什么.是红宝石吗?
when working with Ruby in Ubuntu, I need to install libopenssl-ruby package. I would like to know what's the purpose for this package. Is it a Ruby Gem?
推荐答案
它不是一个宝石,而是一个扩展.扩展可以打包成 gems,但这个不是.
It is not a gem but an extension. Extensions can be packaged as gems, but this one is not.
扩展是一个 C 库(可能与一些原生 ruby 代码混合),它允许使用来自 ruby 语言的一些 C API.
An extension is a C library (may be mixed with some native ruby code) that allows to use some C API from the ruby language.
在我的发行版中,openssl ruby 扩展是 ruby 解释器包的一部分:
On my distribution, the openssl ruby extension is part of the ruby interpreter package:
rpm -ql ruby | grep ssl
..
...
/usr/lib64/ruby/1.8/x86_64-linux/openssl.so
因此 ruby 包只需要 openssl 库本身.
And therefore the ruby package only requires the openssl library itself.
看起来在 Debian 中,他们将这个扩展拆分为一个子包,这就是解释器包需要的原因:它是 ruby 标准库的一部分:http://ruby-doc.org/stdlib/libdoc/openssl/rdoc/index.html
It looks like in Debian, they splitted this extension as a subpackage, and that is the reason why is required by the interpreter package: it is part of the ruby standard library: http://ruby-doc.org/stdlib/libdoc/openssl/rdoc/index.html
这篇关于libopenssl-ruby 的作用是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!