刚安装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
这对我很管用
gem install eventmachine -v '1.0.7' -- --debug --backtrace --with-cppflags=-I/usr/local/opt/openssl/include --with-ldflags=-L/usr/local/opt/openssl/lib
Building native extensions with: '--debug --backtrace --with-cppflags=-I/usr/local/opt/openssl/include --with-ldflags=-L/usr/local/opt/openssl/lib'
This could take a while...
Successfully installed eventmachine-1.0.7
Parsing documentation for eventmachine-1.0.7
Installing ri documentation for eventmachine-1.0.7
Done installing documentation for eventmachine after 9 seconds
1 gem installed
注意:在我能够成功安装这个宝石之前,我必须做一些事情。这些可能适用于你,所以在这里列出它们-
1.)退出公司vpn
或者你可能不得不打开代理设置
2)。PKG_CONFIG_PATH设置为-
echo $PKG_CONFIG_PATH
/usr/local/opt/openssl/lib/pkgconfig
3.)必须在bash_profile中添加以下到$PATH(在我的情况下~/.zshrc)
export PATH="/usr/local/opt/openssl/bin:$PATH"
4)。另外请注意,与我在这篇SO帖子中得到的一些答案相反,以及github-eventmachine上的这个线程,我无法安装eventmachine
gem install eventmachine -v '1.0.7' -- --debug --backtrace --with-cppflags=-I/usr/local/include --with-ldflags=-L/usr/local/lib
Fetching: eventmachine-1.0.7.gem (100%)
Building native extensions with: '--debug --backtrace --with-cppflags=-I/usr/local/include --with-ldflags=-L/usr/local/lib'
This could take a while...
ERROR: Error installing eventmachine:
ERROR: Failed to build gem native extension.
在指定openssl位置时,/usr/local/opt/openssl/include似乎是正确的位置,而不是/usr/local/include。
这对我很管用
gem install eventmachine -v '1.0.7' -- --debug --backtrace --with-cppflags=-I/usr/local/opt/openssl/include --with-ldflags=-L/usr/local/opt/openssl/lib
Building native extensions with: '--debug --backtrace --with-cppflags=-I/usr/local/opt/openssl/include --with-ldflags=-L/usr/local/opt/openssl/lib'
This could take a while...
Successfully installed eventmachine-1.0.7
Parsing documentation for eventmachine-1.0.7
Installing ri documentation for eventmachine-1.0.7
Done installing documentation for eventmachine after 9 seconds
1 gem installed
注意:在我能够成功安装这个宝石之前,我必须做一些事情。这些可能适用于你,所以在这里列出它们-
1.)退出公司vpn
或者你可能不得不打开代理设置
2)。PKG_CONFIG_PATH设置为-
echo $PKG_CONFIG_PATH
/usr/local/opt/openssl/lib/pkgconfig
3.)必须在bash_profile中添加以下到$PATH(在我的情况下~/.zshrc)
export PATH="/usr/local/opt/openssl/bin:$PATH"
4)。另外请注意,与我在这篇SO帖子中得到的一些答案相反,以及github-eventmachine上的这个线程,我无法安装eventmachine
gem install eventmachine -v '1.0.7' -- --debug --backtrace --with-cppflags=-I/usr/local/include --with-ldflags=-L/usr/local/lib
Fetching: eventmachine-1.0.7.gem (100%)
Building native extensions with: '--debug --backtrace --with-cppflags=-I/usr/local/include --with-ldflags=-L/usr/local/lib'
This could take a while...
ERROR: Error installing eventmachine:
ERROR: Failed to build gem native extension.
在指定openssl位置时,/usr/local/opt/openssl/include似乎是正确的位置,而不是/usr/local/include。