Can't find OpenSSL headers/libs when installing Ruby1.9 from source
I'm trying to install Ruby 1.9 from source, and I can't seem to get it to figure out where the OpenSSL headers and libraries are located. ruby-1.9.2/ex开发者_JS百科t/openssl/extconf.rb
says it can't find openssl/ssl.h
-- which I've very definitely installed in ~/.local/include
(the corresponding OpenSSL library is in ~/.local/lib
).
How can I tell Ruby where to look for C libraries and headers when compiling?
EDIT: fixed it, --with-openssl-dir=/home/<user>/.local/
was what I needed.
Did you try -I
?
Export CFLAGS with -I
:
export CFLAGS="-I~/.local/include"
I'm not sure if ~ expansion will be done. If not, try using absolute paths:
export CFLAGS="-I/home/user/.local/include"
--with-openssl-dir=/home/<user>/.local/
was the missing bit o' magic.
精彩评论