Jekyll 在生成时崩溃:分段错误
Jekyll crash on generation: segmentation fault
当我像往常一样在我的 jekyll 项目目录中 运行 bundle exec jekyll serve --trace --port 4000
时,我得到了这个:
首先我得到一些关于 PATH 的信息:
/usr/lib/ruby/3.0.0/pathname.rb:20: warning: already initialized constant Pathname::TO_PATH
/home/john/.gem/ruby/3.0.0/gems/pathname-0.2.0/lib/pathname.rb:20: warning: previous definition of TO_PATH was here
/usr/lib/ruby/3.0.0/pathname.rb:22: warning: already initialized constant Pathname::SAME_PATHS
/home/john/.gem/ruby/3.0.0/gems/pathname-0.2.0/lib/pathname.rb:22: warning: previous definition of SAME_PATHS was here
/usr/lib/ruby/3.0.0/pathname.rb:34: warning: already initialized constant Pathname::SEPARATOR_LIST
/home/john/.gem/ruby/3.0.0/gems/pathname-0.2.0/lib/pathname.rb:34: warning: previous definition of SEPARATOR_LIST was here
/usr/lib/ruby/3.0.0/pathname.rb:35: warning: already initialized constant Pathname::SEPARATOR_PAT
/home/john/.gem/ruby/3.0.0/gems/pathname-0.2.0/lib/pathname.rb:35: warning: previous definition of SEPARATOR_PAT was here
/usr/lib/ruby/3.0.0/pathname.rb:41: warning: already initialized constant Pathname::ABSOLUTE_PATH
/home/john/.gem/ruby/3.0.0/gems/pathname-0.2.0/lib/pathname.rb:41: warning: previous definition of ABSOLUTE_PATH was here
然后我收到错误信息:
bundler: failed to load command: jekyll (/home/john/.gem/ruby/3.0.0/bin/jekyll)
/home/john/.gem/ruby/3.0.0/gems/bundler-2.2.22/lib/bundler/shared_helpers.rb:58: [BUG] Segmentation fault at 0x0000000000000008
ruby 3.0.2p107 (2021-07-07 revision 0db68f0233) [x86_64-linux]
之后我得到了这些日志块:
-- Control frame information -----------------------------------------------
c:0014 p:---- s:0068 e:000067 CFUNC :pwd
c:0013 p:0012 s:0064 e:000063 BLOCK /home/john/.gem/ruby/3.0.0/gems/bundler-2.2.22/lib/bundler/shared_helpers.rb:58 [FINISH]
c:0012 p:---- s:0061 e:000060 CFUNC :synchronize
c:0011 p:0016 s:0057 e:000056 METHOD /home/john/.gem/ruby/3.0.0/gems/bundler-2.2.22/lib/bundler/shared_helpers.rb:57
c:0010 p:0023 s:0053 e:000051 METHOD /home/john/.gem/ruby/3.0.0/gems/bundler-2.2.22/lib/bundler/shared_helpers.rb:253
c:0009 p:0006 s:0044 e:000043 METHOD /home/john/.gem/ruby/3.0.0/gems/bundler-2.2.22/lib/bundler/shared_helpers.rb:144
c:0008 p:0015 s:0038 e:000037 RESCUE /home/john/.gem/ruby/3.0.0/gems/bundler-2.2.22/lib/bundler/cli.rb:26
c:0007 p:0024 s:0034 e:000032 METHOD /home/john/.gem/ruby/3.0.0/gems/bundler-2.2.22/lib/bundler/cli.rb:26
c:0006 p:0109 s:0028 e:000027 BLOCK /home/john/.gem/ruby/3.0.0/gems/bundler-2.2.22/exe/bundle:49
c:0005 p:0014 s:0022 e:000021 METHOD /home/john/.gem/ruby/3.0.0/gems/bundler-2.2.22/lib/bundler/friendly_errors.rb:128
c:0004 p:0162 s:0017 E:000eb8 TOP /home/john/.gem/ruby/3.0.0/gems/bundler-2.2.22/exe/bundle:37 [FINISH]
c:0003 p:---- s:0013 e:000012 CFUNC :load
c:0002 p:0112 s:0008 E:0004b0 EVAL /home/john/.gem/ruby/3.0.0/bin/bundle:23 [FINISH]
c:0001 p:0000 s:0003 E:002070 (none) [FINISH]
-- Ruby level backtrace information ----------------------------------------
/home/john/.gem/ruby/3.0.0/bin/bundle:23:in `<main>'
/home/john/.gem/ruby/3.0.0/bin/bundle:23:in `load'
/home/john/.gem/ruby/3.0.0/gems/bundler-2.2.22/exe/bundle:37:in `<top (required)>'
/home/john/.gem/ruby/3.0.0/gems/bundler-2.2.22/lib/bundler/friendly_errors.rb:128:in `with_friendly_errors'
/home/john/.gem/ruby/3.0.0/gems/bundler-2.2.22/exe/bundle:49:in `block in <top (required)>'
/home/john/.gem/ruby/3.0.0/gems/bundler-2.2.22/lib/bundler/cli.rb:26:in `start'
/home/john/.gem/ruby/3.0.0/gems/bundler-2.2.22/lib/bundler/cli.rb:26:in `ensure in start'
/home/john/.gem/ruby/3.0.0/gems/bundler-2.2.22/lib/bundler/shared_helpers.rb:144:in `print_major_deprecations!'
/home/john/.gem/ruby/3.0.0/gems/bundler-2.2.22/lib/bundler/shared_helpers.rb:253:in `search_up'
/home/john/.gem/ruby/3.0.0/gems/bundler-2.2.22/lib/bundler/shared_helpers.rb:57:in `pwd'
/home/john/.gem/ruby/3.0.0/gems/bundler-2.2.22/lib/bundler/shared_helpers.rb:57:in `synchronize'
/home/john/.gem/ruby/3.0.0/gems/bundler-2.2.22/lib/bundler/shared_helpers.rb:58:in `block in pwd'
/home/john/.gem/ruby/3.0.0/gems/bundler-2.2.22/lib/bundler/shared_helpers.rb:58:in `pwd'
-- Machine register context ------------------------------------------------
RIP: 0x00007f364880b478 RBP: 0x00005571417f9b78 RSP: 0x00007fff0c21e780
RAX: 0x0000000000000001 RBX: 0x0000000000000000 RCX: 0x0000000000000000
RDX: 0x0000000000000000 RDI: 0x0000000000000000 RSI: 0x0000000000000000
R8: 0x000000000000000f R9: 0x00007fff0c21e7a0 R10: 0x0000000055550083
R11: 0x0000000000000000 R12: 0x00005571418b9ab0 R13: 0x00007fff0c21e7a0
R14: 0x0000000000000000 R15: 0x0000000000000000 EFL: 0x0000000000010202
-- C level backtrace information -------------------------------------------
/usr/lib/libruby.so.3.0(0x7f36488297c4) [0x7f36488297c4]
/usr/lib/libruby.so.3.0(0x7f364867c5f2) [0x7f364867c5f2]
/usr/lib/libruby.so.3.0(0x7f364879e7da) [0x7f364879e7da]
/usr/lib/libc.so.6(__restore_rt+0x0) [0x7f3648447da0]
/usr/lib/libruby.so.3.0(0x7f364880b478) [0x7f364880b478]
/usr/lib/libruby.so.3.0(0x7f364880ba3a) [0x7f364880ba3a]
/usr/lib/libruby.so.3.0(rb_funcallv+0x20b) [0x7f364882112b]
/usr/lib/ruby/3.0.0/x86_64-linux/pathname.so(0x7f36489772f4) [0x7f36489772f4]
/usr/lib/libruby.so.3.0(0x7f36488080cf) [0x7f36488080cf]
/usr/lib/libruby.so.3.0(0x7f3648810f96) [0x7f3648810f96]
/usr/lib/libruby.so.3.0(0x7f3648813bd4) [0x7f3648813bd4]
/usr/lib/libruby.so.3.0(rb_vm_exec+0x1e2) [0x7f3648818da2]
/usr/lib/libruby.so.3.0(rb_yield_values2+0x64) [0x7f364881cee4]
/usr/lib/libruby.so.3.0(rb_ensure+0x113) [0x7f3648683c23]
/usr/lib/libruby.so.3.0(0x7f36488080cf) [0x7f36488080cf]
/usr/lib/libruby.so.3.0(0x7f3648810f96) [0x7f3648810f96]
/usr/lib/libruby.so.3.0(0x7f3648813c31) [0x7f3648813c31]
/usr/lib/libruby.so.3.0(rb_vm_exec+0x1e2) [0x7f3648818da2]
/usr/lib/libruby.so.3.0(0x7f36486ceef6) [0x7f36486ceef6]
/usr/lib/libruby.so.3.0(0x7f36486cff17) [0x7f36486cff17]
/usr/lib/libruby.so.3.0(0x7f36488080cf) [0x7f36488080cf]
/usr/lib/libruby.so.3.0(0x7f3648810f96) [0x7f3648810f96]
/usr/lib/libruby.so.3.0(0x7f3648813bd4) [0x7f3648813bd4]
/usr/lib/libruby.so.3.0(rb_vm_exec+0x1e2) [0x7f3648818da2]
/usr/lib/libruby.so.3.0(0x7f3648682422) [0x7f3648682422]
/usr/lib/libruby.so.3.0(ruby_run_node+0x58) [0x7f3648685e08]
/home/john/.gem/ruby/3.0.0/bin/jekyll serve --trace --port 4000(0x55713f865081) [0x55713f865081]
/usr/lib/libc.so.6(__libc_start_main+0xd5) [0x7f3648432b25]
/home/john/.gem/ruby/3.0.0/bin/jekyll serve --trace --port 4000(_start+0x2e) [0x55713f8650ce]
在此之后是 ruby 使用的库和模块的巨大列表(因为超过 300 行而被删减):
-- Other runtime information -----------------------------------------------
* Loaded script: /home/john/.gem/ruby/3.0.0/bin/jekyll
* Loaded features:
0 enumerator.so
1 thread.rb
2 rational.so
3 complex.so
4 ruby2_keywords.rb
5 /usr/lib/ruby/3.0.0/x86_64-linux/enc/encdb.so
6 /usr/lib/ruby/3.0.0/x86_64-linux/enc/trans/transdb.so
7 /usr/lib/ruby/3.0.0/x86_64-linux/rbconfig.rb
8 /usr/lib/ruby/3.0.0/rubygems/compatibility.rb
9 /usr/lib/ruby/3.0.0/rubygems/defaults.rb
10 /usr/lib/ruby/3.0.0/rubygems/deprecate.rb
11 /usr/lib/ruby/3.0.0/rubygems/errors.rb
...
作为最后一件事,我得到了内存映射(也被剪掉了):
* Process memory map:
55713f864000-55713f865000 r--p 00000000 103:04 15469920 /usr/bin/ruby
55713f865000-55713f866000 r-xp 00001000 103:04 15469920 /usr/bin/ruby
55713f866000-55713f867000 r--p 00002000 103:04 15469920 /usr/bin/ruby
55713f867000-55713f868000 r--p 00002000 103:04 15469920 /usr/bin/ruby
55713f868000-55713f869000 rw-p 00003000 103:04 15469920 /usr/bin/ruby
557141771000-557142b5f000 rw-p 00000000 00:00 0 [heap]
7f3643ff2000-7f3644200000 r--s 00000000 103:04 15469989 /usr/lib/libc-2.33.so
7f3644200000-7f364456e000 r--s 00000000 103:04 15469941 /usr/lib/libruby.so.3.0.2
7f364456e000-7f3644570000 r--p 00000000 103:04 15496948 /usr/lib/libyaml-0.so.2.0.9
7f3644570000-7f364458a000 r-xp 00002000 103:04 15496948 /usr/lib/libyaml-0.so.2.0.9
7f364458a000-7f364458e000 r--p 0001c000 103:04 15496948 /usr/lib/libyaml-0.so.2.0.9
7f364458e000-7f364458f000 r--p 0001f000 103:04 15496948 /usr/lib/libyaml-0.so.2.0.9
...
最后一行是终止信息:
fish: Job 1, 'bundle exec jekyll serve --trac…' terminated by signal SIGABRT (Abort)
所以...发生了什么事?什么会导致此错误?我该如何诊断?我该如何解决这个问题?
感谢您的帮助
解决方案
- 转到您的主目录并删除 gem 目录:
rm -rf ~/.gem
- 然后安装捆绑器
gem install bundle
- 转到你的 jekyll 项目的目录并安装 gems:
bundle install
可选部分
- 现在当你 运行
bundle exec jekyll serve --trace
你会得到这个错误
bundler: failed to load command: jekyll (/usr/bin/jekyll)
/usr/lib/ruby/gems/3.0.0/gems/ffi-1.15.4/lib/ffi.rb:5:in `require': libffi.so.7: cannot open shared object file: No such file or directory - /usr/lib/ruby/gems/3.0.0/extensions/x86_64-linux/3.0.0/ffi-1.15.4/ffi_c.so (LoadError)
- 然后你安装
libffi
gem install ffi
- 现在当你 运行
bundle exec jekyll serve --trace
你的 jekyll 应该能够生成站点和 运行 本地服务器。
当我像往常一样在我的 jekyll 项目目录中 运行 bundle exec jekyll serve --trace --port 4000
时,我得到了这个:
首先我得到一些关于 PATH 的信息:
/usr/lib/ruby/3.0.0/pathname.rb:20: warning: already initialized constant Pathname::TO_PATH
/home/john/.gem/ruby/3.0.0/gems/pathname-0.2.0/lib/pathname.rb:20: warning: previous definition of TO_PATH was here
/usr/lib/ruby/3.0.0/pathname.rb:22: warning: already initialized constant Pathname::SAME_PATHS
/home/john/.gem/ruby/3.0.0/gems/pathname-0.2.0/lib/pathname.rb:22: warning: previous definition of SAME_PATHS was here
/usr/lib/ruby/3.0.0/pathname.rb:34: warning: already initialized constant Pathname::SEPARATOR_LIST
/home/john/.gem/ruby/3.0.0/gems/pathname-0.2.0/lib/pathname.rb:34: warning: previous definition of SEPARATOR_LIST was here
/usr/lib/ruby/3.0.0/pathname.rb:35: warning: already initialized constant Pathname::SEPARATOR_PAT
/home/john/.gem/ruby/3.0.0/gems/pathname-0.2.0/lib/pathname.rb:35: warning: previous definition of SEPARATOR_PAT was here
/usr/lib/ruby/3.0.0/pathname.rb:41: warning: already initialized constant Pathname::ABSOLUTE_PATH
/home/john/.gem/ruby/3.0.0/gems/pathname-0.2.0/lib/pathname.rb:41: warning: previous definition of ABSOLUTE_PATH was here
然后我收到错误信息:
bundler: failed to load command: jekyll (/home/john/.gem/ruby/3.0.0/bin/jekyll)
/home/john/.gem/ruby/3.0.0/gems/bundler-2.2.22/lib/bundler/shared_helpers.rb:58: [BUG] Segmentation fault at 0x0000000000000008
ruby 3.0.2p107 (2021-07-07 revision 0db68f0233) [x86_64-linux]
之后我得到了这些日志块:
-- Control frame information -----------------------------------------------
c:0014 p:---- s:0068 e:000067 CFUNC :pwd
c:0013 p:0012 s:0064 e:000063 BLOCK /home/john/.gem/ruby/3.0.0/gems/bundler-2.2.22/lib/bundler/shared_helpers.rb:58 [FINISH]
c:0012 p:---- s:0061 e:000060 CFUNC :synchronize
c:0011 p:0016 s:0057 e:000056 METHOD /home/john/.gem/ruby/3.0.0/gems/bundler-2.2.22/lib/bundler/shared_helpers.rb:57
c:0010 p:0023 s:0053 e:000051 METHOD /home/john/.gem/ruby/3.0.0/gems/bundler-2.2.22/lib/bundler/shared_helpers.rb:253
c:0009 p:0006 s:0044 e:000043 METHOD /home/john/.gem/ruby/3.0.0/gems/bundler-2.2.22/lib/bundler/shared_helpers.rb:144
c:0008 p:0015 s:0038 e:000037 RESCUE /home/john/.gem/ruby/3.0.0/gems/bundler-2.2.22/lib/bundler/cli.rb:26
c:0007 p:0024 s:0034 e:000032 METHOD /home/john/.gem/ruby/3.0.0/gems/bundler-2.2.22/lib/bundler/cli.rb:26
c:0006 p:0109 s:0028 e:000027 BLOCK /home/john/.gem/ruby/3.0.0/gems/bundler-2.2.22/exe/bundle:49
c:0005 p:0014 s:0022 e:000021 METHOD /home/john/.gem/ruby/3.0.0/gems/bundler-2.2.22/lib/bundler/friendly_errors.rb:128
c:0004 p:0162 s:0017 E:000eb8 TOP /home/john/.gem/ruby/3.0.0/gems/bundler-2.2.22/exe/bundle:37 [FINISH]
c:0003 p:---- s:0013 e:000012 CFUNC :load
c:0002 p:0112 s:0008 E:0004b0 EVAL /home/john/.gem/ruby/3.0.0/bin/bundle:23 [FINISH]
c:0001 p:0000 s:0003 E:002070 (none) [FINISH]
-- Ruby level backtrace information ----------------------------------------
/home/john/.gem/ruby/3.0.0/bin/bundle:23:in `<main>'
/home/john/.gem/ruby/3.0.0/bin/bundle:23:in `load'
/home/john/.gem/ruby/3.0.0/gems/bundler-2.2.22/exe/bundle:37:in `<top (required)>'
/home/john/.gem/ruby/3.0.0/gems/bundler-2.2.22/lib/bundler/friendly_errors.rb:128:in `with_friendly_errors'
/home/john/.gem/ruby/3.0.0/gems/bundler-2.2.22/exe/bundle:49:in `block in <top (required)>'
/home/john/.gem/ruby/3.0.0/gems/bundler-2.2.22/lib/bundler/cli.rb:26:in `start'
/home/john/.gem/ruby/3.0.0/gems/bundler-2.2.22/lib/bundler/cli.rb:26:in `ensure in start'
/home/john/.gem/ruby/3.0.0/gems/bundler-2.2.22/lib/bundler/shared_helpers.rb:144:in `print_major_deprecations!'
/home/john/.gem/ruby/3.0.0/gems/bundler-2.2.22/lib/bundler/shared_helpers.rb:253:in `search_up'
/home/john/.gem/ruby/3.0.0/gems/bundler-2.2.22/lib/bundler/shared_helpers.rb:57:in `pwd'
/home/john/.gem/ruby/3.0.0/gems/bundler-2.2.22/lib/bundler/shared_helpers.rb:57:in `synchronize'
/home/john/.gem/ruby/3.0.0/gems/bundler-2.2.22/lib/bundler/shared_helpers.rb:58:in `block in pwd'
/home/john/.gem/ruby/3.0.0/gems/bundler-2.2.22/lib/bundler/shared_helpers.rb:58:in `pwd'
-- Machine register context ------------------------------------------------
RIP: 0x00007f364880b478 RBP: 0x00005571417f9b78 RSP: 0x00007fff0c21e780
RAX: 0x0000000000000001 RBX: 0x0000000000000000 RCX: 0x0000000000000000
RDX: 0x0000000000000000 RDI: 0x0000000000000000 RSI: 0x0000000000000000
R8: 0x000000000000000f R9: 0x00007fff0c21e7a0 R10: 0x0000000055550083
R11: 0x0000000000000000 R12: 0x00005571418b9ab0 R13: 0x00007fff0c21e7a0
R14: 0x0000000000000000 R15: 0x0000000000000000 EFL: 0x0000000000010202
-- C level backtrace information -------------------------------------------
/usr/lib/libruby.so.3.0(0x7f36488297c4) [0x7f36488297c4]
/usr/lib/libruby.so.3.0(0x7f364867c5f2) [0x7f364867c5f2]
/usr/lib/libruby.so.3.0(0x7f364879e7da) [0x7f364879e7da]
/usr/lib/libc.so.6(__restore_rt+0x0) [0x7f3648447da0]
/usr/lib/libruby.so.3.0(0x7f364880b478) [0x7f364880b478]
/usr/lib/libruby.so.3.0(0x7f364880ba3a) [0x7f364880ba3a]
/usr/lib/libruby.so.3.0(rb_funcallv+0x20b) [0x7f364882112b]
/usr/lib/ruby/3.0.0/x86_64-linux/pathname.so(0x7f36489772f4) [0x7f36489772f4]
/usr/lib/libruby.so.3.0(0x7f36488080cf) [0x7f36488080cf]
/usr/lib/libruby.so.3.0(0x7f3648810f96) [0x7f3648810f96]
/usr/lib/libruby.so.3.0(0x7f3648813bd4) [0x7f3648813bd4]
/usr/lib/libruby.so.3.0(rb_vm_exec+0x1e2) [0x7f3648818da2]
/usr/lib/libruby.so.3.0(rb_yield_values2+0x64) [0x7f364881cee4]
/usr/lib/libruby.so.3.0(rb_ensure+0x113) [0x7f3648683c23]
/usr/lib/libruby.so.3.0(0x7f36488080cf) [0x7f36488080cf]
/usr/lib/libruby.so.3.0(0x7f3648810f96) [0x7f3648810f96]
/usr/lib/libruby.so.3.0(0x7f3648813c31) [0x7f3648813c31]
/usr/lib/libruby.so.3.0(rb_vm_exec+0x1e2) [0x7f3648818da2]
/usr/lib/libruby.so.3.0(0x7f36486ceef6) [0x7f36486ceef6]
/usr/lib/libruby.so.3.0(0x7f36486cff17) [0x7f36486cff17]
/usr/lib/libruby.so.3.0(0x7f36488080cf) [0x7f36488080cf]
/usr/lib/libruby.so.3.0(0x7f3648810f96) [0x7f3648810f96]
/usr/lib/libruby.so.3.0(0x7f3648813bd4) [0x7f3648813bd4]
/usr/lib/libruby.so.3.0(rb_vm_exec+0x1e2) [0x7f3648818da2]
/usr/lib/libruby.so.3.0(0x7f3648682422) [0x7f3648682422]
/usr/lib/libruby.so.3.0(ruby_run_node+0x58) [0x7f3648685e08]
/home/john/.gem/ruby/3.0.0/bin/jekyll serve --trace --port 4000(0x55713f865081) [0x55713f865081]
/usr/lib/libc.so.6(__libc_start_main+0xd5) [0x7f3648432b25]
/home/john/.gem/ruby/3.0.0/bin/jekyll serve --trace --port 4000(_start+0x2e) [0x55713f8650ce]
在此之后是 ruby 使用的库和模块的巨大列表(因为超过 300 行而被删减):
-- Other runtime information -----------------------------------------------
* Loaded script: /home/john/.gem/ruby/3.0.0/bin/jekyll
* Loaded features:
0 enumerator.so
1 thread.rb
2 rational.so
3 complex.so
4 ruby2_keywords.rb
5 /usr/lib/ruby/3.0.0/x86_64-linux/enc/encdb.so
6 /usr/lib/ruby/3.0.0/x86_64-linux/enc/trans/transdb.so
7 /usr/lib/ruby/3.0.0/x86_64-linux/rbconfig.rb
8 /usr/lib/ruby/3.0.0/rubygems/compatibility.rb
9 /usr/lib/ruby/3.0.0/rubygems/defaults.rb
10 /usr/lib/ruby/3.0.0/rubygems/deprecate.rb
11 /usr/lib/ruby/3.0.0/rubygems/errors.rb
...
作为最后一件事,我得到了内存映射(也被剪掉了):
* Process memory map:
55713f864000-55713f865000 r--p 00000000 103:04 15469920 /usr/bin/ruby
55713f865000-55713f866000 r-xp 00001000 103:04 15469920 /usr/bin/ruby
55713f866000-55713f867000 r--p 00002000 103:04 15469920 /usr/bin/ruby
55713f867000-55713f868000 r--p 00002000 103:04 15469920 /usr/bin/ruby
55713f868000-55713f869000 rw-p 00003000 103:04 15469920 /usr/bin/ruby
557141771000-557142b5f000 rw-p 00000000 00:00 0 [heap]
7f3643ff2000-7f3644200000 r--s 00000000 103:04 15469989 /usr/lib/libc-2.33.so
7f3644200000-7f364456e000 r--s 00000000 103:04 15469941 /usr/lib/libruby.so.3.0.2
7f364456e000-7f3644570000 r--p 00000000 103:04 15496948 /usr/lib/libyaml-0.so.2.0.9
7f3644570000-7f364458a000 r-xp 00002000 103:04 15496948 /usr/lib/libyaml-0.so.2.0.9
7f364458a000-7f364458e000 r--p 0001c000 103:04 15496948 /usr/lib/libyaml-0.so.2.0.9
7f364458e000-7f364458f000 r--p 0001f000 103:04 15496948 /usr/lib/libyaml-0.so.2.0.9
...
最后一行是终止信息:
fish: Job 1, 'bundle exec jekyll serve --trac…' terminated by signal SIGABRT (Abort)
所以...发生了什么事?什么会导致此错误?我该如何诊断?我该如何解决这个问题?
感谢您的帮助
解决方案
- 转到您的主目录并删除 gem 目录:
rm -rf ~/.gem
- 然后安装捆绑器
gem install bundle
- 转到你的 jekyll 项目的目录并安装 gems:
bundle install
可选部分
- 现在当你 运行
bundle exec jekyll serve --trace
你会得到这个错误
bundler: failed to load command: jekyll (/usr/bin/jekyll)
/usr/lib/ruby/gems/3.0.0/gems/ffi-1.15.4/lib/ffi.rb:5:in `require': libffi.so.7: cannot open shared object file: No such file or directory - /usr/lib/ruby/gems/3.0.0/extensions/x86_64-linux/3.0.0/ffi-1.15.4/ffi_c.so (LoadError)
- 然后你安装
libffi
gem install ffi
- 现在当你 运行
bundle exec jekyll serve --trace
你的 jekyll 应该能够生成站点和 运行 本地服务器。