Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bundle update error #4477

Closed
xplosionmind opened this issue Mar 20, 2021 · 5 comments
Closed

Bundle update error #4477

xplosionmind opened this issue Mar 20, 2021 · 5 comments

Comments

@xplosionmind
Copy link

Error Report

Questions

Please fill out answers to these questions, it'll help us figure out
why things are going wrong.

  • What did you do?
    I ran the command bundle update
  • What did you expect to happen?
    I expected Bundler to update all of my gems
  • What happened instead?
    Instead, the process stopped. As per the log below
  • Have you tried any solutions posted on similar issues in our issue tracker, stack overflow, or google?
    I tried everything, I still can’t understand
  • Have you read our issues document, https://github.com/rubygems/rubygems/blob/master/bundler/doc/contributing/ISSUES.md?
  • yes!

Backtrace

Errno::EPERM: Operation not permitted @ apply2files - /usr/local/lib/ruby/gems/3.0.0/gems/ffi-1.15.0/CHANGELOG.md
  /usr/local/Cellar/ruby/3.0.0_1/lib/ruby/3.0.0/fileutils.rb:1346:in `chmod'
  /usr/local/Cellar/ruby/3.0.0_1/lib/ruby/3.0.0/fileutils.rb:1346:in `chmod'
  /usr/local/Cellar/ruby/3.0.0_1/lib/ruby/3.0.0/fileutils.rb:1017:in `block in chmod'
  /usr/local/Cellar/ruby/3.0.0_1/lib/ruby/3.0.0/fileutils.rb:1016:in `each'
  /usr/local/Cellar/ruby/3.0.0_1/lib/ruby/3.0.0/fileutils.rb:1016:in `chmod'
  /usr/local/Cellar/ruby/3.0.0_1/lib/ruby/3.0.0/rubygems/package.rb:433:in `block (3 levels) in extract_tar_gz'
  /usr/local/Cellar/ruby/3.0.0_1/lib/ruby/3.0.0/rubygems/package.rb:431:in `open'
  /usr/local/Cellar/ruby/3.0.0_1/lib/ruby/3.0.0/rubygems/package.rb:431:in `block (2 levels) in extract_tar_gz'
  /usr/local/Cellar/ruby/3.0.0_1/lib/ruby/3.0.0/rubygems/package/tar_reader.rb:65:in `each'
  /usr/local/Cellar/ruby/3.0.0_1/lib/ruby/3.0.0/rubygems/package.rb:412:in `block in extract_tar_gz'
  /usr/local/Cellar/ruby/3.0.0_1/lib/ruby/3.0.0/rubygems/package.rb:541:in `block in open_tar_gz'
  /usr/local/Cellar/ruby/3.0.0_1/lib/ruby/3.0.0/rubygems/package.rb:538:in `wrap'
  /usr/local/Cellar/ruby/3.0.0_1/lib/ruby/3.0.0/rubygems/package.rb:538:in `open_tar_gz'
  /usr/local/Cellar/ruby/3.0.0_1/lib/ruby/3.0.0/rubygems/package.rb:411:in `extract_tar_gz'
  /usr/local/Cellar/ruby/3.0.0_1/lib/ruby/3.0.0/rubygems/package.rb:391:in `block (2 levels) in extract_files'
  /usr/local/Cellar/ruby/3.0.0_1/lib/ruby/3.0.0/rubygems/package/tar_reader.rb:65:in `each'
  /usr/local/Cellar/ruby/3.0.0_1/lib/ruby/3.0.0/rubygems/package.rb:388:in `block in extract_files'
  /usr/local/Cellar/ruby/3.0.0_1/lib/ruby/3.0.0/rubygems/package/file_source.rb:29:in `open'
  /usr/local/Cellar/ruby/3.0.0_1/lib/ruby/3.0.0/rubygems/package/file_source.rb:29:in `with_read_io'
  /usr/local/Cellar/ruby/3.0.0_1/lib/ruby/3.0.0/rubygems/package.rb:385:in `extract_files'
  /usr/local/Cellar/ruby/3.0.0_1/lib/ruby/3.0.0/rubygems/installer.rb:830:in `extract_files'
  /usr/local/Cellar/ruby/3.0.0_1/lib/ruby/3.0.0/rubygems/installer.rb:310:in `install'
  /usr/local/lib/ruby/gems/3.0.0/gems/bundler-2.2.8/lib/bundler/source/rubygems.rb:160:in `install'
  /usr/local/lib/ruby/gems/3.0.0/gems/bundler-2.2.8/lib/bundler/installer/gem_installer.rb:67:in `install'
  /usr/local/lib/ruby/gems/3.0.0/gems/bundler-2.2.8/lib/bundler/installer/gem_installer.rb:18:in `install_from_spec'
  /usr/local/lib/ruby/gems/3.0.0/gems/bundler-2.2.8/lib/bundler/installer/parallel_installer.rb:163:in `do_install'
  /usr/local/lib/ruby/gems/3.0.0/gems/bundler-2.2.8/lib/bundler/installer/parallel_installer.rb:154:in `block in worker_pool'
  /usr/local/lib/ruby/gems/3.0.0/gems/bundler-2.2.8/lib/bundler/worker.rb:62:in `apply_func'
  /usr/local/lib/ruby/gems/3.0.0/gems/bundler-2.2.8/lib/bundler/worker.rb:57:in `block in process_queue'
  /usr/local/lib/ruby/gems/3.0.0/gems/bundler-2.2.8/lib/bundler/worker.rb:54:in `loop'
  /usr/local/lib/ruby/gems/3.0.0/gems/bundler-2.2.8/lib/bundler/worker.rb:54:in `process_queue'
  /usr/local/lib/ruby/gems/3.0.0/gems/bundler-2.2.8/lib/bundler/worker.rb:88:in `block (2 levels) in create_threads'

Environment

Bundler       2.2.8
  Platforms   ruby, x86_64-darwin-20
Ruby          3.0.0p0 (2020-12-25 revision 95aff214687a5e12c3eb57d056665741e734c188) [x86_64-darwin20]
  Full Path   /usr/local/opt/ruby/bin/ruby
  Config Dir  /usr/local/Cellar/ruby/3.0.0_1/etc
RubyGems      3.2.3
  Gem Home    /usr/local/lib/ruby/gems/3.0.0
  Gem Path    /usr/local/lib/ruby/gems/3.0.0:/Users/xplosionmind/.gem/ruby/3.0.0:/usr/local/Cellar/ruby/3.0.0_1/lib/ruby/gems/3.0.0
  User Home   /Users/xplosionmind
  User Path   /Users/xplosionmind/.gem/ruby/3.0.0
  Bin Dir     /usr/local/lib/ruby/gems/3.0.0/bin
OpenSSL
  Compiled    OpenSSL 1.1.1i  8 Dec 2020
  Loaded      OpenSSL 1.1.1j  16 Feb 2021
  Cert File   /usr/local/etc/openssl@1.1/cert.pem
  Cert Dir    /usr/local/etc/openssl@1.1/certs
Tools
  Git         2.30.2
  RVM         not installed
  rbenv       not installed
  chruby      not installed
Gem.ruby      /usr/local/opt/ruby/bin/ruby
bundle #!     /usr/local/Cellar/ruby/3.0.0_1/bin/ruby

Bundler Build Metadata

Built At          2021-02-02
Git SHA           4015e550dc
Released Version  true

Gemfile

Gemfile

source "https://rubygems.org"
# Hello! This is where you manage which Jekyll version is used to run.
# When you want to use a different version, change it below, save the
# file and run `bundle install`. Run Jekyll with `bundle exec`, like so:
#
#     bundle exec jekyll serve
#
# This will help ensure the proper Jekyll version is running.
# Happy Jekylling!
gem "jekyll"

# Add Liquid-C for faster rendering of Liquid
gem "liquid-c" # no sensible improvement in performance

# If you want to use GitHub Pages, remove the "gem "jekyll"" above and
# uncomment the line below. To upgrade, run `bundle update github-pages`.
# gem "github-pages", group: :jekyll_plugins
# If you have any plugins, put them here!
group :jekyll_plugins do
  gem "webrick"
# gem "jekyll-commonmark" # not working with bi-directional links generator plugin and with pure Liquid toc parser
  gem "jekyll-feed"
  gem "jekyll-seo-tag"
  gem "jekyll-sitemap"
  gem "jekyll-last-modified-at"
  gem "jekyll-target-blank"
  gem "jekyll-watch"
  gem "jekyll-redirect-from"
  gem "jekyll-email-protect"
  gem "jekyll-datapage-generator"
  gem "jekyll-debug"
  gem "jekyll-mentions"
  gem "jekyll-liquify"
  gem "jekyll-auto-image"
  gem "html-proofer"
  gem "jekyll-toc"
# gem "jekyll-admin"
# gem "jekyll-optional-front-matter"
#  gem "jekyll-paginate"
# gem "jekyll-paginate-v2"
#  gem "jekyll-archives"
#  gem "jekyll-youtube"
#  gem "jekyll-spaceship"
#  gem "jekyll-pdf-embed"
#  gem "jekyll-giphy"
#  gem "jekyll-timeago"
#  gem "liquid_pluralize"
#  gem "liquid_reading_time"
#  gem "jekyll-gist"
#  gem "jekyll-twitter-plugin"
#  gem "jekyll-news-sitemap"
#  gem "jekyll-git_metadata"
#  gem "jekyll-auto-image"
#  gem "jekyll-tagging"
#  gem "jekyll-auto-image"
#  gem "premonition"
end

Gemfile.lock

GEM
  remote: https://rubygems.org/
  specs:
    activesupport (6.1.3)
      concurrent-ruby (~> 1.0, >= 1.0.2)
      i18n (>= 1.6, < 2)
      minitest (>= 5.1)
      tzinfo (~> 2.0)
      zeitwerk (~> 2.3)
    addressable (2.7.0)
      public_suffix (>= 2.0.2, < 5.0)
    coderay (1.1.3)
    colorator (1.1.0)
    concurrent-ruby (1.1.8)
    em-websocket (0.5.2)
      eventmachine (>= 0.12.9)
      http_parser.rb (~> 0.6.0)
    ethon (0.12.0)
      ffi (>= 1.3.0)
    eventmachine (1.2.7)
    ffi (1.14.2)
    forwardable-extended (2.6.0)
    html-pipeline (2.14.0)
      activesupport (>= 2)
      nokogiri (>= 1.4)
    html-proofer (3.18.5)
      addressable (~> 2.3)
      mercenary (~> 0.3)
      nokogumbo (~> 2.0)
      parallel (~> 1.3)
      rainbow (~> 3.0)
      typhoeus (~> 1.3)
      yell (~> 2.0)
    http_parser.rb (0.6.0)
    i18n (1.8.9)
      concurrent-ruby (~> 1.0)
    jekyll (4.2.0)
      addressable (~> 2.4)
      colorator (~> 1.0)
      em-websocket (~> 0.5)
      i18n (~> 1.0)
      jekyll-sass-converter (~> 2.0)
      jekyll-watch (~> 2.0)
      kramdown (~> 2.3)
      kramdown-parser-gfm (~> 1.0)
      liquid (~> 4.0)
      mercenary (~> 0.4.0)
      pathutil (~> 0.9)
      rouge (~> 3.0)
      safe_yaml (~> 1.0)
      terminal-table (~> 2.0)
    jekyll-auto-image (1.1.3)
      jekyll
    jekyll-datapage-generator (1.3.0)
    jekyll-debug (0.0.2)
      liquid (>= 2.5, < 5.0)
      pry (~> 0.10)
      rb-readline (~> 0.5)
    jekyll-email-protect (1.1.0)
    jekyll-feed (0.15.1)
      jekyll (>= 3.7, < 5.0)
    jekyll-last-modified-at (1.3.0)
      jekyll (>= 3.7, < 5.0)
      posix-spawn (~> 0.3.9)
    jekyll-liquify (0.0.2)
      liquid (>= 2.5, < 5.0)
      redcarpet (~> 3.1)
    jekyll-mentions (1.6.0)
      html-pipeline (~> 2.3)
      jekyll (>= 3.7, < 5.0)
    jekyll-redirect-from (0.16.0)
      jekyll (>= 3.3, < 5.0)
    jekyll-sass-converter (2.1.0)
      sassc (> 2.0.1, < 3.0)
    jekyll-seo-tag (2.7.1)
      jekyll (>= 3.8, < 5.0)
    jekyll-sitemap (1.4.0)
      jekyll (>= 3.7, < 5.0)
    jekyll-target-blank (2.0.0)
      jekyll (>= 3.0, < 5.0)
      nokogiri (~> 1.10)
    jekyll-toc (0.17.0)
      jekyll (>= 3.9)
      nokogiri (~> 1.10)
    jekyll-watch (2.2.1)
      listen (~> 3.0)
    kramdown (2.3.0)
      rexml
    kramdown-parser-gfm (1.1.0)
      kramdown (~> 2.0)
    liquid (4.0.3)
    liquid-c (4.0.0)
      liquid (>= 3.0.0)
    listen (3.4.1)
      rb-fsevent (~> 0.10, >= 0.10.3)
      rb-inotify (~> 0.9, >= 0.9.10)
    mercenary (0.4.0)
    method_source (1.0.0)
    minitest (5.14.4)
    nokogiri (1.11.2-x86_64-darwin)
      racc (~> 1.4)
    nokogumbo (2.0.4)
      nokogiri (~> 1.8, >= 1.8.4)
    parallel (1.20.1)
    pathutil (0.16.2)
      forwardable-extended (~> 2.6)
    posix-spawn (0.3.15)
    pry (0.14.0)
      coderay (~> 1.1)
      method_source (~> 1.0)
    public_suffix (4.0.6)
    racc (1.5.2)
    rainbow (3.0.0)
    rb-fsevent (0.10.4)
    rb-inotify (0.10.1)
      ffi (~> 1.0)
    rb-readline (0.5.5)
    redcarpet (3.5.1)
    rexml (3.2.4)
    rouge (3.26.0)
    safe_yaml (1.0.5)
    sassc (2.4.0)
      ffi (~> 1.9)
    terminal-table (2.0.0)
      unicode-display_width (~> 1.1, >= 1.1.1)
    typhoeus (1.4.0)
      ethon (>= 0.9.0)
    tzinfo (2.0.4)
      concurrent-ruby (~> 1.0)
    unicode-display_width (1.7.0)
    webrick (1.7.0)
    yell (2.2.2)
    zeitwerk (2.4.2)

PLATFORMS
  x86_64-darwin-20

DEPENDENCIES
  html-proofer
  jekyll
  jekyll-auto-image
  jekyll-datapage-generator
  jekyll-debug
  jekyll-email-protect
  jekyll-feed
  jekyll-last-modified-at
  jekyll-liquify
  jekyll-mentions
  jekyll-redirect-from
  jekyll-seo-tag
  jekyll-sitemap
  jekyll-target-blank
  jekyll-toc
  jekyll-watch
  liquid-c
  webrick

BUNDLED WITH
   2.2.8
@deivid-rodriguez
Copy link
Member

I'm reading stuff about Darwin's rootless mode. See for example, CocoaPods/CocoaPods#3680. Does gem install ffi work?

In general, ruby provided by OSX seems to have a lot of issues, and I don't have an OSX machine to troubleshoot anything :(

@xplosionmind
Copy link
Author

Thanks @deivid-rodriguez, do you know how I can uninstall the pre-installed Ruby and reinstall it from scratch?

Does gem install ffi work?

I tried, but no. The error message I got:

Building native extensions. This could take a while...
ERROR:  Error installing ffi:
	ERROR: Failed to build gem native extension.

    current directory: /usr/local/lib/ruby/gems/3.0.0/gems/ffi-1.15.0/ext/ffi_c
/usr/local/opt/ruby/bin/ruby -I /usr/local/Cellar/ruby/3.0.0_1/lib/ruby/3.0.0 -r ./siteconf20210320-12578-3jyf73.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
	--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=/usr/local/Cellar/ruby/3.0.0_1/bin/$(RUBY_BASE_NAME)
	--with-ffi_c-dir
	--without-ffi_c-dir
	--with-ffi_c-include
	--without-ffi_c-include=${ffi_c-dir}/include
	--with-ffi_c-lib
	--without-ffi_c-lib=${ffi_c-dir}/lib
	--enable-system-libffi
	--disable-system-libffi
	--with-libffi-config
	--without-libffi-config
	--with-pkg-config
	--without-pkg-config
/usr/local/Cellar/ruby/3.0.0_1/lib/ruby/3.0.0/mkmf.rb:471:in `try_do': The compiler failed to generate an executable file. (RuntimeError)
You have to install development tools first.
	from /usr/local/Cellar/ruby/3.0.0_1/lib/ruby/3.0.0/mkmf.rb:564:in `try_link0'
	from /usr/local/Cellar/ruby/3.0.0_1/lib/ruby/3.0.0/mkmf.rb:582:in `try_link'
	from /usr/local/Cellar/ruby/3.0.0_1/lib/ruby/3.0.0/mkmf.rb:684:in `try_ldflags'
	from /usr/local/Cellar/ruby/3.0.0_1/lib/ruby/3.0.0/mkmf.rb:1851:in `pkg_config'
	from extconf.rb:9:in `system_libffi_usable?'
	from extconf.rb:42:in `<main>'

To see why this extension failed to compile, please check the mkmf.log which can be found here:

  /usr/local/lib/ruby/gems/3.0.0/extensions/x86_64-darwin-20/3.0.0/ffi-1.15.0/mkmf.log

extconf failed, exit code 1

Gem files will remain installed in /usr/local/lib/ruby/gems/3.0.0/gems/ffi-1.15.0 for inspection.
Results logged to /usr/local/lib/ruby/gems/3.0.0/extensions/x86_64-darwin-20/3.0.0/ffi-1.15.0/gem_make.out

@deivid-rodriguez
Copy link
Member

ffi requires extra OS packages. Does installing any other gem through gem install work?

I recommend to install ruby through rbenv + ruby-build (https://github.com/rbenv/rbenv, https://github.com/rbenv/ruby-build).

@xplosionmind
Copy link
Author

Ok, I got rbenv and I globally updated everything to the latest version with Homebrew. Everything seems to work, now. Thank you very much!

Best,
T

@darkRaspberry
Copy link

darkRaspberry commented Jan 2, 2022

Hey please can you explain how to solve this. I do already installed libffi-dev and libffi

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants