Github Pages上的Jekyll设置,捆绑安装问题

时间:2018-08-16 04:17:15

标签: ruby jekyll mamp github-pages

编辑:我正在使用Mac OS 10.12.3

我尝试将rvm与ruby-2.4.1一起使用。正在尝试按照此处的步骤操作:https://github.com/GA-MO/react-confirm-alert/blob/master/src/index.js

这是我的日志(当我尝试捆绑安装时):

An error occurred while installing eventmachine (1.2.7), and Bundler
cannot continue.
Make sure that `gem install eventmachine -v '1.2.7' --source
'https://rubygems.org/'` succeeds before bundling. current directory:
/Users/mins/.rvm/gems/ruby-2.4.1/gems/eventmachine-1.2.7/ext
/Applications/MAMP/Library/bin/ruby -r ./siteconf20180816-33407-1kj3dfq.rb
extconf.rb
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers.  Check the mkmf.log file for more details.  You may
need configuration options.

mkmf.log:

"clang -o conftest -I/Applications/MAMP/Library/include/ruby-2.3.0/x86_64-darwin13 -I/Applications/MAMP/Library/include/ruby-2.3.0/ruby/backward -I/Applications/MAMP/Library/include/ruby-2.3.0 -I. -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT   -pipe conftest.c  -L. -L/Applications/MAMP/Library/lib -L. -fstack-protector     -lruby-static -framework CoreFoundation  -lpthread -ldl -lobjc "
ld: library not found for -lruby-static
clang: error: linker command failed with exit code 1 (use -v to see invocation)
checked program was:
/* begin */
1: #include "ruby.h"
2: 
3: int main(int argc, char **argv)
4: {
5:   return 0;
6: }
/* end */

| pkg-config --libs openssl
=> "dyld: Symbol not found: __cg_jpeg_resync_to_restart\n"
=> "  Referenced from: /System/Library/Frameworks/ImageIO.framework/Versions/A/ImageIO\n"
=> "  Expected in: /Applications/MAMP/Library/lib/libJPEG.dylib\n"
=> " in /System/Library/Frameworks/ImageIO.framework/Versions/A/ImageIO\n"

1 个答案:

答案 0 :(得分:0)

blog post指向“ Conflict between dynamic linking priority in OSX?”。

尤其是,假设您使用的是MacOS:

  

在我的bash_profile中放入以下变量:

export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:/usr/local/lib/

和/或:

  

解决方案是删除/usr/local/lib目录中的某些dlylib,并创建指向相关文件/System/Library/Frameworks/ImageIO.framework/Resources/的符号链接:

$ cd /usr/local/lib
$ rm libgif.dylib
$ ln -s /System/Library/Frameworks/ImageIO.framework/Resources/libGIF.dylib libGIF.dylib
$ rm libjpeg.dylib
$ ln -s /System/Library/Frameworks/ImageIO.framework/Resources/libJPEG.dylib libJPEG.dylib
$ rm libtiff.dylib
$ ln -s /System/Library/Frameworks/ImageIO.framework/Resources/libTIFF.dylib libTIFF.dylib
$ rm libpng.dylib
$ ln -s /System/Library/Frameworks/ImageIO.framework/Resources/libPng.dylib libPng.dylib