jekyll: Cannot install Jekyll on MacOS Mojave

I used Jekyll on my MacBook Pro without any problem in the previous version of MacOS. I updated my MacBook Pro to the new OS version (10.14), and Jekyll did not work anymore. So I uninstalled it, and now I cannot install it again.

ruby 2.5.1p57 (2018-03-29 revision 63029) [x86_64-darwin18]

I am using the following command to install sudo gem install bundler jekyll

Output `Successfully installed bundler-1.16.5 Parsing documentation for bundler-1.16.5 Done installing documentation for bundler after 3 seconds Building native extensions. This could take a while... ERROR: Error installing jekyll: ERROR: Failed to build gem native extension.
current directory: /usr/local/lib/ruby/gems/2.5.0/gems/ffi-1.9.25/ext/ffi_c

/usr/local/opt/ruby/bin/ruby -r ./siteconf20180925-70551-fjs550.rb extconf.rb checking for ffi.h… no checking for ffi.h in /usr/local/include,/usr/include/ffi… no checking for shlwapi.h… no checking for ruby/thread.h… yes checking for rb_thread_blocking_region()… no checking for rb_thread_call_with_gvl()… yes checking for rb_thread_call_without_gvl()… yes creating extconf.h creating Makefile

current directory: /usr/local/lib/ruby/gems/2.5.0/gems/ffi-1.9.25/ext/ffi_c make “DESTDIR=” clean

current directory: /usr/local/lib/ruby/gems/2.5.0/gems/ffi-1.9.25/ext/ffi_c make “DESTDIR=” Configuring libffi configure: error: in /usr/local/lib/ruby/gems/2.5.0/gems/ffi-1.9.25/ext/ffi_c/libffi-x86_64-darwin18': configure: error: C++ preprocessor "/lib/cpp" fails sanity check See config.log’ for more details make: *** [libffi.darwin.mk:32: “/usr/local/lib/ruby/gems/2.5.0/gems/ffi-1.9.25/ext/ffi_c/libffi-x86_64-darwin18”/.libs/libffi_convenience.a] Error 1

make failed, exit code 2

Gem files will remain installed in /usr/local/lib/ruby/gems/2.5.0/gems/ffi-1.9.25 for inspection. Results logged to /usr/local/lib/ruby/gems/2.5.0/extensions/x86_64-darwin-18/2.5.0/ffi-1.9.25/gem_make.out 1 gem installed`

The log file: `This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake.

It was created by libffi configure 3.99999, which was generated by GNU Autoconf 2.69. Invocation command line was

$ /usr/local/lib/ruby/gems/2.5.0/gems/ffi-1.9.25/ext/ffi_c/libffi/configure --disable-static --with-pic=yes --disable-dependency-tracking --disable-docs --host=

---------

Platform.

---------

hostname = Macbook-Pro-Henrique.local uname -m = x86_64 uname -r = 18.0.0 uname -s = Darwin uname -v = Darwin Kernel Version 18.0.0: Wed Aug 22 20:13:40 PDT 2018; root:xnu-4903.201.2~1/RELEASE_X86_64

/usr/bin/uname -p = i386 /bin/uname -X = unknown

/bin/arch = unknown /usr/bin/arch -k = unknown /usr/convex/getsysinfo = unknown /usr/bin/hostinfo = Mach kernel version: Darwin Kernel Version 18.0.0: Wed Aug 22 20:13:40 PDT 2018; root:xnu-4903.201.2~1/RELEASE_X86_64 Kernel configured for up to 8 processors. 4 processors are physically available. 8 processors are logically available. Processor type: x86_64h (Intel x86-64h Haswell) Processors active: 0 1 2 3 4 5 6 7 Primary memory available: 8.00 gigabytes Default processor set: 411 tasks, 1633 threads, 8 processors Load average: 3.25, Mach factor: 4.74 /bin/machine = unknown /usr/bin/oslevel = unknown /bin/universe = unknown

PATH: /Users/Henrique/Library/Orca401 PATH: /usr/local/bin PATH: /Users/Henrique/Downloads/NAMD PATH: /opt/local/bin PATH: /opt/local/sbin PATH: /usr/local/bin PATH: /Library/Frameworks/Python.framework/Versions/3.4/bin PATH: /opt/local/bin PATH: /opt/local/sbin PATH: /usr/local/mysql/bin PATH: /usr/local/bin PATH: /usr/bin PATH: /bin PATH: /usr/sbin PATH: /sbin PATH: export AMBERHOME=/Users/Henrique/amber14 PATH: export PATH=$PATH PATH: AMBERHOME/bin PATH: /usr/local/share/dotnet PATH: /opt/X11/bin PATH: /Applications/Server.app/Contents/ServerRoot/usr/bin PATH: /Applications/Server.app/Contents/ServerRoot/usr/sbin PATH: /Library/Frameworks/Mono.framework/Versions/Current/Commands PATH: /opt/ImageMagick/bin

-----------

Core tests.

-----------

configure:2704: checking build system type configure:2718: result: x86_64-apple-darwin18.0.0 configure:2738: checking host system type configure:2751: result: x86_64-apple-darwin18.0.0 configure:2771: checking target system type configure:2784: result: x86_64-apple-darwin18.0.0 configure:2881: checking for gsed configure:2912: result: sed configure:2940: checking for a BSD-compatible install configure:3008: result: /usr/local/bin/ginstall -c configure:3019: checking whether build environment is sane configure:3074: result: yes configure:3222: checking for a thread-safe mkdir -p configure:3261: result: /usr/local/bin/gmkdir -p configure:3268: checking for gawk configure:3284: found /usr/local/bin/gawk configure:3295: result: gawk configure:3306: checking whether make sets $(MAKE) configure:3328: result: yes configure:3357: checking whether make supports nested variables configure:3374: result: yes configure:3559: checking for gcc configure:3586: result: clang configure:3815: checking for C compiler version configure:3824: clang --version >&5 Apple LLVM version 10.0.0 (clang-1000.11.45.2) Target: x86_64-apple-darwin18.0.0 Thread model: posix InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin configure:3835: $? = 0 configure:3824: clang -v >&5 Apple LLVM version 10.0.0 (clang-1000.11.45.2) Target: x86_64-apple-darwin18.0.0 Thread model: posix InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin configure:3835: $? = 0 configure:3824: clang -V >&5 clang: error: argument to ‘-V’ is missing (expected 1 value) clang: error: no input files configure:3835: $? = 1 configure:3824: clang -qversion >&5 clang: error: unknown argument: ‘-qversion’ clang: error: no input files configure:3835: $? = 1 configure:3855: checking whether the C compiler works configure:3877: clang conftest.c >&5 configure:3881: $? = 0 configure:3929: result: yes configure:3932: checking for C compiler default output file name configure:3934: result: a.out configure:3940: checking for suffix of executables configure:3947: clang -o conftest conftest.c >&5 configure:3951: $? = 0 configure:3973: result: configure:3995: checking whether we are cross compiling configure:4003: clang -o conftest conftest.c >&5 configure:4007: $? = 0 configure:4014: ./conftest configure:4018: $? = 0 configure:4033: result: no configure:4038: checking for suffix of object files configure:4060: clang -c conftest.c >&5 configure:4064: $? = 0 configure:4085: result: o configure:4089: checking whether we are using the GNU C compiler configure:4108: clang -c conftest.c >&5 configure:4108: $? = 0 configure:4117: result: yes configure:4126: checking whether clang accepts -g configure:4146: clang -c -g conftest.c >&5 configure:4146: $? = 0 configure:4187: result: yes configure:4204: checking for clang option to accept ISO C89 configure:4267: clang -c conftest.c >&5 configure:4267: $? = 0 configure:4280: result: none needed configure:4305: checking whether clang understands -c and -o together configure:4327: clang -c conftest.c -o conftest2.o configure:4330: $? = 0 configure:4327: clang -c conftest.c -o conftest2.o configure:4330: $? = 0 configure:4342: result: yes configure:4370: checking for style of include used by make configure:4398: result: GNU configure:4424: checking dependency style of clang configure:4535: result: none configure:4608: checking for g++ configure:4624: found /usr/local/bin/g++ configure:4635: result: g++ configure:4662: checking for C++ compiler version configure:4671: g++ --version >&5 g++ (GCC) 5.2.0 Copyright © 2015 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

configure:4682: $? = 0 configure:4671: g++ -v >&5 Using built-in specs. COLLECT_GCC=g++ COLLECT_LTO_WRAPPER=/usr/local/libexec/gcc/x86_64-apple-darwin15.0.0/5.2.0/lto-wrapper Target: x86_64-apple-darwin15.0.0 Configured with: …/gcc-5.2.0/configure --enable-languages=c++,fortran Thread model: posix gcc version 5.2.0 (GCC) configure:4682: $? = 0 configure:4671: g++ -V >&5 g++: error: unrecognized command line option ‘-V’ g++: fatal error: no input files compilation terminated. configure:4682: $? = 1 configure:4671: g++ -qversion >&5 g++: error: unrecognized command line option ‘-qversion’ g++: fatal error: no input files compilation terminated. configure:4682: $? = 1 configure:4686: checking whether we are using the GNU C++ compiler configure:4705: g++ -c conftest.cpp >&5 configure:4705: $? = 0 configure:4714: result: yes configure:4723: checking whether g++ accepts -g configure:4743: g++ -c -g conftest.cpp >&5 configure:4743: $? = 0 configure:4784: result: yes configure:4809: checking dependency style of g++ configure:4920: result: none configure:4950: checking dependency style of clang configure:5059: result: none configure:5121: checking how to print strings configure:5148: result: printf configure:5169: checking for a sed that does not truncate output configure:5233: result: /usr/local/bin/sed configure:5251: checking for grep that handles long lines and -e configure:5309: result: /usr/local/bin/ggrep configure:5314: checking for egrep configure:5376: result: /usr/local/bin/ggrep -E configure:5381: checking for fgrep configure:5443: result: /usr/local/bin/ggrep -F configure:5478: checking for ld used by clang configure:5545: result: ld configure:5552: checking if the linker (ld) is GNU ld configure:5567: result: no configure:5579: checking for BSD- or MS-compatible name lister (nm) configure:5633: result: /usr/bin/nm -B configure:5763: checking the name lister (/usr/bin/nm -B) interface configure:5770: clang -c conftest.c >&5 configure:5773: /usr/bin/nm -B “conftest.o” configure:5776: output 0000000000000000 S some_variable configure:5783: result: BSD nm configure:5786: checking whether ln -s works configure:5790: result: yes configure:5798: checking the maximum length of command line arguments configure:5929: result: 196608 configure:5977: checking how to convert x86_64-apple-darwin18.0.0 file names to x86_64-apple-darwin18.0.0 format configure:6017: result: func_convert_file_noop configure:6024: checking how to convert x86_64-apple-darwin18.0.0 file names to toolchain format configure:6044: result: func_convert_file_noop configure:6051: checking for ld option to reload object files configure:6058: result: -r configure:6132: checking for objdump configure:6148: found /usr/bin/objdump configure:6159: result: objdump configure:6191: checking how to recognize dependent libraries configure:6391: result: pass_all configure:6476: checking for dlltool configure:6506: result: no configure:6536: checking how to associate runtime and link libraries configure:6563: result: printf %s\n configure:6624: checking for ar configure:6640: found /opt/local/bin/ar configure:6651: result: ar configure:6688: checking for archiver @FILE support configure:6705: clang -c conftest.c >&5 configure:6705: $? = 0 configure:6708: ar cru libconftest.a @conftest.lst >&5 ar: @conftest.lst: No such file or directory configure:6711: $? = 1 configure:6731: result: no configure:6789: checking for strip configure:6805: found /opt/local/bin/strip configure:6816: result: strip configure:6888: checking for ranlib configure:6904: found /opt/local/bin/ranlib configure:6915: result: ranlib configure:7017: checking command to parse /usr/bin/nm -B output from clang object configure:7170: clang -c conftest.c >&5 configure:7173: $? = 0 configure:7177: /usr/bin/nm -B conftest.o | sed -n -e ‘s/^.[ ]([BCDEGRST][BCDEGRST])[ ][ ]([_A-Za-z][_A-Za-z0-9])$/\1 \2 \2/p’ | sed ‘/ __gnu_lto/d’ > conftest.nm configure:7180: $? = 0 cannot find nm_test_var in conftest.nm configure:7170: clang -c conftest.c >&5 configure:7173: $? = 0 configure:7177: /usr/bin/nm -B conftest.o | sed -n -e 's/^.[ ]([BCDEGRST][BCDEGRST])[ ][ ]*([_A-Za-z][_A-Za-z0-9])$/\1 _\2 \2/p’ | sed ‘/ __gnu_lto/d’ > conftest.nm configure:7180: $? = 0 configure:7246: clang -o conftest conftest.c conftstm.o >&5 configure:7249: $? = 0 configure:7287: result: ok configure:7334: checking for sysroot configure:7364: result: no configure:7371: checking for a working dd configure:7409: result: /bin/dd configure:7413: checking how to truncate binary pipes configure:7428: result: /bin/dd bs=4096 count=1 configure:7757: checking for mt configure:7787: result: no configure:7807: checking if : is a manifest tool configure:7813: : ‘-?’ configure:7821: result: no configure:7877: checking for dsymutil configure:7893: found /usr/bin/dsymutil configure:7904: result: dsymutil configure:7969: checking for nmedit configure:7985: found /opt/local/bin/nmedit configure:7996: result: nmedit configure:8061: checking for lipo configure:8077: found /opt/local/bin/lipo configure:8088: result: lipo configure:8153: checking for otool configure:8169: found /opt/local/bin/otool configure:8180: result: otool configure:8245: checking for otool64 configure:8275: result: no configure:8320: checking for -single_module linker flag clang -o libconftest.dylib -dynamiclib -Wl,-single_module conftest.c configure:8353: result: yes configure:8356: checking for -exported_symbols_list linker flag configure:8376: clang -o conftest -Wl,-exported_symbols_list,conftest.sym conftest.c >&5 configure:8376: $? = 0 configure:8386: result: yes configure:8389: checking for -force_load linker flag clang -c -o conftest.o conftest.c ar cru libconftest.a conftest.o /opt/local/bin/ranlib: object: libconftest.a(conftest.o) malformed object (unknown load command 1) ar: internal ranlib command failed ranlib libconftest.a ranlib: object: libconftest.a(conftest.o) malformed object (unknown load command 1) clang -o conftest conftest.c -Wl,-force_load,./libconftest.a ld: archive has no table of contents file ‘./libconftest.a’ for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) configure:8421: result: no configure:8498: checking how to run the C preprocessor configure:8529: clang -E conftest.c configure:8529: $? = 0 configure:8543: clang -E conftest.c conftest.c:11:10: fatal error: ‘ac_nonexistent.h’ file not found #include <ac_nonexistent.h> ^~~~~~~~~~~~~~~~~~ 1 error generated. configure:8543: $? = 1 configure: failed program was: | / confdefs.h / | #define PACKAGE_NAME “libffi” | #define PACKAGE_TARNAME “libffi” | #define PACKAGE_VERSION “3.99999” | #define PACKAGE_STRING “libffi 3.99999” | #define PACKAGE_BUGREPORT “http://github.com/libffi/libffi/issues” | #define PACKAGE_URL “” | #define PACKAGE “libffi” | #define VERSION “3.99999” | / end confdefs.h. / | #include <ac_nonexistent.h> configure:8568: result: clang -E configure:8588: clang -E conftest.c configure:8588: $? = 0 configure:8602: clang -E conftest.c conftest.c:11:10: fatal error: ‘ac_nonexistent.h’ file not found #include <ac_nonexistent.h> ^~~~~~~~~~~~~~~~~~ 1 error generated. configure:8602: $? = 1 configure: failed program was: | / confdefs.h / | #define PACKAGE_NAME “libffi” | #define PACKAGE_TARNAME “libffi” | #define PACKAGE_VERSION “3.99999” | #define PACKAGE_STRING “libffi 3.99999” | #define PACKAGE_BUGREPORT “http://github.com/libffi/libffi/issues” | #define PACKAGE_URL “” | #define PACKAGE “libffi” | #define VERSION “3.99999” | / end confdefs.h. / | #include <ac_nonexistent.h> configure:8631: checking for ANSI C header files configure:8651: clang -c conftest.c >&5 configure:8651: $? = 0 configure:8724: clang -o conftest conftest.c >&5 configure:8724: $? = 0 configure:8724: ./conftest configure:8724: $? = 0 configure:8735: result: yes configure:8748: checking for sys/types.h configure:8748: clang -c conftest.c >&5 configure:8748: $? = 0 configure:8748: result: yes configure:8748: checking for sys/stat.h configure:8748: clang -c conftest.c >&5 configure:8748: $? = 0 configure:8748: result: yes configure:8748: checking for stdlib.h configure:8748: clang -c conftest.c >&5 configure:8748: $? = 0 configure:8748: result: yes configure:8748: checking for string.h configure:8748: clang -c conftest.c >&5 configure:8748: $? = 0 configure:8748: result: yes configure:8748: checking for memory.h configure:8748: clang -c conftest.c >&5 configure:8748: $? = 0 configure:8748: result: yes configure:8748: checking for strings.h configure:8748: clang -c conftest.c >&5 configure:8748: $? = 0 configure:8748: result: yes configure:8748: checking for inttypes.h configure:8748: clang -c conftest.c >&5 configure:8748: $? = 0 configure:8748: result: yes configure:8748: checking for stdint.h configure:8748: clang -c conftest.c >&5 configure:8748: $? = 0 configure:8748: result: yes configure:8748: checking for unistd.h configure:8748: clang -c conftest.c >&5 configure:8748: $? = 0 configure:8748: result: yes configure:8762: checking for dlfcn.h configure:8762: clang -c conftest.c >&5 configure:8762: $? = 0 configure:8762: result: yes configure:9029: checking for objdir configure:9044: result: .libs configure:9308: checking if clang supports -fno-rtti -fno-exceptions configure:9326: clang -c -fno-rtti -fno-exceptions conftest.c >&5 configure:9330: $? = 0 configure:9343: result: yes configure:9701: checking for clang option to produce PIC configure:9708: result: -fno-common -DPIC configure:9716: checking if clang PIC flag -fno-common -DPIC works configure:9734: clang -c -fno-common -DPIC -DPIC conftest.c >&5 configure:9738: $? = 0 configure:9751: result: yes configure:9780: checking if clang static flag -static works configure:9808: result: no configure:9823: checking if clang supports -c -o file.o configure:9844: clang -c -o out/conftest2.o conftest.c >&5 configure:9848: $? = 0 configure:9870: result: yes configure:9878: checking if clang supports -c -o file.o configure:9925: result: yes configure:9958: checking whether the clang linker (ld) supports shared libraries configure:11221: result: yes configure:11461: checking dynamic linker characteristics configure:12291: result: darwin18.0.0 dyld configure:12413: checking how to hardcode library paths into programs configure:12438: result: immediate configure:12986: checking whether stripping libraries is possible configure:13000: result: yes configure:13026: checking if libtool supports shared libraries configure:13028: result: yes configure:13031: checking whether to build shared libraries configure:13056: result: yes configure:13059: checking whether to build static libraries configure:13063: result: no configure:13086: checking how to run the C++ preprocessor configure:13113: g++ -E conftest.cpp In file included from /usr/local/lib/gcc/x86_64-apple-darwin15.0.0/5.2.0/include-fixed/syslimits.h:7:0, from /usr/local/lib/gcc/x86_64-apple-darwin15.0.0/5.2.0/include-fixed/limits.h:34, from conftest.cpp:24: /usr/local/lib/gcc/x86_64-apple-darwin15.0.0/5.2.0/include-fixed/limits.h:168:61: fatal error: limits.h: No such file or directory compilation terminated. configure:13113: $? = 1 configure: failed program was: | / confdefs.h / | #define PACKAGE_NAME “libffi” | #define PACKAGE_TARNAME “libffi” | #define PACKAGE_VERSION “3.99999” | #define PACKAGE_STRING “libffi 3.99999” | #define PACKAGE_BUGREPORT “http://github.com/libffi/libffi/issues” | #define PACKAGE_URL “” | #define PACKAGE “libffi” | #define VERSION “3.99999” | #define STDC_HEADERS 1 | #define HAVE_SYS_TYPES_H 1 | #define HAVE_SYS_STAT_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_MEMORY_H 1 | #define HAVE_STRINGS_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_DLFCN_H 1 | #define LT_OBJDIR “.libs/” | / end confdefs.h. / | #ifdef STDC | # include <limits.h> | #else | # include <assert.h> | #endif | Syntax error configure:13113: g++ -E conftest.cpp In file included from /usr/local/lib/gcc/x86_64-apple-darwin15.0.0/5.2.0/include-fixed/syslimits.h:7:0, from /usr/local/lib/gcc/x86_64-apple-darwin15.0.0/5.2.0/include-fixed/limits.h:34, from conftest.cpp:24: /usr/local/lib/gcc/x86_64-apple-darwin15.0.0/5.2.0/include-fixed/limits.h:168:61: fatal error: limits.h: No such file or directory compilation terminated. configure:13113: $? = 1 configure: failed program was: | / confdefs.h / | #define PACKAGE_NAME “libffi” | #define PACKAGE_TARNAME “libffi” | #define PACKAGE_VERSION “3.99999” | #define PACKAGE_STRING “libffi 3.99999” | #define PACKAGE_BUGREPORT “http://github.com/libffi/libffi/issues” | #define PACKAGE_URL “” | #define PACKAGE “libffi” | #define VERSION “3.99999” | #define STDC_HEADERS 1 | #define HAVE_SYS_TYPES_H 1 | #define HAVE_SYS_STAT_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_MEMORY_H 1 | #define HAVE_STRINGS_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_DLFCN_H 1 | #define LT_OBJDIR “.libs/” | / end confdefs.h. / | #ifdef STDC | # include <limits.h> | #else | # include <assert.h> | #endif | Syntax error configure:13113: /lib/cpp conftest.cpp /usr/local/lib/ruby/gems/2.5.0/gems/ffi-1.9.25/ext/ffi_c/libffi/configure: line 1919: /lib/cpp: No such file or directory configure:13113: $? = 127 configure: failed program was: | / confdefs.h / | #define PACKAGE_NAME “libffi” | #define PACKAGE_TARNAME “libffi” | #define PACKAGE_VERSION “3.99999” | #define PACKAGE_STRING “libffi 3.99999” | #define PACKAGE_BUGREPORT “http://github.com/libffi/libffi/issues” | #define PACKAGE_URL “” | #define PACKAGE “libffi” | #define VERSION “3.99999” | #define STDC_HEADERS 1 | #define HAVE_SYS_TYPES_H 1 | #define HAVE_SYS_STAT_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_MEMORY_H 1 | #define HAVE_STRINGS_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_DLFCN_H 1 | #define LT_OBJDIR “.libs/” | / end confdefs.h. / | #ifdef STDC | # include <limits.h> | #else | # include <assert.h> | #endif | Syntax error configure:13113: /lib/cpp conftest.cpp /usr/local/lib/ruby/gems/2.5.0/gems/ffi-1.9.25/ext/ffi_c/libffi/configure: line 1919: /lib/cpp: No such file or directory configure:13113: $? = 127 configure: failed program was: | / confdefs.h / | #define PACKAGE_NAME “libffi” | #define PACKAGE_TARNAME “libffi” | #define PACKAGE_VERSION “3.99999” | #define PACKAGE_STRING “libffi 3.99999” | #define PACKAGE_BUGREPORT “http://github.com/libffi/libffi/issues” | #define PACKAGE_URL “” | #define PACKAGE “libffi” | #define VERSION “3.99999” | #define STDC_HEADERS 1 | #define HAVE_SYS_TYPES_H 1 | #define HAVE_SYS_STAT_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_MEMORY_H 1 | #define HAVE_STRINGS_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_DLFCN_H 1 | #define LT_OBJDIR “.libs/” | / end confdefs.h. / | #ifdef STDC | # include <limits.h> | #else | # include <assert.h> | #endif | Syntax error configure:13152: result: /lib/cpp configure:13172: /lib/cpp conftest.cpp /usr/local/lib/ruby/gems/2.5.0/gems/ffi-1.9.25/ext/ffi_c/libffi/configure: line 1919: /lib/cpp: No such file or directory configure:13172: $? = 127 configure: failed program was: | / confdefs.h / | #define PACKAGE_NAME “libffi” | #define PACKAGE_TARNAME “libffi” | #define PACKAGE_VERSION “3.99999” | #define PACKAGE_STRING “libffi 3.99999” | #define PACKAGE_BUGREPORT “http://github.com/libffi/libffi/issues” | #define PACKAGE_URL “” | #define PACKAGE “libffi” | #define VERSION “3.99999” | #define STDC_HEADERS 1 | #define HAVE_SYS_TYPES_H 1 | #define HAVE_SYS_STAT_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_MEMORY_H 1 | #define HAVE_STRINGS_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_DLFCN_H 1 | #define LT_OBJDIR “.libs/” | / end confdefs.h. / | #ifdef STDC | # include <limits.h> | #else | # include <assert.h> | #endif | Syntax error configure:13172: /lib/cpp conftest.cpp /usr/local/lib/ruby/gems/2.5.0/gems/ffi-1.9.25/ext/ffi_c/libffi/configure: line 1919: /lib/cpp: No such file or directory configure:13172: $? = 127 configure: failed program was: | / confdefs.h / | #define PACKAGE_NAME “libffi” | #define PACKAGE_TARNAME “libffi” | #define PACKAGE_VERSION “3.99999” | #define PACKAGE_STRING “libffi 3.99999” | #define PACKAGE_BUGREPORT “http://github.com/libffi/libffi/issues” | #define PACKAGE_URL “” | #define PACKAGE “libffi” | #define VERSION “3.99999” | #define STDC_HEADERS 1 | #define HAVE_SYS_TYPES_H 1 | #define HAVE_SYS_STAT_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_MEMORY_H 1 | #define HAVE_STRINGS_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_DLFCN_H 1 | #define LT_OBJDIR “.libs/” | / end confdefs.h. */ | #ifdef STDC | # include <limits.h> | #else | # include <assert.h> | #endif | Syntax error configure:13202: error: in /usr/local/lib/ruby/gems/2.5.0/gems/ffi-1.9.25/ext/ffi_c/libffi-x86_64-darwin18': configure:13204: error: C++ preprocessor "/lib/cpp" fails sanity check See config.log’ for more details

----------------

Cache variables.

----------------

ac_cv_build=x86_64-apple-darwin18.0.0 ac_cv_c_compiler_gnu=yes ac_cv_cxx_compiler_gnu=yes ac_cv_env_CCASFLAGS_set= ac_cv_env_CCASFLAGS_value= ac_cv_env_CCAS_set= ac_cv_env_CCAS_value= ac_cv_env_CPPFLAGS_set= ac_cv_env_CPPFLAGS_value= ac_cv_env_CPP_set= ac_cv_env_CPP_value= ac_cv_env_CXXCPP_set= ac_cv_env_CXXCPP_value= ac_cv_env_LT_SYS_LIBRARY_PATH_set= ac_cv_env_LT_SYS_LIBRARY_PATH_value= ac_cv_env_build_alias_set= ac_cv_env_build_alias_value= ac_cv_env_host_alias_set=set ac_cv_env_host_alias_value= ac_cv_env_target_alias_set= ac_cv_env_target_alias_value= ac_cv_header_dlfcn_h=yes ac_cv_header_inttypes_h=yes ac_cv_header_memory_h=yes ac_cv_header_stdc=yes ac_cv_header_stdint_h=yes ac_cv_header_stdlib_h=yes ac_cv_header_string_h=yes ac_cv_header_strings_h=yes ac_cv_header_sys_stat_h=yes ac_cv_header_sys_types_h=yes ac_cv_header_unistd_h=yes ac_cv_host=x86_64-apple-darwin18.0.0 ac_cv_objext=o ac_cv_path_EGREP=‘/usr/local/bin/ggrep -E’ ac_cv_path_FGREP=‘/usr/local/bin/ggrep -F’ ac_cv_path_GREP=/usr/local/bin/ggrep ac_cv_path_SED=/usr/local/bin/sed ac_cv_path_ax_enable_builddir_sed=sed ac_cv_path_install=‘/usr/local/bin/ginstall -c’ ac_cv_path_lt_DD=/bin/dd ac_cv_path_mkdir=/usr/local/bin/gmkdir ac_cv_prog_AWK=gawk ac_cv_prog_CPP=‘clang -E’ ac_cv_prog_CXXCPP=/lib/cpp ac_cv_prog_ac_ct_AR=ar ac_cv_prog_ac_ct_CC=clang ac_cv_prog_ac_ct_CXX=g++ ac_cv_prog_ac_ct_DSYMUTIL=dsymutil ac_cv_prog_ac_ct_LIPO=lipo ac_cv_prog_ac_ct_NMEDIT=nmedit ac_cv_prog_ac_ct_OBJDUMP=objdump ac_cv_prog_ac_ct_OTOOL=otool ac_cv_prog_ac_ct_RANLIB=ranlib ac_cv_prog_ac_ct_STRIP=strip ac_cv_prog_cc_c89= ac_cv_prog_cc_g=yes ac_cv_prog_cxx_g=yes ac_cv_prog_make_make_set=yes ac_cv_target=x86_64-apple-darwin18.0.0 am_cv_CCAS_dependencies_compiler_type=none am_cv_CC_dependencies_compiler_type=none am_cv_CXX_dependencies_compiler_type=none am_cv_make_support_nested_variables=yes am_cv_prog_cc_c_o=yes lt_cv_apple_cc_single_mod=yes lt_cv_ar_at_file=no lt_cv_deplibs_check_method=pass_all lt_cv_file_magic_cmd=‘$MAGIC_CMD’ lt_cv_file_magic_test_file= lt_cv_ld_exported_symbols_list=yes lt_cv_ld_force_load=no lt_cv_ld_reload_flag=-r lt_cv_nm_interface=‘BSD nm’ lt_cv_objdir=.libs lt_cv_path_LD=ld lt_cv_path_NM=‘/usr/bin/nm -B’ lt_cv_path_mainfest_tool=no lt_cv_prog_compiler_c_o=yes lt_cv_prog_compiler_pic=‘-fno-common -DPIC’ lt_cv_prog_compiler_pic_works=yes lt_cv_prog_compiler_rtti_exceptions=yes lt_cv_prog_compiler_static_works=no lt_cv_prog_gnu_ld=no lt_cv_sharedlib_from_linklib_cmd=‘printf %s\n’ lt_cv_sys_global_symbol_pipe=‘sed -n -e ‘'‘s/^.[ ]([BCDEGRST][BCDEGRST])[ ][ ]_([_A-Za-z][_A-Za-z0-9])$/\1 _\2 \2/p’'’ | sed ‘'’/ __gnu_lto/d’'‘’ lt_cv_sys_global_symbol_to_c_name_address=‘sed -n -e ‘'‘s/^: (.) .$/ {“\1”, (void ) 0},/p’'’ -e '''s/^[BCDEGRST][BCDEGRST] .* (.)$/ {“\1”, (void ) &\1},/p’'‘’ lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='sed -n -e '''s/^: (.) .$/ {“\1”, (void ) 0},/p’'’ -e '''s/^[BCDEGRST][BCDEGRST] .* (lib.)$/ {“\1”, (void ) &\1},/p’'’ -e '''s/^[BCDEGRST][BCDEGRST] . (.)$/ {“lib\1”, (void ) &\1},/p’'‘’ lt_cv_sys_global_symbol_to_cdecl='sed -n -e '''s/^T . (.)$/extern int \1();/p’'’ -e ‘'‘s/^[BCDEGRST][BCDEGRST]* .* (.*)$/extern char \1;/p’'’’ lt_cv_sys_global_symbol_to_import= lt_cv_sys_max_cmd_len=196608 lt_cv_to_host_file_cmd=func_convert_file_noop lt_cv_to_tool_file_cmd=func_convert_file_noop lt_cv_truncate_bin=‘/bin/dd bs=4096 count=1’

-----------------

Output variables.

-----------------

ACLOCAL=‘${SHELL} /usr/local/lib/ruby/gems/2.5.0/gems/ffi-1.9.25/ext/ffi_c/libffi/missing aclocal-1.15’ ALLOCA=‘’ AMDEPBACKSLASH=‘’ AMDEP_FALSE=‘’ AMDEP_TRUE=‘#’ AMTAR=‘$${TAR-tar}’ AM_BACKSLASH=‘' AM_DEFAULT_V=’$(AM_DEFAULT_VERBOSITY)’ AM_DEFAULT_VERBOSITY=‘1’ AM_LTLDFLAGS=‘’ AM_RUNTESTFLAGS=‘’ AM_V=‘$(V)’ AR=‘ar’ AUTOCONF=‘${SHELL} /usr/local/lib/ruby/gems/2.5.0/gems/ffi-1.9.25/ext/ffi_c/libffi/missing autoconf’ AUTOHEADER=‘${SHELL} /usr/local/lib/ruby/gems/2.5.0/gems/ffi-1.9.25/ext/ffi_c/libffi/missing autoheader’ AUTOMAKE=‘${SHELL} /usr/local/lib/ruby/gems/2.5.0/gems/ffi-1.9.25/ext/ffi_c/libffi/missing automake-1.15’ AWK=‘gawk’ BUILD_DOCS_FALSE=‘’ BUILD_DOCS_TRUE=‘’ CC=‘clang’ CCAS=‘clang’ CCASDEPMODE=‘depmode=none’ CCASFLAGS=‘’ CCDEPMODE=‘depmode=none’ CFLAGS=‘’ CPP=‘clang -E’ CPPFLAGS=‘’ CXX=‘g++’ CXXCPP=‘/lib/cpp’ CXXDEPMODE=‘depmode=none’ CXXFLAGS=‘-g -O2’ CYGPATH_W=‘echo’ DEFS=‘’ DEPDIR=‘.deps’ DLLTOOL=‘false’ DSYMUTIL=‘dsymutil’ DUMPBIN=‘’ ECHO_C=‘\c’ ECHO_N=‘’ ECHO_T=‘’ EGREP=‘/usr/local/bin/ggrep -E’ EXEEXT=‘’ FFI_DEBUG_FALSE=‘’ FFI_DEBUG_TRUE=‘’ FFI_EXEC_TRAMPOLINE_TABLE=‘’ FFI_EXEC_TRAMPOLINE_TABLE_FALSE=‘’ FFI_EXEC_TRAMPOLINE_TABLE_TRUE=‘’ FGREP=‘/usr/local/bin/ggrep -F’ GREP=‘/usr/local/bin/ggrep’ HAVE_LONG_DOUBLE=‘’ HAVE_LONG_DOUBLE_VARIANT=‘’ INSTALL_DATA=‘${INSTALL} -m 644’ INSTALL_PROGRAM=‘${INSTALL}’ INSTALL_SCRIPT=‘${INSTALL}’ INSTALL_STRIP_PROGRAM=‘$(install_sh) -c -s’ LD=‘ld’ LDFLAGS=‘’ LIBFFI_BUILD_VERSIONED_SHLIB_FALSE=‘’ LIBFFI_BUILD_VERSIONED_SHLIB_GNU_FALSE=‘’ LIBFFI_BUILD_VERSIONED_SHLIB_GNU_TRUE=‘’ LIBFFI_BUILD_VERSIONED_SHLIB_SUN_FALSE=‘’ LIBFFI_BUILD_VERSIONED_SHLIB_SUN_TRUE=‘’ LIBFFI_BUILD_VERSIONED_SHLIB_TRUE=‘’ LIBOBJS=‘’ LIBS=‘’ LIBTOOL=‘$(SHELL) $(top_builddir)/libtool’ LIPO=‘lipo’ LN_S=‘ln -s’ LTLIBOBJS=‘’ LT_SYS_LIBRARY_PATH=‘’ MAINT=‘’ MAINTAINER_MODE_FALSE=‘’ MAINTAINER_MODE_TRUE=‘’ MAKEINFO=‘${SHELL} /usr/local/lib/ruby/gems/2.5.0/gems/ffi-1.9.25/ext/ffi_c/libffi/missing makeinfo’ MANIFEST_TOOL=‘:’ MKDIR_P=‘/usr/local/bin/gmkdir -p’ NM=‘/usr/bin/nm -B’ NMEDIT=‘nmedit’ OBJDUMP=‘objdump’ OBJEXT=‘o’ OPT_LDFLAGS=‘’ OTOOL64=‘:’ OTOOL=‘otool’ PACKAGE=‘libffi’ PACKAGE_BUGREPORT=‘http://github.com/libffi/libffi/issues’ PACKAGE_NAME=‘libffi’ PACKAGE_STRING=‘libffi 3.99999’ PACKAGE_TARNAME=‘libffi’ PACKAGE_URL=‘’ PACKAGE_VERSION=‘3.99999’ PATH_SEPARATOR=‘:’ PRTDIAG=‘’ RANLIB=‘ranlib’ SECTION_LDFLAGS=‘’ SED=‘/usr/local/bin/sed’ SET_MAKE=‘’ SHELL=‘/bin/sh’ STRIP=‘strip’ TARGET=‘’ TARGETDIR=‘’ TARGET_OBJ=‘’ TESTSUBDIR_FALSE=‘’ TESTSUBDIR_TRUE=‘’ VERSION=‘3.99999’ ac_ct_AR=‘ar’ ac_ct_CC=‘clang’ ac_ct_CXX=‘g++’ ac_ct_DUMPBIN=‘’ am__EXEEXT_FALSE=‘’ am__EXEEXT_TRUE=‘’ am__fastdepCCAS_FALSE=‘’ am__fastdepCCAS_TRUE=‘#’ am__fastdepCC_FALSE=‘’ am__fastdepCC_TRUE=‘#’ am__fastdepCXX_FALSE=‘’ am__fastdepCXX_TRUE=‘#’ am__include=‘include’ am__isrc=’ -I$(srcdir)’ am__leading_dot=‘.’ am__nodep=‘’ am__quote=‘’ am__tar=‘$${TAR-tar} chof - “$$tardir”’ am__untar=‘$${TAR-tar} xf -’ ax_enable_builddir_sed=‘sed’ bindir=‘${exec_prefix}/bin’ build=‘x86_64-apple-darwin18.0.0’ build_alias=‘’ build_cpu=‘x86_64’ build_os=‘darwin18.0.0’ build_vendor=‘apple’ datadir=‘${datarootdir}’ datarootdir=‘${prefix}/share’ docdir=‘${datarootdir}/doc/${PACKAGE_TARNAME}’ dvidir=‘${docdir}’ exec_prefix=‘NONE’ host=‘x86_64-apple-darwin18.0.0’ host_alias=‘’ host_cpu=‘x86_64’ host_os=‘darwin18.0.0’ host_vendor=‘apple’ htmldir=‘${docdir}’ includedir=‘${prefix}/include’ infodir=‘${datarootdir}/info’ install_sh=‘${SHELL} /usr/local/lib/ruby/gems/2.5.0/gems/ffi-1.9.25/ext/ffi_c/libffi/install-sh’ libdir=‘${exec_prefix}/lib’ libexecdir=‘${exec_prefix}/libexec’ localedir=‘${datarootdir}/locale’ localstatedir=‘${prefix}/var’ mandir=‘${datarootdir}/man’ mkdir_p=‘$(MKDIR_P)’ oldincludedir=‘/usr/include’ pdfdir=‘${docdir}’ prefix=‘NONE’ program_transform_name=‘s,x,x,’ psdir=‘${docdir}’ runstatedir=‘${localstatedir}/run’ sbindir=‘${exec_prefix}/sbin’ sharedstatedir=‘${prefix}/com’ sys_symbol_underscore=‘’ sysconfdir=‘${prefix}/etc’ target=‘x86_64-apple-darwin18.0.0’ target_alias=‘’ target_cpu=‘x86_64’ target_os=‘darwin18.0.0’ target_vendor=‘apple’ toolexecdir=‘’ toolexeclibdir=‘’

-----------

confdefs.h.

-----------

/* confdefs.h */ #define PACKAGE_NAME “libffi” #define PACKAGE_TARNAME “libffi” #define PACKAGE_VERSION “3.99999” #define PACKAGE_STRING “libffi 3.99999” #define PACKAGE_BUGREPORT “http://github.com/libffi/libffi/issues” #define PACKAGE_URL “” #define PACKAGE “libffi” #define VERSION “3.99999” #define STDC_HEADERS 1 #define HAVE_SYS_TYPES_H 1 #define HAVE_SYS_STAT_H 1 #define HAVE_STDLIB_H 1 #define HAVE_STRING_H 1 #define HAVE_MEMORY_H 1 #define HAVE_STRINGS_H 1 #define HAVE_INTTYPES_H 1 #define HAVE_STDINT_H 1 #define HAVE_UNISTD_H 1 #define HAVE_DLFCN_H 1 #define LT_OBJDIR “.libs/”

configure: exit 1 `

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Reactions: 2
  • Comments: 42 (13 by maintainers)

Most upvoted comments

I cannot. I have an error when I was running: gem install rails -v 5.2.0

I don’t think that’s what you want to install 😃 Here are my steps for mojave (assuming brew already installed):

Install rbenv via brew

brew install rbenv ruby-build

Add rbenv to bash so that it loads every time you open a terminal

echo 'if which rbenv > /dev/null; then eval "$(rbenv init -)"; fi' >> ~/.bash_profile source ~/.bash_profile

Install Ruby through rbenv and set as default

rbenv install 2.6.3 rbenv global 2.6.3

Install Jekyll

gem install bundler jekyll

I have spent my entire evening on this Issue.

I wiped my dev environment and started completely from scratch!

I ran in to some permissions issues early on this time around but I managed to solve it. 😄

Install Xcode Command Line Tools

  1. Install the Xcode Command Line Tools using your Terminal app.

    xcode-select --install
    
  2. You will get a prompt and have to click the install button.

    (We don’t need Xcode ignore get Xcode option ).

  3. You may need to install the macOS SDK headers (Xcode comes with the current version’s headers).

open /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg

Next we Install Homebrew a package manager for macOS.

Why?

We will use Homebrew to install rbenv.

Why macOS already comes with a version of Ruby?

A lot of the system directories in macOS are locked down making it unusable so we will use rbenv to manage Ruby.


Install Homebrew

  1. Install Homebrew by entering the following command in your Terminal app and hitting the RETURN key.

    /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
    
  2. You will now be prompted to hit the RETURN key again to continue.

    Output:

MacBook-Pro:jekyll-test-site Colin$ /usr/bin/ruby -e "$(curl -fsSL       https://raw.githubusercontent.com/Homebrew/install/master/install)"
==> This script will install:
/usr/local/bin/brew
/usr/local/share/doc/homebrew
/usr/local/share/man/man1/brew.1
/usr/local/share/zsh/site-functions/_brew
/usr/local/etc/bash_completion.d/brew
/usr/local/Homebrew
==> The following new directories will be created:
/usr/local/include
/usr/local/sbin
/usr/local/var
/usr/local/opt
/usr/local/share/zsh
/usr/local/share/zsh/site-functions
/usr/local/var/homebrew
/usr/local/var/homebrew/linked
/usr/local/Cellar
/usr/local/Caskroom
/usr/local/Homebrew
/usr/local/Frameworks

Press RETURN to continue or any other key to abort
  1. You will be prompted to enter your Admin Password to allow the install to continue.

Output:

==> /usr/bin/sudo /bin/mkdir -p /usr/local/include /usr/local/sbin /usr/local/var /usr/local/opt /usr/local/share/zsh /usr/local/share/zsh/site-functions /usr/local/var/homebrew /usr/local/var/homebrew/linked /usr/local/Cellar /usr/local/Caskroom /usr/local/Homebrew /usr/local/Frameworks
Password:

The Homebrew install will continue.

Output:

==> /usr/bin/sudo /bin/chmod g+rwx /usr/local/include /usr/local/sbin /usr/local/var /usr/local/opt /usr/local/share/zsh /usr/local/share/zsh/site-functions /usr/local/var/homebrew /usr/local/var/homebrew/linked /usr/local/Cellar /usr/local/Caskroom /usr/local/Homebrew /usr/local/Frameworks
==> /usr/bin/sudo /bin/chmod 755 /usr/local/share/zsh /usr/local/share/zsh/site-functions
==> /usr/bin/sudo /usr/sbin/chown Colin /usr/local/include /usr/local/sbin /usr/local/var /usr/local/opt /usr/local/share/zsh /usr/local/share/zsh/site-functions /usr/local/var/homebrew /usr/local/var/homebrew/linked /usr/local/Cellar /usr/local/Caskroom /usr/local/Homebrew /usr/local/Frameworks
==> /usr/bin/sudo /usr/bin/chgrp admin /usr/local/include /usr/local/sbin /usr/local/var /usr/local/opt /usr/local/share/zsh /usr/local/share/zsh/site-functions /usr/local/var/homebrew /usr/local/var/homebrew/linked /usr/local/Cellar /usr/local/Caskroom /usr/local/Homebrew /usr/local/Frameworks
==> /usr/bin/sudo /bin/mkdir -p /Library/Caches/Homebrew
==> /usr/bin/sudo /bin/chmod g+rwx /Library/Caches/Homebrew
==> /usr/bin/sudo /usr/sbin/chown Colin /Library/Caches/Homebrew
==> Downloading and installing Homebrew...
remote: Enumerating objects: 47, done.
remote: Counting objects: 100% (47/47), done.
remote: Compressing objects: 100% (28/28), done.
remote: Total 115547 (delta 20), reused 36 (delta 19), pack-reused 115500
Receiving objects: 100% (115547/115547), 26.92 MiB | 350.00 KiB/s, done.
Resolving deltas: 100% (84431/84431), done.
From https://github.com/Homebrew/brew
* [new branch]          master     -> origin/master
* [new tag]             0.1        -> 0.1
* [new tag]             0.2        -> 0.2
* [new tag]             0.3        -> 0.3
* [new tag]             0.4        -> 0.4
* [new tag]             0.5        -> 0.5
* [new tag]             0.6        -> 0.6
* [new tag]             0.7        -> 0.7
* [new tag]             0.7.1      -> 0.7.1
* [new tag]             0.8        -> 0.8
* [new tag]             0.8.1      -> 0.8.1
* [new tag]             0.9        -> 0.9
* [new tag]             0.9.1      -> 0.9.1
* [new tag]             0.9.2      -> 0.9.2
* [new tag]             0.9.3      -> 0.9.3
* [new tag]             0.9.4      -> 0.9.4
* [new tag]             0.9.5      -> 0.9.5
* [new tag]             0.9.8      -> 0.9.8
* [new tag]             0.9.9      -> 0.9.9
* [new tag]             1.0.0      -> 1.0.0
* [new tag]             1.0.1      -> 1.0.1
* [new tag]             1.0.2      -> 1.0.2
* [new tag]             1.0.3      -> 1.0.3
* [new tag]             1.0.4      -> 1.0.4
* [new tag]             1.0.5      -> 1.0.5
* [new tag]             1.0.6      -> 1.0.6
* [new tag]             1.0.7      -> 1.0.7
* [new tag]             1.0.8      -> 1.0.8
* [new tag]             1.0.9      -> 1.0.9
* [new tag]             1.1.0      -> 1.1.0
* [new tag]             1.1.1      -> 1.1.1
* [new tag]             1.1.10     -> 1.1.10
* [new tag]             1.1.11     -> 1.1.11
* [new tag]             1.1.12     -> 1.1.12
* [new tag]             1.1.13     -> 1.1.13
* [new tag]             1.1.2      -> 1.1.2
* [new tag]             1.1.3      -> 1.1.3
* [new tag]             1.1.4      -> 1.1.4
* [new tag]             1.1.5      -> 1.1.5
* [new tag]             1.1.6      -> 1.1.6
* [new tag]             1.1.7      -> 1.1.7
* [new tag]             1.1.8      -> 1.1.8
* [new tag]             1.1.9      -> 1.1.9
* [new tag]             1.2.0      -> 1.2.0
* [new tag]             1.2.1      -> 1.2.1
* [new tag]             1.2.2      -> 1.2.2
* [new tag]             1.2.3      -> 1.2.3
* [new tag]             1.2.4      -> 1.2.4
* [new tag]             1.2.5      -> 1.2.5
* [new tag]             1.2.6      -> 1.2.6
* [new tag]             1.3.0      -> 1.3.0
* [new tag]             1.3.1      -> 1.3.1
* [new tag]             1.3.2      -> 1.3.2
* [new tag]             1.3.3      -> 1.3.3
* [new tag]             1.3.4      -> 1.3.4
* [new tag]             1.3.5      -> 1.3.5
* [new tag]             1.3.6      -> 1.3.6
* [new tag]             1.3.7      -> 1.3.7
* [new tag]             1.3.8      -> 1.3.8
* [new tag]             1.3.9      -> 1.3.9
* [new tag]             1.4.0      -> 1.4.0
* [new tag]             1.4.1      -> 1.4.1
* [new tag]             1.4.2      -> 1.4.2
* [new tag]             1.4.3      -> 1.4.3
* [new tag]             1.5.0      -> 1.5.0
* [new tag]             1.5.1      -> 1.5.1
* [new tag]             1.5.10     -> 1.5.10
* [new tag]             1.5.11     -> 1.5.11
* [new tag]             1.5.12     -> 1.5.12
* [new tag]             1.5.13     -> 1.5.13
* [new tag]             1.5.14     -> 1.5.14
* [new tag]             1.5.2      -> 1.5.2
* [new tag]             1.5.3      -> 1.5.3
* [new tag]             1.5.4      -> 1.5.4
* [new tag]             1.5.5      -> 1.5.5
* [new tag]             1.5.6      -> 1.5.6
* [new tag]             1.5.7      -> 1.5.7
* [new tag]             1.5.8      -> 1.5.8
* [new tag]             1.5.9      -> 1.5.9
* [new tag]             1.6.0      -> 1.6.0
* [new tag]             1.6.1      -> 1.6.1
* [new tag]             1.6.10     -> 1.6.10
* [new tag]             1.6.11     -> 1.6.11
* [new tag]             1.6.12     -> 1.6.12
* [new tag]             1.6.13     -> 1.6.13
* [new tag]             1.6.14     -> 1.6.14
* [new tag]             1.6.15     -> 1.6.15
* [new tag]             1.6.16     -> 1.6.16
* [new tag]             1.6.17     -> 1.6.17
* [new tag]             1.6.2      -> 1.6.2
* [new tag]             1.6.3      -> 1.6.3
* [new tag]             1.6.4      -> 1.6.4
* [new tag]             1.6.5      -> 1.6.5
* [new tag]             1.6.6      -> 1.6.6
* [new tag]             1.6.7      -> 1.6.7
* [new tag]             1.6.8      -> 1.6.8
* [new tag]             1.6.9      -> 1.6.9
* [new tag]             1.7.0      -> 1.7.0
* [new tag]             1.7.1      -> 1.7.1
* [new tag]             1.7.2      -> 1.7.2
* [new tag]             1.7.3      -> 1.7.3
* [new tag]             1.7.4      -> 1.7.4
* [new tag]             1.7.5      -> 1.7.5
* [new tag]             1.7.6      -> 1.7.6
* [new tag]             1.7.7      -> 1.7.7
* [new tag]             1.8.0      -> 1.8.0
* [new tag]             1.8.1      -> 1.8.1
* [new tag]             1.8.2      -> 1.8.2
* [new tag]             1.8.3      -> 1.8.3
* [new tag]             1.8.4      -> 1.8.4
HEAD is now at 38493a35a Merge pull request #5373 from EricFromCanada/man-page-text
==> Homebrew is run entirely by unpaid volunteers. Please consider donating:
https://github.com/Homebrew/brew#donations
==> Tapping homebrew/core
Cloning into '/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core'...
remote: Enumerating objects: 4877, done.
remote: Counting objects: 100% (4877/4877), done.
remote: Compressing objects: 100% (4682/4682), done.
remote: Total 4877 (delta 48), reused 295 (delta 4), pack-reused 0
Receiving objects: 100% (4877/4877), 4.03 MiB | 774.00 KiB/s, done.
Resolving deltas: 100% (48/48), done.
Tapped 2 commands and 4662 formulae (4,919 files, 12.5MB).
==> Migrating /Library/Caches/Homebrew to /Users/Colin/Library/Caches/Homebrew...
==> Deleting /Library/Caches/Homebrew...
Already up-to-date.
==> Installation successful!

==> Homebrew has enabled anonymous aggregate formulae and cask analytics.
Read the analytics documentation (and how to opt-out) here:
https://docs.brew.sh/Analytics

==> Homebrew is run entirely by unpaid volunteers. Please consider donating:
https://github.com/Homebrew/brew#donations
==> Next steps:
- Run `brew help` to get started
- Further documentation:
https://docs.brew.sh

As you can see we have now installed Homebrew successfully.

Install rbenv

  1. Install rbenv with the following command using Homebrew.
brew install rbenv

Output:

MacBook-Pro:jekyll-test-site Colin$ brew install rbenv
Updating Homebrew...
==> Auto-updated Homebrew!
Updated 1 tap (homebrew/core).
==> Updated Formulae
diff-pdf                doctl                   fluent-bit              pdftoedn                pdftoipe                poppler

==> Installing dependencies for rbenv: autoconf, pkg-config and ruby-build
==> Installing rbenv dependency: autoconf
==> Downloading https://homebrew.bintray.com/bottles/autoconf-2.69.mojave.bottle.4.tar.gz
==> Downloading from https://akamai.bintray.com/97/9724736d34773b6e41e2434ffa28fe79feccccf7b7786e54671441ca75115cdb?__gda__=exp=1544304844~hmac=6c
######################################################################## 100.0%
==> Pouring autoconf-2.69.mojave.bottle.4.tar.gz
==> Caveats
Emacs Lisp files have been installed to:
  /usr/local/share/emacs/site-lisp/autoconf
==> Summary
🍺  /usr/local/Cellar/autoconf/2.69: 71 files, 3.0MB
==> Installing rbenv dependency: pkg-config
==> Downloading https://homebrew.bintray.com/bottles/pkg-config-0.29.2.mojave.bottle.tar.gz
==> Downloading from https://akamai.bintray.com/85/85e5bbffb3424f22cd1bf54b69161110481bab100f9abea54e0a0f00fcf761b9?__gda__=exp=1544304849~hmac=c5
######################################################################## 100.0%
==> Pouring pkg-config-0.29.2.mojave.bottle.tar.gz
🍺  /usr/local/Cellar/pkg-config/0.29.2: 11 files, 627.2KB
==> Installing rbenv dependency: ruby-build
==> Downloading https://github.com/rbenv/ruby-build/archive/v20181207.tar.gz
==> Downloading from https://codeload.github.com/rbenv/ruby-build/tar.gz/v20181207
######################################################################## 100.0%
==> ./install.sh
🍺  /usr/local/Cellar/ruby-build/20181207: 427 files, 214.8KB, built in 7 seconds
==> Installing rbenv
==> Downloading https://homebrew.bintray.com/bottles/rbenv-1.1.1.mojave.bottle.1.tar.gz
######################################################################## 100.0%
==> Pouring rbenv-1.1.1.mojave.bottle.1.tar.gz
🍺  /usr/local/Cellar/rbenv/1.1.1: 36 files, 62.8KB
==> Caveats
==> autoconf
Emacs Lisp files have been installed to:
  /usr/local/share/emacs/site-lisp/autoconf
  1. Set up rbenv in your shell.
rbenv init

Output:

MacBook-Pro:jekyll-test-site Colin$ rbenv init
# Load rbenv automatically by appending
# the following to ~/.bash_profile:

eval "$(rbenv init -)"

  1. You can add the above line manually or run the following command to update your .bash_profile file.
echo 'eval "$(rbenv init -)"' >> ~/.bash_profile
  1. Close your Terminal window and open a new one so your changes take effect.

  2. Verify that rbenv is properly set up using this rbenv-doctor script:

curl -fsSL https://github.com/rbenv/rbenv-installer/raw/master/bin/rbenv-doctor | bash

Output:

MacBook-Pro:jekyll-test-site Colin$ curl -fsSL https://github.com/rbenv/rbenv-installer/raw/master/bin/rbenv-doctor | bash
Checking for `rbenv' in PATH: /usr/local/bin/rbenv
Checking for rbenv shims in PATH: OK
Checking `rbenv install' support: /usr/local/bin/rbenv-install (ruby-build 20181207)
Counting installed Ruby versions: none
  There aren't any Ruby versions installed under `/Users/Colin/.rbenv/versions'.
  You can install Ruby versions like so: rbenv install 2.2.4
Checking RubyGems settings: OK
Auditing installed plugins: OK
  1. You can now list all available version of Ruby using rbenv install -l.

  2. Let’s install the latest stable release which is currently Ruby 2.5.3 as of writing.

rbenv install 2.5.3

Output:

MacBook-Pro:jekyll-test-site Colin$ rbenv install 2.5.3
ruby-build: use openssl from homebrew
Downloading ruby-2.5.3.tar.bz2...
-> https://cache.ruby-lang.org/pub/ruby/2.5/ruby-2.5.3.tar.bz2
Installing ruby-2.5.3...
ruby-build: use readline from homebrew
Installed ruby-2.5.3 to /Users/Colin/.rbenv/versions/2.5.3
  1. List all Ruby versions known to rbenv
rbenv versions

Output:

MacBook-Pro:jekyll-test-site Colin$ rbenv versions
  system
* 2.5.3 (set by /Users/Colin/.rbenv/version)
  1. Set the global version of Ruby.
rbenv global 2.5.3
  1. Confirm your global version of Ruby is set.
rbenv global

Output:

MacBook-Pro:jekyll-test-site Colin$ rbenv global
2.5.3

Install Bundler

  1. Installing Bundler provides a consistent environment for Ruby projects by tracking and installing the exact gems and versions that are needed.
gem install bundler

Output:

MacBook-Pro:jekyll-test-site Colin$ gem install bundler
Fetching: bundler-1.17.1.gem (100%)
Successfully installed bundler-1.17.1
Parsing documentation for bundler-1.17.1
Installing ri documentation for bundler-1.17.1
Done installing documentation for bundler after 3 seconds
1 gem installed

Installing Jekyll

  1. Finally it’s time to install Jekyll.
gem install jekyll
  1. Check the Jekyll version.
jekyll -v

Done! 🤞

How to update Jekyll

Bundler will update all your gems to the latest versions by simply running bundle update in a Terminal window.

Did you find this tutorial helpful?

In order to compile extensions, you need to install command line tools:

xcode-select --install

We do not recommend using sudo, you should set GEM_HOME to your user directory instead:

echo '# Install Ruby Gems to ~/gems' >> ~/.bashrc
echo 'export GEM_HOME=$HOME/gems' >> ~/.bashrc
echo 'export PATH=$HOME/gems/bin:$PATH' >> ~/.bashrc
source ~/.bashrc

Now you should be able to run gem install bundler jekyll without sudo and compile extensions like ffi.

For more information, please read our docs: https://jekyllrb.com/docs/installation/macos/

Finally upgraded to macOS 10.14 Mojave, not without some sweat 😅

https://jekyllrb.com/docs/installation/macos/ is still relevant, except in my case I add to install include headers in order to compile native extensions. I had compilation errors when trying to install ffifor instance.

So right after you install command line tools with xcode-select --install, type:

open /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg

Make sure you install gems as non-super user (see: https://jekyllrb.com/docs/troubleshooting/#no-sudo) before typing gem install bundler jekyll

Default ruby is 2.3.7, so if you want to go with latest stable ruby (2.5.3 at the moment), you’ll have to install it with homebrew.

I’ll update the documentation accordingly, because I must admit, this is non trivial.

If anyone has successfully install Jekyll on Mojave, your feedback is welcome.

I have upgraded without issue.

I recommend using Homebrew to install Ruby. I have updated my blog post today “install Jekyll on macOS Mojave” to be more newbie friendly.

@W-David-Porter This bug has been fixed. Please run bundle update to install the patch…

I see the issue being closed. But I still cannot do “gem install jekyll”. Is this resolved for others? If this has been closed what is the official resolution?

@Hordon13

Here’s what I did to get things working, this is not a great solution IMO, but it finally worked for me:

LDFLAGS="-L/usr/local/opt/libffi/lib" PKG_CONFIG_PATH="/usr/local/opt/libffi/lib/pkgconfig" gem install bundler jekyll

If you need to update you can also use “bundle update” at the end instead of bundle install, basically you just need those variables to be set when you run the command you want to run that’s failing for ffi packages

The problem was Homebrew didn’t set a correct path for the newly installed version of Ruby, so ruby -v returned the old version (ruby 2.3.7p456 (2018-03-28 revision 63024) [universal.x86_64-darwin18]).

Interesting that brew link --overwrite ruby didn’t work as well. I had to install rbenv and manually add /usr/local/bin/rbenv as a $PATH to my bash profile. That did the trick

I can confirm this issue. Using native ruby is no longer an option. Not until apple fixes it I think.

Error when compiling ruby_http_parser: make: *** No rule to make target `/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/include/ruby-2.3.0/universal-darwin18/ruby/config.h', needed by `ruby_http_parser.o'. Stop.

Problem is, correct header file is there, but in old directory: universal-darwin17. And we can’t rename it or make symlink due to SIP.

Edit: I was able to install jekyll using rbenv successfully.