无法编译CentOS 5,Ruby 1.9.2和OpenSSL 1.0.0c

我试图在CentOS 5.5上安装Ruby 1.9.2。 我经历了大部分make过程,但是当它试图编译OpenSSL时,我得到一个错误。 下面是输出的错误:

compiling openssl make[1]: Entering directory `/sources/ruby-1.9.2-p136/ext/openssl' gcc -I. -I../../.ext/include/x86_64-linux -I../.././include -I../.././ext/openssl -DRUBY_EXTCONF_H=\"extconf.h\" -fPIC -O3 -ggdb -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-missing-field-initializers -Wno-long-long -o ossl_x509.o -c ossl_x509.c In file included from ossl.h:201, from ossl_x509.c:11: openssl_missing.h:71: error: conflicting types for 'HMAC_CTX_copy' /usr/include/openssl/hmac.h:102: error: previous declaration of 'HMAC_CTX_copy' was here openssl_missing.h:95: error: conflicting types for 'EVP_CIPHER_CTX_copy' /usr/include/openssl/evp.h:459: error: previous declaration of 'EVP_CIPHER_CTX_copy' was here make[1]: *** [ossl_x509.o] Error 1 make[1]: Leaving directory `/sources/ruby-1.9.2-p136/ext/openssl' make: *** [mkmain.sh] Error 1 

任何帮助将不胜感激! 我不是Linux的主人,但是我能够在我们的开发服务器上成功地安装这个版本的Ruby。 我们的现场服务器正在运行一个更新版本的OpenSSL,我假设它是为什么它打破了。 只是不确定是什么修复!

我search了一下, 在CentOS上find了安装Ruby 1.9的博客文章。 我只在CentOS上通过源代码安装了一次或两次Ruby,这已经是一年多了,但是我强烈build议你先用CentOS软件包pipe理器(yum)做所有事情 – 比如安装openssl和openssl-devel百胜,就像这样:

 yum install openssl openssl-devel 

希望这有助于,大卫