繁体   English   中英

无法安装jekyll! 每次“ sudo gem install bundler jekyll”都会失败(MacOS High Sierra 10.13)

[英]Can't install jekyll! “sudo gem install bundler jekyll” fails every time (MacOS High Sierra 10.13)

由于某种原因,我似乎无法安装Jekyll。 已安装了Ruby,包管理器也已安装,目录的权限应该是固定的,但我似乎仍然无法安装Jekyll。 我在下面附加一个相当大的代码块,很抱歉。 这只是我在终端中收到的所有错误消息。

每次命令“ sudo gem install bundler jekyll”都会失败。

    `macs-MBP-2:~ mac$ jekyll -v
-bash: jekyll: command not found
macs-MBP-2:~ mac$ sudo gem install bundler jekyll
Successfully installed bundler-2.0.2
Parsing documentation for bundler-2.0.2
Done installing documentation for bundler after 5 seconds
Building native extensions.  This could take a while...
ERROR:  Error installing jekyll:
    ERROR: Failed to build gem native extension.

    current directory: /Library/Ruby/Gems/2.3.0/gems/ffi-1.11.1/ext/ffi_c
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/ruby -r ./siteconf20190722-66637-luvw3l.rb extconf.rb
checking for ffi.h... no
checking for ffi.h in /usr/local/include,/usr/include/ffi... yes
checking for ffi_call() in -lffi... yes
checking for ffi_closure_alloc()... no
checking for shlwapi.h... no
checking for rb_thread_call_without_gvl()... yes
checking for ruby_native_thread_p()... yes
checking for ruby_thread_has_gvl_p()... yes
creating extconf.h
creating Makefile

To see why this extension failed to compile, please check the mkmf.log which can be found here:

  /Library/Ruby/Gems/2.3.0/extensions/universal-darwin-17/2.3.0/ffi-1.11.1/mkmf.log

current directory: /Library/Ruby/Gems/2.3.0/gems/ffi-1.11.1/ext/ffi_c
make "DESTDIR=" clean

current directory: /Library/Ruby/Gems/2.3.0/gems/ffi-1.11.1/ext/ffi_c
make "DESTDIR="
mkdir -p 
Gem files will remain installed in /Library/Ruby/Gems/2.3.0/gems/ffi-1.11.1 for inspection.
Results logged to /Library/Ruby/Gems/2.3.0/extensions/universal-darwin-17/2.3.0/ffi-1.11.1/gem_make.out

这是在文件mkmf.log中显示错误(15次)的地方:

conftest.c:13:57: error: use of undeclared identifier 'ruby_thread_has_gvl_p' int t(void) { void ((*volatile p)()); p = (void ((*)()))ruby_thread_has_gvl_p; return !p; } 1 error generated. checked program was: /* begin */ 1: #include "ruby.h" 2: 3: /*top*/ 4: extern int t(void); 5: int main(int argc, char **argv) 6: { 7: if (argc > 1000000) { 8: printf("%p", &t); 9: } 10: 11: return 0; 12: } 13: int t(void) { void ((*volatile p)()); p = (void ((*)()))ruby_thread_has_gvl_p; return !p; –
Also: conftest.c:3:10: fatal error: 'ffi.h' file not found #include <ffi.h> ^~~~~~~ 1 error generated. checked program was: /* begin */ 1: #include "ruby.h" 2: 3: #include <ffi.h> /* end */ – conftest.c:13:57: error: use of undeclared identifier 'ffi_closure_alloc' int t(void) { void ((*volatile p)()); p = (void ((*)()))ffi_closure_alloc; return !p; }

也许您已经安装了libffi或者您的自制软件不是最新的。 查看它是否与此https://github.com/conan-io/conan/issues/752相关

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM