ruby - 运行 $bundle exec jekyllserve 时无法打开库 'libcurl.so.4'

标签 ruby jekyll libcurl

我使用 Jekyll 使用 GitHub 页面来写博客。我在运行 $bundle exec jekyllservejekyllserve 时遇到问题,控制台打印:

C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/ffi-1.9.18-x64-mingw32/lib/ffi/library.rb:147:in `block in ffi_lib':     Could not op (LoadError)libcurl': The specified module could not be found.
.
Could not open library 'libcurl.dll': The specified module could not be found.
.
Could not open library 'libcurl.so.4': The specified module could not be found.
.
Could not open library 'libcurl.so.4.dll': The specified module could not be found.
    from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/ffi-1.9.18-x64-mingw32/lib/ffi/library.rb:100:in `map'
    from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/ffi-1.9.18-x64-mingw32/lib/ffi/library.rb:100:in `ffi_lib'
    from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/ethon-0.10.1/lib/ethon/curls/settings.rb:6:in `<module:Curl>'
    from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/ethon-0.10.1/lib/ethon/curls/settings.rb:2:in `<module:Ethon>'
    from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/ethon-0.10.1/lib/ethon/curls/settings.rb:1:in `<top (required)>'
    from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/ethon-0.10.1/lib/ethon/curl.rb:27:in `require'
    from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/ethon-0.10.1/lib/ethon/curl.rb:27:in `<module:Curl>'
    from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/ethon-0.10.1/lib/ethon/curl.rb:13:in `<module:Ethon>'
    from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/ethon-0.10.1/lib/ethon/curl.rb:8:in `<top (required)>'
    from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/ethon-0.10.1/lib/ethon.rb:15:in `require'
    from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/ethon-0.10.1/lib/ethon.rb:15:in `<top (required)>'
    from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/bundler-1.15.1/lib/bundler/runtime.rb:82:in `require'
    from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/bundler-1.15.1/lib/bundler/runtime.rb:82:in `block (2 levels) in require'
    from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/bundler-1.15.1/lib/bundler/runtime.rb:77:in `each'
    from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/bundler-1.15.1/lib/bundler/runtime.rb:77:in `block in require'
    from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/bundler-1.15.1/lib/bundler/runtime.rb:66:in `each'
    from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/bundler-1.15.1/lib/bundler/runtime.rb:66:in `require'
    from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/bundler-1.15.1/lib/bundler.rb:108:in `require'
    from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/jekyll-3.4.3/lib/jekyll/plugin_manager.rb:37:in `require_from_bundler'
    from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/jekyll-3.4.3/exe/jekyll:9:in `<top (required)>'
    from C:/Ruby24-x64/bin/jekyll:22:in `load'
    from C:/Ruby24-x64/bin/jekyll:22:in `<main>'

可能会出现什么问题?当我将 Gemfile 依赖项更改为 gem 'jekyll', '3.4.3'

时,会发生这种情况

以下是我的Gemfile的内容:

source "https://rubygems.org"

gem 'jekyll', '3.4.3'

group :jekyll_plugins do
  gem 'github-pages'
  gem 'i18n', '0.8.4'
  gem 'minitest', '5.10.2'
  gem 'thread_safe', '0.3.6'
  gem 'public_suffix', '2.0.5'
  gem 'net-dns', '0.8.0'
  gem 'multipart-post', '2.0.0'
  gem 'ffi', '1.9.18'
  gem 'colorator', '1.1.0'
  gem 'sass', '3.4.24'
  gem 'rb-fsevent', '0.9.8'
  gem 'kramdown', '1.13.2'
  gem 'liquid', '3.0.6'
  gem 'mercenary', '0.3.6'
  gem 'forwardable-extended', '2.6.0'
  gem 'rouge', '1.11.1'
  gem 'safe_yaml', '1.0.4'
  gem 'coffee-script-source', '1.12.2'
  gem 'execjs', '2.7.0'
  gem 'mini_portile2', '2.2.0'
  gem 'jekyll-paginate', '1.1.0'
  gem 'jekyll-swiss', '0.4.0'
  gem 'gemoji', '3.0.0'
  gem 'unicode-display_width', '1.2.1'
  gem 'bundler', '1.15.1'
  gem 'tzinfo', '1.2.3'
  gem 'addressable', '2.5.1'
  gem 'faraday', '0.12.1'
  gem 'ethon', '0.10.1'
  gem 'rb-inotify', '0.9.10'
  gem 'jekyll-sass-converter', '1.5.0'
  gem 'pathutil', '0.14.0'
  gem 'coffee-script', '2.4.1'
  gem 'nokogiri', '1.8.0'
  gem 'terminal-table', '1.8.0'
  gem 'activesupport', '4.2.8'
  gem 'sawyer', '0.8.1'
  gem 'typhoeus', '0.8.0'
  gem 'listen', '3.0.6'
  gem 'jekyll-coffeescript', '1.0.1'
  gem 'html-pipeline', '2.6.0'
  gem 'octokit', '4.7.0'
  gem 'jekyll-watch', '1.5.0'
  gem 'github-pages-health-check', '1.3.4'
  gem 'jekyll-gist', '1.4.0'
  gem 'jekyll-avatar', '0.4.2'
  gem 'jekyll-default-layout', '0.1.4'
  gem 'jekyll-feed', '0.9.2'
  gem 'jekyll-github-metadata', '2.3.1'
  gem 'jekyll-mentions', '1.2.0'
  gem 'jekyll-optional-front-matter', '0.1.2'
  gem 'jekyll-readme-index', '0.1.0'
  gem 'jekyll-redirect-from', '0.12.1'
  gem 'jekyll-relative-links', '0.4.0'
  gem 'jekyll-seo-tag', '2.2.3'
  gem 'jekyll-sitemap', '1.0.0'
  gem 'jekyll-theme-architect', '0.0.4'
  gem 'jekyll-theme-cayman', '0.0.4'
  gem 'jekyll-theme-dinky', '0.0.4'
  gem 'jekyll-theme-hacker', '0.0.4'
  gem 'jekyll-theme-leap-day', '0.0.4'
  gem 'jekyll-theme-merlot', '0.0.4'
  gem 'jekyll-theme-midnight', '0.0.4'
  gem 'jekyll-theme-minimal', '0.0.4'
  gem 'jekyll-theme-modernist', '0.0.4'
  gem 'jekyll-theme-primer', '0.2.1'
  gem 'jekyll-theme-slate', '0.0.4'
  gem 'jekyll-theme-tactile', '0.0.4'
  gem 'jekyll-theme-time-machine', '0.0.4'
  gem 'jekyll-titles-from-headings', '0.1.5'
  gem 'jemoji', '0.8.0'
  gem 'minima', '2.1.1'
end

非常感谢!

最佳答案

您似乎没有 libcurl,它可能是此版本的 Jekyll 的依赖项或其依赖项之一。您可以尝试通过 https://curl.haxx.se/dlwiz/?type=lib 安装它吗? ?

关于ruby - 运行 $bundle exec jekyllserve 时无法打开库 'libcurl.so.4',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44618581/

相关文章:

ruby - Ruby解析器的原理是什么?

Jekyll - 无法按日期反向排序

Jekyll 每次都会重新编译每一页

c++ - libcurl 在下载文件时输出额外的尾随字节

c++ libcurl 进度回调下载不工作

ruby - .downcase!语法速记

Ruby OCI8 和 Oracle 存储过程 - 如何访问作为引用游标的bind_param?

ruby - 使用 Nokogiri 的例子有哪些?

Jekyll + gh-pages + GoDaddy 博客似乎无法在 Mac 上正确加载

objective-c - libcURL 代码不工作,说我正在上传到没有文件名的服务器