gpt4 book ai didi

windows - 在 Windows 上用 ruby​​ 编译 openssl

转载 作者:可可西里 更新时间:2023-11-01 10:09:35 26 4
gpt4 key购买 nike

我正在尝试在装有 MingW 的 Windows 计算机上使用我的 ruby​​ 配置编译 openssl。

我正在使用这些命令运行 ruby​​ 1.9.2rc2:

$ ruby extconf.rb --with-openssl-dir=/c/openssl
...
...
...
=== Checking done. ===
creating extconf.h
creating Makefile
Done.

这没有任何错误。当我尝试制作时:

$ make
gcc -I. -Ic:/Ruby192/include/ruby-1.9.1/i386-mingw32 -I/c/Ruby192/include/ruby-1
.9.1/ruby/backward -I/c/Ruby192/include/ruby-1.9.1 -I. -DRUBY_EXTCONF_H=\"extcon
f.h\" -Ic:/openssl/include -O3 -g -Wall -Wno-unused-parameter -Wno-parenthese
s -Wpointer-arith -Wwrite-strings -Wno-long-long -o openssl_missing.o -c openss
l_missing.c
In file included from openssl_missing.c:22:
openssl_missing.h:71: error: conflicting types for 'HMAC_CTX_copy'
c:/openssl/include/openssl/hmac.h:102: error: previous declaration of 'HMAC_CTX_
copy' was here
openssl_missing.h:71: error: conflicting types for 'HMAC_CTX_copy'
c:/openssl/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'
c:/openssl/include/openssl/evp.h:459: error: previous declaration of 'EVP_CIPHER
_CTX_copy' was here
openssl_missing.h:95: error: conflicting types for 'EVP_CIPHER_CTX_copy'
c:/openssl/include/openssl/evp.h:459: error: previous declaration of 'EVP_CIPHER
_CTX_copy' was here
make: *** [openssl_missing.o] Error 1

这里我得到了一些错误。我确实看到错误在说什么,但我无法理解或解决它。

最佳答案

请问您为什么要尝试编译 openssl 扩展?

它是 Ruby 本身的一部分,使用正确的 OpenSSL 版本应该可以正确编译。

从您正在工作的目录提示,您似乎正在使用基于 RubyInstaller 的安装程序,或者可能试图从头开始工作?

如果是从头开始,我建议您查看RubyInstaller提供位于 GitHub 上的编译配方存储库的项目:

http://github.com/oneclick/rubyinstaller/

希望对您有所帮助。

关于windows - 在 Windows 上用 ruby​​ 编译 openssl,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3242486/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com