无法使用OpenSSL编译Ruby

时间:2015-03-08 09:10:20

标签: 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.

2 个答案:

答案 0 :(得分:12)

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

top_srcdir = ../..

enter image description here

然后您应该可以使用makemake install而无需发出问题

答案 1 :(得分:2)

如果你想从源代码编译Ruby,你需要libssl-dev。