ruby-on-rails - 无法使用 OpenSSL 编译 Ruby

标签 ruby-on-rails ruby ubuntu openssl ubuntu-12.04

我的系统包含 OpenSSL 但 Ruby 无法要求它。有人告诉我,我必须在我的系统中安装 openssl 之前安装 Ruby,并且我必须重建 ruby​​。所以我去了 Ruby 目录并输入。

pushd ext/openssl
sudo ruby extconf.rb
make
make install
popd

然后我打算通过键入以下内容来重新配置 Ruby:

./configure
make 
make install

问题是,在我运行运行正常的 extconf.rb 文件并键入 sudo make 后,它给出了这条错误消息。

make: *** No rule to make target `/include/ruby.h', needed by `ossl_digest.o'.  Stop.

我不知道这意味着什么或如何解决它。请帮忙!

截图:

As you can see that only happens when it enters openssl. It can't read openssl for some reason.

最佳答案

将此添加到 ../ext/openssl 中的 Makefile(在使用 ruby extconf.rb 之后):

top_srcdir = ../..

enter image description here

然后您应该可以毫无问题地使用 makemake install

关于ruby-on-rails - 无法使用 OpenSSL 编译 Ruby,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28924827/

相关文章:

ruby-on-rails - 如何使用 RVM 并创建全局可用的 gem?

sql - 获取所有已标记为属于用户的任何兴趣的帖子

Ruby:当使用 []= 改变字符串的内容并且超出范围时

bash - 使用 Matlab 中的 shell 命令

python - 使用发送命令时,“L3PacketSocket”对象没有属性 'ins'

node.js - 在 ubuntu 上安装 coffee-script 可以正确安装所有文件,但命令行不起作用

javascript - 在 Rails 4 中使用 Sprockets 和 Turbolinks 时如何异步加载 javascript

ruby-on-rails - 在 Mac 上安装 Ruby 2.6.6 或 2.6.7

ruby-on-rails - Rails - 500 内部服务器错误

ruby - 将字符串转换为ruby中的变量名