My system contains OpenSSL but Ruby is unable to require it. I was told that I must have installed Ruby before I had openssl in my system and that I have to rebuild ruby. So I went to the Ruby directory and typed.
我的系统包含OpenSSL,但是Ruby不能使用它。我被告知,在我的系统中有openssl之前,我必须安装Ruby,而且我必须重新构建Ruby。于是我到Ruby目录并输入。
pushd ext/openssl
sudo ruby extconf.rb
make
make install
popd
And then I was going to reconfigure Ruby by typing:
然后我要重新配置Ruby通过输入
./configure
make
make install
The problem is that after I run the extconf.rb file which works fine and I type sudo make
, it gives this error message.
问题是,在运行extconf之后。rb文件运行良好,我输入sudo make,它会给出这个错误消息。
make: *** No rule to make target `/include/ruby.h', needed by `ossl_digest.o'. Stop.
I don't know what that means or how to fix it. Please help!
我不知道这是什么意思,也不知道该怎么解决。请帮助!
Screenshot:
截图:
2 个解决方案
#1
10
Add this to your Makefile
in ../ext/openssl
(after using ruby extconf.rb
):
将此添加到您的Makefile中。/ext/openssl(使用ruby extcon .rb后):
top_srcdir = ../..
top_srcdir = . . / . .
You then should be able to use make
and make install
without issue
然后,您应该能够使用make和make install而不出问题
#2
0
You need libssl-dev if you want to compile Ruby from source.
如果想要从源代码编译Ruby,需要libssl-dev。
#1
10
Add this to your Makefile
in ../ext/openssl
(after using ruby extconf.rb
):
将此添加到您的Makefile中。/ext/openssl(使用ruby extcon .rb后):
top_srcdir = ../..
top_srcdir = . . / . .
You then should be able to use make
and make install
without issue
然后,您应该能够使用make和make install而不出问题
#2
0
You need libssl-dev if you want to compile Ruby from source.
如果想要从源代码编译Ruby,需要libssl-dev。