使用RVM安装Ruby 1.8.7,会发生以下错误:
Error running '__rvm_make -j4',
showing last 15 lines of /home/XXXX/.rvm/log/1446528129_ruby-1.8.7-p374/make.log
from ossl_ssl_session.c:5:
openssl_missing.h:95:5: error: conflicting types for ‘EVP_CIPHER_CTX_copy’
int EVP_CIPHER_CTX_copy(EVP_CIPHER_CTX *out, EVP_CIPHER_CTX *in);
^
In file included from /usr/local/include/openssl/x509.h:73:0,
from /usr/local/include/openssl/x509v3.h:62,
from ossl.h:58,
from ossl_ssl_session.c:5:
/usr/local/include/openssl/evp.h:459:5: note: previous declaration of ‘EVP_CIPHER_CTX_copy’ was here
int EVP_CIPHER_CTX_copy(EVP_CIPHER_CTX *out, const EVP_CIPHER_CTX *in);
^
make[1]: *** [ossl_ssl_session.o] Error 1
make[1]: Leaving directory `/var/groupon/home/XXXXX/.rvm/src/ruby-1.8.7-p374/ext/openssl'
make: *** [all] Error 1
++ return 2
There has been an error while running make. Halting the installation.
我尝试了“How to compile ruby with RVM on a low memory system?”中提到的方法,但我仍然遇到同样的问题。
问题解决了:
rvm pkg install openssl