简体   繁体   中英

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

I can't seem to install Jekyll for some reason. Ruby is installed, as is the package managers, permissions for the directory should be fixed, but I still can't seem to install Jekyll. I'm attaching a rather large code block below, apologies. It's just all the error messages I'm getting in my terminal.

Command "sudo gem install bundler jekyll" fails every time.

    `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

Here's where it says ERROR (15 times) in the file mkmf.log:

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; }

Maybe you have libffi installed or your homebrew isn't up to date. See if it's related to this https://github.com/conan-io/conan/issues/752

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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