Kubuntu 20.04: jekyll serve endet mit Fehlermeldung

Problem

Nach dem Upgrade meines Rechners von Kubuntu 19.10 auf 20.04 funktioniert jekyll nicht mehr:

thomaskneisel@potosi:~/Dokumente/homepage/www$ jekyll serve
The dependency tzinfo-data (>= 0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby but the dependency is only for x86-mingw32, x86-mswin32, x64-mingw32, java. To add those platforms to the bundle, run `bundle lock --add-platform x86-mingw32 x86-mswin32 x64-mingw32 java`.                                                              
Configuration file: /home/thomaskneisel/Dokumente/homepage/www/_config.yml
            Source: /home/thomaskneisel/Dokumente/homepage/www
       Destination: /home/thomaskneisel/Dokumente/homepage/www/_site
 Incremental build: disabled. Enable with --incremental
      Generating... 
       Jekyll Feed: Generating feed for posts
                    done in 0.71 seconds.
Traceback (most recent call last):
        36: from /home/thomaskneisel/gems/bin/ruby_executable_hooks:24:in `
' 35: from /home/thomaskneisel/gems/bin/ruby_executable_hooks:24:in `eval' 34: from /home/thomaskneisel/gems/bin/jekyll:23:in `
' 33: from /home/thomaskneisel/gems/bin/jekyll:23:in `load' 32: from /home/thomaskneisel/gems/gems/jekyll-3.8.5/exe/jekyll:15:in `' 31: from /home/thomaskneisel/gems/gems/mercenary-0.3.6/lib/mercenary.rb:19:in `program' 30: from /home/thomaskneisel/gems/gems/mercenary-0.3.6/lib/mercenary/program.rb:42:in `go' 29: from /home/thomaskneisel/gems/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `execute' 28: from /home/thomaskneisel/gems/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `each' 27: from /home/thomaskneisel/gems/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `block in execute' 26: from /home/thomaskneisel/gems/gems/jekyll-3.8.5/lib/jekyll/commands/serve.rb:75:in `block (2 levels) in init_with_program' 25: from /home/thomaskneisel/gems/gems/jekyll-3.8.5/lib/jekyll/commands/serve.rb:93:in `start' 24: from /home/thomaskneisel/gems/gems/jekyll-3.8.5/lib/jekyll/commands/serve.rb:93:in `each' 23: from /home/thomaskneisel/gems/gems/jekyll-3.8.5/lib/jekyll/commands/serve.rb:93:in `block in start' 22: from /home/thomaskneisel/gems/gems/jekyll-3.8.5/lib/jekyll/commands/build.rb:43:in `process' 21: from /home/thomaskneisel/gems/gems/jekyll-3.8.5/lib/jekyll/commands/build.rb:94:in `watch' 20: from /home/thomaskneisel/gems/gems/jekyll-3.8.5/lib/jekyll/commands/build.rb:94:in `call' 19: from /home/thomaskneisel/gems/gems/jekyll-watch-2.2.1/lib/jekyll/watcher.rb:26:in `watch' 18: from /home/thomaskneisel/gems/gems/listen-3.1.5/lib/listen/listener.rb:91:in `start' 17: from /home/thomaskneisel/gems/gems/listen-3.1.5/lib/listen/fsm.rb:57:in `transition' 16: from /home/thomaskneisel/gems/gems/listen-3.1.5/lib/listen/fsm.rb:91:in `transition_with_callbacks!' 15: from /home/thomaskneisel/gems/gems/listen-3.1.5/lib/listen/fsm.rb:121:in `call' 14: from /home/thomaskneisel/gems/gems/listen-3.1.5/lib/listen/fsm.rb:121:in `instance_eval' 13: from /home/thomaskneisel/gems/gems/listen-3.1.5/lib/listen/listener.rb:68:in `block in ' 12: from /home/thomaskneisel/.rvm/rubies/ruby-2.6.3/lib/ruby/2.6.0/forwardable.rb:230:in `start' 11: from /home/thomaskneisel/gems/gems/listen-3.1.5/lib/listen/adapter/base.rb:63:in `start' 10: from /home/thomaskneisel/gems/gems/listen-3.1.5/lib/listen/adapter/base.rb:40:in `configure' 9: from /home/thomaskneisel/gems/gems/listen-3.1.5/lib/listen/adapter/base.rb:40:in `each' 8: from /home/thomaskneisel/gems/gems/listen-3.1.5/lib/listen/adapter/base.rb:45:in `block in configure' 7: from /home/thomaskneisel/gems/gems/listen-3.1.5/lib/listen/adapter/linux.rb:30:in `_configure' 6: from /home/thomaskneisel/gems/gems/listen-3.1.5/lib/listen/adapter/linux.rb:30:in `require' 5: from /home/thomaskneisel/gems/gems/rb-inotify-0.10.0/lib/rb-inotify.rb:2:in `' 4: from /home/thomaskneisel/gems/gems/rb-inotify-0.10.0/lib/rb-inotify.rb:2:in `require' 3: from /home/thomaskneisel/gems/gems/rb-inotify-0.10.0/lib/rb-inotify/native.rb:1:in `' 2: from /home/thomaskneisel/gems/gems/rb-inotify-0.10.0/lib/rb-inotify/native.rb:1:in `require' 1: from /home/thomaskneisel/gems/gems/ffi-1.11.1/lib/ffi.rb:4:in `' /home/thomaskneisel/gems/gems/ffi-1.11.1/lib/ffi.rb:4:in `require': cannot load such file -- 2.6/ffi_c (LoadError) 37: from /home/thomaskneisel/gems/bin/ruby_executable_hooks:24:in `
' 36: from /home/thomaskneisel/gems/bin/ruby_executable_hooks:24:in `eval' 35: from /home/thomaskneisel/gems/bin/jekyll:23:in `
' 34: from /home/thomaskneisel/gems/bin/jekyll:23:in `load' 33: from /home/thomaskneisel/gems/gems/jekyll-3.8.5/exe/jekyll:15:in `' 32: from /home/thomaskneisel/gems/gems/mercenary-0.3.6/lib/mercenary.rb:19:in `program' 31: from /home/thomaskneisel/gems/gems/mercenary-0.3.6/lib/mercenary/program.rb:42:in `go' 30: from /home/thomaskneisel/gems/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `execute' 29: from /home/thomaskneisel/gems/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `each' 28: from /home/thomaskneisel/gems/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `block in execute' 27: from /home/thomaskneisel/gems/gems/jekyll-3.8.5/lib/jekyll/commands/serve.rb:75:in `block (2 levels) in init_with_program' 26: from /home/thomaskneisel/gems/gems/jekyll-3.8.5/lib/jekyll/commands/serve.rb:93:in `start' 25: from /home/thomaskneisel/gems/gems/jekyll-3.8.5/lib/jekyll/commands/serve.rb:93:in `each' 24: from /home/thomaskneisel/gems/gems/jekyll-3.8.5/lib/jekyll/commands/serve.rb:93:in `block in start' 23: from /home/thomaskneisel/gems/gems/jekyll-3.8.5/lib/jekyll/commands/build.rb:43:in `process' 22: from /home/thomaskneisel/gems/gems/jekyll-3.8.5/lib/jekyll/commands/build.rb:94:in `watch' 21: from /home/thomaskneisel/gems/gems/jekyll-3.8.5/lib/jekyll/commands/build.rb:94:in `call' 20: from /home/thomaskneisel/gems/gems/jekyll-watch-2.2.1/lib/jekyll/watcher.rb:26:in `watch' 19: from /home/thomaskneisel/gems/gems/listen-3.1.5/lib/listen/listener.rb:91:in `start' 18: from /home/thomaskneisel/gems/gems/listen-3.1.5/lib/listen/fsm.rb:57:in `transition' 17: from /home/thomaskneisel/gems/gems/listen-3.1.5/lib/listen/fsm.rb:91:in `transition_with_callbacks!' 16: from /home/thomaskneisel/gems/gems/listen-3.1.5/lib/listen/fsm.rb:121:in `call' 15: from /home/thomaskneisel/gems/gems/listen-3.1.5/lib/listen/fsm.rb:121:in `instance_eval' 14: from /home/thomaskneisel/gems/gems/listen-3.1.5/lib/listen/listener.rb:68:in `block in ' 13: from /home/thomaskneisel/.rvm/rubies/ruby-2.6.3/lib/ruby/2.6.0/forwardable.rb:230:in `start' 12: from /home/thomaskneisel/gems/gems/listen-3.1.5/lib/listen/adapter/base.rb:63:in `start' 11: from /home/thomaskneisel/gems/gems/listen-3.1.5/lib/listen/adapter/base.rb:40:in `configure' 10: from /home/thomaskneisel/gems/gems/listen-3.1.5/lib/listen/adapter/base.rb:40:in `each' 9: from /home/thomaskneisel/gems/gems/listen-3.1.5/lib/listen/adapter/base.rb:45:in `block in configure' 8: from /home/thomaskneisel/gems/gems/listen-3.1.5/lib/listen/adapter/linux.rb:30:in `_configure' 7: from /home/thomaskneisel/gems/gems/listen-3.1.5/lib/listen/adapter/linux.rb:30:in `require' 6: from /home/thomaskneisel/gems/gems/rb-inotify-0.10.0/lib/rb-inotify.rb:2:in `' 5: from /home/thomaskneisel/gems/gems/rb-inotify-0.10.0/lib/rb-inotify.rb:2:in `require' 4: from /home/thomaskneisel/gems/gems/rb-inotify-0.10.0/lib/rb-inotify/native.rb:1:in `' 1: from /home/thomaskneisel/gems/gems/ffi-1.11.1/lib/ffi.rb:6:in `rescue in ' /home/thomaskneisel/gems/gems/ffi-1.11.1/lib/ffi.rb:6:in `require': libffi.so.6: cannot open shared obr directory - /home/thomaskneisel/gems/gems/ffi-1.11.1/lib/ffi_c.so (LoadError)

Ursache

Kubuntu 20.04 beinhaltet libffi.so.6 nicht mehr. Es gibt nur noch libffi.so.7.

Lösung

Dem System die Version 7 der Library als Version 6 unterjubeln. Eine ausführliche Beschreibung der Vorgehensweise findet sich unter

https://stackoverflow.com/questions/61875869/ubuntu-20-04-upgrade-python-missing-libffi-so-6

Auf meinem System bedeutet das:

thomaskneisel@potosi:~/Dokumente/homepage/www$ find /usr/lib -name "libffi.so*"
/usr/lib/x86_64-linux-gnu/libffi.so.7.1.0
/usr/lib/x86_64-linux-gnu/libffi.so
/usr/lib/x86_64-linux-gnu/libffi.so.7
/usr/lib/i386-linux-gnu/libffi.so.7.1.0
/usr/lib/i386-linux-gnu/libffi.so.7
thomaskneisel@potosi:~/Dokumente/homepage/www$ sudo ln -s /usr/lib/x86_64-linux-gnu/libffi.so.7 /usr/lib/x86_64-linux-gnu/libffi.so.6

Danach startet jekyll wieder. Ob diese primitive Methode Nebenwirkungen hat, muss sich noch im realen Betrieb zeigen. Immerhin muss man vermuten, dass libffi nicht ohne Grund eine neue Versionsnummer erhalten hat. Möglicherweise wird der zugrunde liegende Fehler irgendwann von den Maionatinern von jekyll beseitigt.