首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Gem:Ext::BuildError: ERROR:未能在Mac上构建创业板本机扩展

Gem:Ext::BuildError: ERROR:未能在Mac上构建创业板本机扩展
EN

Stack Overflow用户
提问于 2021-05-26 12:18:56
回答 2查看 870关注 0票数 0

我是个初级程序员。我不知道这个问题。

首先,我想在Jekyll“https://github.com/cotes2020/jekyll-theme-chirpy”中使用这个主题,所以,我下载了Gem、Ruby等等。在本网站上根据"https://jekyllrb.com/docs/installation/macos/“的解释。

但是Ruby有问题..。

代码语言:javascript
复制
bagjun-yeong@bagjun-yeong-ui-MacBookPro UCDAyoung.github.io % bundle install
Fetching gem metadata from https://rubygems.org/..........
Resolving dependencies...
Using public_suffix 4.0.6
Using bundler 2.2.17
Using mercenary 0.4.0
Using colorator 1.1.0
Using eventmachine 1.2.7
Using http_parser.rb 0.6.0
Using ffi 1.15.1
Using forwardable-extended 2.6.0
Using concurrent-ruby 1.1.8
Following files may not be writable, so sudo is needed:
  /Library/Ruby/Gems/2.6.0
  /Library/Ruby/Gems/2.6.0/build_info
  /Library/Ruby/Gems/2.6.0/cache
  /Library/Ruby/Gems/2.6.0/doc
  /Library/Ruby/Gems/2.6.0/extensions
  /Library/Ruby/Gems/2.6.0/gems
  /Library/Ruby/Gems/2.6.0/plugins
  /Library/Ruby/Gems/2.6.0/specifications
Using racc 1.5.2
Using rainbow 3.0.0
Using liquid 4.0.3
Using rouge 3.26.0
Using safe_yaml 1.0.5
Using unicode-display_width 1.7.0
Using jekyll-paginate 1.1.0
Using nokogiri 1.11.5 (arm64-darwin)
Using ethon 0.14.0
Using i18n 1.8.10
Using sassc 2.4.0
Using rb-inotify 0.10.1
Using pathutil 0.16.2
Using terminal-table 2.0.0
Using rb-fsevent 0.11.0
Using typhoeus 1.4.0
Using jekyll-sass-converter 2.1.0
Using listen 3.5.1
Using addressable 2.7.0
Using jekyll-watch 2.2.1
Using yell 2.2.2
Using rexml 3.2.5
Using parallel 1.20.1
Using em-websocket 0.5.2
Using nokogiri 1.11.5 (x86_64-darwin)
Using kramdown 2.3.1
Using kramdown-parser-gfm 1.1.0
Using jekyll 4.2.0
Using jekyll-archives 2.2.1
Using jekyll-redirect-from 0.16.0
Using jekyll-seo-tag 2.7.1
Using jekyll-sitemap 1.4.0
Using jekyll-theme-chirpy 4.0.1 from source at `.`
Fetching nokogumbo 2.0.5


Your user account isn't allowed to install to the system RubyGems.
  You can cancel this installation and run:

      bundle config set --local path 'vendor/bundle'
      bundle install

  to install the gems into ./vendor/bundle/, or you can enter your password
  and install the bundled gems to RubyGems using sudo.

  Password: 


Your user account isn't allowed to install to the system RubyGems.
  You can cancel this installation and run:

      bundle config set --local path 'vendor/bundle'
      bundle install

  to install the gems into ./vendor/bundle/, or you can enter your password
  and install the bundled gems to RubyGems using sudo.

  Password: 

我认为它是重叠的原因是终端让我输入我的密码2次来安装gem。

代码语言:javascript
复制
Installing nokogumbo 2.0.5 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

current directory:
/var/folders/h5/pv309pys7cd7_k058rl0wgx40000gn/T/bundler20210526-4419-9z2i9nnokogumbo-2.0.5/gems/nokogumbo-2.0.5/ext/nokogumbo
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby -I /Library/Ruby/Site/2.6.0 -r ./siteconf20210526-4419-z9tg1b.rb
extconf.rb
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers.  Check the mkmf.log file for more details.  You may
need configuration options.

Provided configuration options:
    --with-opt-dir
    --without-opt-dir
    --with-opt-include
    --without-opt-include=${opt-dir}/include
    --with-opt-lib
    --without-opt-lib=${opt-dir}/lib
    --with-make-prog
    --without-make-prog
    --srcdir=.
    --curdir
    --ruby=/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/$(RUBY_BASE_NAME)
/Library/Ruby/Site/2.6.0/rubygems/core_ext/kernel_require.rb:160:in `require': cannot load such file -- nokogiri/nokogiri
(LoadError)
    from /Library/Ruby/Site/2.6.0/rubygems/core_ext/kernel_require.rb:160:in `rescue in require'
    from /Library/Ruby/Site/2.6.0/rubygems/core_ext/kernel_require.rb:149:in `require'
    from /Library/Ruby/Gems/2.6.0/gems/nokogiri-1.11.5-arm64-darwin/lib/nokogiri/extension.rb:25:in `rescue in <top (required)>'
    from /Library/Ruby/Gems/2.6.0/gems/nokogiri-1.11.5-arm64-darwin/lib/nokogiri/extension.rb:4:in `<top (required)>'
    from /Library/Ruby/Site/2.6.0/rubygems/core_ext/kernel_require.rb:85:in `require'
    from /Library/Ruby/Site/2.6.0/rubygems/core_ext/kernel_require.rb:85:in `require'
    from /Library/Ruby/Gems/2.6.0/gems/nokogiri-1.11.5-arm64-darwin/lib/nokogiri.rb:11:in `<top (required)>'
    from /Library/Ruby/Site/2.6.0/rubygems/core_ext/kernel_require.rb:160:in `require'
    from /Library/Ruby/Site/2.6.0/rubygems/core_ext/kernel_require.rb:160:in `rescue in require'
    from /Library/Ruby/Site/2.6.0/rubygems/core_ext/kernel_require.rb:149:in `require'
    from extconf.rb:4:in `<main>'
/Library/Ruby/Site/2.6.0/rubygems/core_ext/kernel_require.rb:85:in `require': cannot load such file -- nokogiri/nokogiri (LoadError)
    from /Library/Ruby/Site/2.6.0/rubygems/core_ext/kernel_require.rb:85:in `require'
    from /Library/Ruby/Gems/2.6.0/gems/nokogiri-1.11.5-arm64-darwin/lib/nokogiri/extension.rb:25:in `rescue in <top (required)>'
    from /Library/Ruby/Gems/2.6.0/gems/nokogiri-1.11.5-arm64-darwin/lib/nokogiri/extension.rb:4:in `<top (required)>'
    from /Library/Ruby/Site/2.6.0/rubygems/core_ext/kernel_require.rb:85:in `require'
    from /Library/Ruby/Site/2.6.0/rubygems/core_ext/kernel_require.rb:85:in `require'
    from /Library/Ruby/Gems/2.6.0/gems/nokogiri-1.11.5-arm64-darwin/lib/nokogiri.rb:11:in `<top (required)>'
    from /Library/Ruby/Site/2.6.0/rubygems/core_ext/kernel_require.rb:160:in `require'
    from /Library/Ruby/Site/2.6.0/rubygems/core_ext/kernel_require.rb:160:in `rescue in require'
    from /Library/Ruby/Site/2.6.0/rubygems/core_ext/kernel_require.rb:149:in `require'
    from extconf.rb:4:in `<main>'
/Library/Ruby/Site/2.6.0/rubygems/core_ext/kernel_require.rb:85:in `require':
dlopen(/Library/Ruby/Gems/2.6.0/gems/nokogiri-1.11.5-arm64-darwin/lib/nokogiri/2.6/nokogiri.bundle, 0x0009): could not use
'/Library/Ruby/Gems/2.6.0/gems/nokogiri-1.11.5-arm64-darwin/lib/nokogiri/2.6/nokogiri.bundle' because it is not a compatible arch -
/Library/Ruby/Gems/2.6.0/gems/nokogiri-1.11.5-arm64-darwin/lib/nokogiri/2.6/nokogiri.bundle (LoadError)
    from /Library/Ruby/Site/2.6.0/rubygems/core_ext/kernel_require.rb:85:in `require'
    from /Library/Ruby/Gems/2.6.0/gems/nokogiri-1.11.5-arm64-darwin/lib/nokogiri/extension.rb:6:in `<top (required)>'
    from /Library/Ruby/Site/2.6.0/rubygems/core_ext/kernel_require.rb:85:in `require'
    from /Library/Ruby/Site/2.6.0/rubygems/core_ext/kernel_require.rb:85:in `require'
    from /Library/Ruby/Gems/2.6.0/gems/nokogiri-1.11.5-arm64-darwin/lib/nokogiri.rb:11:in `<top (required)>'
    from /Library/Ruby/Site/2.6.0/rubygems/core_ext/kernel_require.rb:160:in `require'
    from /Library/Ruby/Site/2.6.0/rubygems/core_ext/kernel_require.rb:160:in `rescue in require'
    from /Library/Ruby/Site/2.6.0/rubygems/core_ext/kernel_require.rb:149:in `require'
    from extconf.rb:4:in `<main>'
/Library/Ruby/Site/2.6.0/rubygems/core_ext/kernel_require.rb:85:in `require': cannot load such file -- nokogiri (LoadError)
    from /Library/Ruby/Site/2.6.0/rubygems/core_ext/kernel_require.rb:85:in `require'
    from extconf.rb:4:in `<main>'

extconf failed, exit code 1

Gem files will remain installed in
/var/folders/h5/pv309pys7cd7_k058rl0wgx40000gn/T/bundler20210526-4419-9z2i9nnokogumbo-2.0.5/gems/nokogumbo-2.0.5 for inspection.
Results logged to
/var/folders/h5/pv309pys7cd7_k058rl0wgx40000gn/T/bundler20210526-4419-9z2i9nnokogumbo-2.0.5/extensions/universal-darwin-20/2.6.0/nokogumbo-2.0.5/gem_make.out

An error occurred while installing nokogumbo (2.0.5), and Bundler cannot continue.
Make sure that `gem install nokogumbo -v '2.0.5' --source 'https://rubygems.org/'` succeeds before bundling.

In Gemfile:
  html-proofer was resolved to 3.19.1, which depends on
    nokogumbo

也是,我做了创业板安装nokogumbo -v '2.0.5‘-源'https://rubygems.org/’,但是,它也没有工作。

请帮我解决这个problem.Thank你这么多。

EN

回答 2

Stack Overflow用户

回答已采纳

发布于 2021-07-28 12:58:23

您可以通过在终端中运行xcode-select --install来安装依赖项。

下面是对类似问题How to install Xcode Command Line Tools的详细回答。

票数 1
EN

Stack Overflow用户

发布于 2021-07-27 19:43:21

在安装shopify-cli之前尝试安装这些依赖项。

sudo apt-get安装构建基本sudo apt-get安装bison openssl curl git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libxml2-dev autoconf libc6-dev ncurses-dev automake libtool

票数 -1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/67704719

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档