fir*_*dev 265 ruby macos homebrew openssl eventmachine
刚安装El Capitan并且无法安装gem eventmachine
1.0.7
.openssl
在1.0.2a-1
.试图使用--with-ssl-dir
但似乎被忽略了.
报告给他们的github回购也.
任何建议都非常感谢.谢谢.
$ ls /usr/local/Cellar/openssl/1.0.2a-1/include/openssl/ssl.h
/usr/local/Cellar/openssl/1.0.2a-1/include/openssl/ssl.h
$ gem install eventmachine -v '1.0.7' -- --with-ssl-dir=/usr/local/Cellar/openssl/1.0.2a-1/include
/Users/pain/.rbenv/versions/2.1.2/bin/ruby -r ./siteconf20150612-56154-1hsjz2n.rb extconf.rb --with-ssl-dir=/usr/local/Cellar/openssl/1.0.2a-1/include
checking for rb_trap_immediate in ruby.h,rubysig.h... no
checking for rb_thread_blocking_region()... yes
checking for ruby/thread.h... yes
checking for rb_thread_call_without_gvl() in ruby/thread.h... yes
checking for inotify_init() in sys/inotify.h... no
checking for __NR_inotify_init in sys/syscall.h... no
checking for writev() in sys/uio.h... yes
checking for rb_thread_fd_select()... yes
checking for rb_fdset_t in ruby/intern.h... yes
checking for rb_wait_for_single_fd()... yes
checking for rb_enable_interrupt()... no
checking for rb_time_new()... yes
checking for sys/event.h... yes
checking for sys/queue... yes
checking for clock_gettime()... no
checking for gethrtime()... no
creating Makefile
make "DESTDIR=" clean
make "DESTDIR="
compiling binder.cpp
In file included from binder.cpp:20:
./project.h:116:10: fatal error: 'openssl/ssl.h' file not found
#include <openssl/ssl.h>
^
1 error generated.
make: *** [binder.o] Error 1
make failed, exit code 2
Run Code Online (Sandbox Code Playgroud)
fir*_*dev 513
$ gem install eventmachine -- --with-cppflags=-I/usr/local/opt/openssl/include
Building native extensions with: '--with-cppflags=-I/usr/local/opt/openssl/include'
This could take a while...
Successfully installed eventmachine-1.0.8
1 gem installed
Run Code Online (Sandbox Code Playgroud)
你也可以设置这样的捆绑器,但我认为这是肤浅的
bundle config build.eventmachine --with-cppflags=-I/usr/local/opt/openssl/include
Run Code Online (Sandbox Code Playgroud)
Llo*_*eki 231
使用bundler和homebrew时:
$ bundle config build.eventmachine --with-cppflags=-I$(brew --prefix openssl)/include
$ bundle install
Run Code Online (Sandbox Code Playgroud)
its*_*lay 115
brew link --force openssl
Run Code Online (Sandbox Code Playgroud)
然后:
gem install eventmachine
Run Code Online (Sandbox Code Playgroud)
它还修复了:
PS可能你需要删除并brew install openssl
重新运行
这个问题发生了,因为Apple从OSX中移除了openssl(在El Captain构建中)
jLu*_*Luc 13
gem pristine eventmachine -- --with-cppflags=-I/usr/local/opt/openssl/include
Run Code Online (Sandbox Code Playgroud)
原始删除旧宝石并重新编译它.
cpp flags选项允许编译器查找openssl头文件.
如果您愿意,也可以添加版本:
gem pristine eventmachine -v '1.0.4' -- --with-cppflags=-I/usr/local/opt/openssl/include
Run Code Online (Sandbox Code Playgroud)
我试图安装v 1.0.3,这对我有用.
gem install eventmachine -v '1.0.3' -- --with-cppflags=-I/usr/local/opt/openssl/include
Run Code Online (Sandbox Code Playgroud)
这些讨论非常有帮助.https://github.com/eventmachine/eventmachine/issues/602
这看起来像是最近的问题:https ://github.com/eventmachine/eventmachine/issues/936
我在 macOS 上12.3.1
通过以下方法解决了这个问题:
M1 最大:
gem install eventmachine -- --with-openssl-dir=/opt/homebrew/Cellar/openssl@1.1/1.1.1n/
Run Code Online (Sandbox Code Playgroud)
英特尔:
gem install eventmachine -- --with-openssl-dir=/usr/local/Cellar/openssl@1.1/1.1.1n/
Run Code Online (Sandbox Code Playgroud)
如果您要将EventMachine安装为另一个gem的依赖项,请确保在手动安装gem时指定正确的版本:
gem install eventmachine -v 1.0.5 -- --with-cppflags=-I$(brew --prefix openssl)/include
Run Code Online (Sandbox Code Playgroud)
然后,您可以安装最初尝试安装的gem:
gem install mailcatcher
Run Code Online (Sandbox Code Playgroud)
这为我解决了问题:
PKG_CONFIG_PATH="$(brew --prefix openssl)/lib/pkgconfig" gem install eventmachine -v "1.0.8"
Run Code Online (Sandbox Code Playgroud)
来源:https : //github.com/sj26/mailcatcher/issues/254
一种替代方法是为整个用户配置文件添加捆绑器配置条目,如下所示:
cd ~
bundle config build.eventmachine --with-cppflags=-I$(brew --prefix openssl)/include
Run Code Online (Sandbox Code Playgroud)
它将在您的主目录中创建一个 .bundle/config 文件,然后在您运行时在所有项目中使用该文件bundle install
。
我遇到了同样的 eventmachine 问题,上面的答案对我不起作用,最后使用给定的 openssl 版本重新安装 ruby:
rvm reinstall 3.1.2 --with-openssl-dir=/usr/local/opt/openssl@3
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
55058 次 |
最近记录: |