简体   繁体   中英

Unable to compile Ruby with OpenSSL

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.

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

And then I was going to reconfigure Ruby by typing:

./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.

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:

正如您所看到的,只有在它进入openssl时才会发生。由于某种原因,它无法读取openssl。

Add this to your Makefile in ../ext/openssl (after using ruby extconf.rb ):

top_srcdir = ../..

在此输入图像描述

You then should be able to use make and make install without issue

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM