【问题标题】:Jekyll setup on Github Pages, issues with bundle installGithub Pages 上的 Jekyll 设置,捆绑安装的问题
【发布时间】:2018-08-16 04:17:14
【问题描述】:

编辑:我使用的是 Mac OS 10.12.3

我尝试将 rvm 与 ruby​​-2.4.1 一起使用。正在尝试按照此处的步骤操作:https://help.github.com/articles/setting-up-your-github-pages-site-locally-with-jekyll/

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

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"

【问题讨论】:

    标签: ruby jekyll mamp github-pages


    【解决方案1】:

    这个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目录下的一些dlylibs,并创建指向相关文件/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
    

    【讨论】:

    • 您好,感谢资源!我尝试将导出语句添加到 .bash_profile 并使用源 .bash_profile,当我尝试再次捆绑安装时,这似乎不起作用(得到相同的错误)。然后我尝试按照说明进入 usr/local/lib 并删除 libgif.dylib 但它说没有这样的文件或目录
    • @MINS 你用的是什么操作系统?
    • Mac OS 10.12.3 @VonC​​pan>
    • @MINS 在/usr/local/lib 中还有其他libXXX.dylib 文件吗?即使rm 部分失败,你能做ln -s 部分吗?
    • 这是我里面的东西:libruby.2.3.0.dylib libruby.2.3.dylib libyaml-0.2.dylib
    猜你喜欢
    • 2023-01-24
    • 1970-01-01
    • 1970-01-01
    • 2011-05-23
    • 1970-01-01
    • 2018-02-10
    • 2012-09-11
    • 2012-02-20
    相关资源
    最近更新 更多