You are not logged in.
I'm trying to understand why I'm getting this error when running gem update:
Updating installed gems
Updating net-pop
Building native extensions. This could take a while...
ERROR: Error installing net-pop:
ERROR: Failed to build gem native extension.
current directory: /home/brightchip/.gem/ruby/2.7.0/gems/digest-3.0.0/ext/digest
/usr/bin/ruby -I /usr/lib/ruby/2.7.0 -r ./siteconf20210113-639621-5rxmfr.rb extconf.rb
creating Makefile
current directory: /home/brightchip/.gem/ruby/2.7.0/gems/digest-3.0.0/ext/digest
make "DESTDIR=" clean
current directory: /home/brightchip/.gem/ruby/2.7.0/gems/digest-3.0.0/ext/digest
make "DESTDIR="
compiling digest.c
linking shared-object digest.so
current directory: /home/brightchip/.gem/ruby/2.7.0/gems/digest-3.0.0/ext/digest
make "DESTDIR=" install
/usr/bin/install -c -m 0755 digest.so ./.gem.20210113-639621-1kv3df0
installing digest libraries
/usr/bin/install: cannot create regular file '/usr/include/ruby-2.7.0/ruby/digest.h': Permission denied
make: *** [Makefile:204: /usr/include/ruby-2.7.0/ruby/digest.h] Error 1
make install failed, exit code 2
It's probably harmless but I always like to understand why I get errors.
Here is the output of gem env:
RubyGems Environment:
- RUBYGEMS VERSION: 3.1.4
- RUBY VERSION: 2.7.2 (2020-10-01 patchlevel 137) [x86_64-linux]
- INSTALLATION DIRECTORY: /usr/lib/ruby/gems/2.7.0
- USER INSTALLATION DIRECTORY: /home/brightchip/.gem/ruby/2.7.0
- RUBY EXECUTABLE: /usr/bin/ruby
- GIT EXECUTABLE: /usr/bin/git
- EXECUTABLE DIRECTORY: /usr/bin
- SPEC CACHE DIRECTORY: /home/brightchip/.gem/specs
- SYSTEM CONFIGURATION DIRECTORY: /etc
- RUBYGEMS PLATFORMS:
- ruby
- x86_64-linux
- GEM PATHS:
- /usr/lib/ruby/gems/2.7.0
- /home/brightchip/.gem/ruby/2.7.0
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :backtrace => false
- :bulk_threshold => 1000
- "gem" => "--user-install"
- REMOTE SOURCES:
- https://rubygems.org/
- SHELL PATH:
- /usr/local/sbin
- /usr/local/bin
- /usr/bin
- /opt/cuda/bin
- /opt/cuda/integration/nsight-compute
- /opt/cuda/integration/nsight-systems
- /usr/lib/jvm/default/bin
- /usr/bin/site_perl
- /usr/bin/vendor_perl
- /usr/bin/core_perl
- /home/datapool/bin
- /opt/cuda/bin
- /home/brightchip/.gem/ruby/2.7.0/bin
- /home/brightchip/.local/bin
Any thoughts or solution?
Offline
I'm having a very similar issue:
Updating installed gems
Updating net-pop
Building native extensions. This could take a while...
ERROR: Error installing net-pop:
ERROR: Failed to build gem native extension.
current directory: /home/user/.gem/ruby/gems/digest-3.0.0/ext/digest
/usr/bin/ruby -I /usr/lib/ruby/2.7.0 -r ./siteconf20210126-1830-1lhse09.rb extconf.rb
creating Makefile
current directory: /home/user/.gem/ruby/gems/digest-3.0.0/ext/digest
make "DESTDIR=" clean
current directory: /home/user/.gem/ruby/gems/digest-3.0.0/ext/digest
make "DESTDIR="
compiling digest.c
linking shared-object digest.so
current directory: /home/user/.gem/ruby/gems/digest-3.0.0/ext/digest
make "DESTDIR=" install
/usr/bin/install -c -m 0755 digest.so ./.gem.20210126-1830-18om466
installing digest libraries
/usr/bin/install: cannot remove '/usr/include/ruby-2.7.0/ruby/digest.h': Permission denied
make: *** [Makefile:204: /usr/include/ruby-2.7.0/ruby/digest.h] Error 1
make install failed, exit code 2
Gem files will remain installed in /home/user/.gem/ruby/gems/digest-3.0.0 for inspection.
Results logged to /home/user/.gem/ruby/extensions/x86_64-linux/2.7.0/digest-3.0.0/gem_make.out
Gems updated: digest
Notice that yours fails to create digest.h and mine fails to delete (which I think it shouldn't even be trying to do based on my gem env). Here is my gem env:
RubyGems Environment:
- RUBYGEMS VERSION: 3.1.4
- RUBY VERSION: 2.7.2 (2020-10-01 patchlevel 137) [x86_64-linux]
- INSTALLATION DIRECTORY: /home/user/.gem/ruby
- USER INSTALLATION DIRECTORY: /home/user/.gem/ruby/2.7.0
- RUBY EXECUTABLE: /usr/bin/ruby
- GIT EXECUTABLE: /usr/bin/git
- EXECUTABLE DIRECTORY: /home/user/.gem/ruby/bin
- SPEC CACHE DIRECTORY: /home/user/.gem/specs
- SYSTEM CONFIGURATION DIRECTORY: /etc
- RUBYGEMS PLATFORMS:
- ruby
- x86_64-linux
- GEM PATHS:
- /home/user/.gem/ruby
- /home/user/.gem/ruby/gems
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :backtrace => false
- :bulk_threshold => 1000
- "gem" => "--no-format-executable --no-user-install"
- "install" => "--no-format-executable --no-user-install"
- "update" => "--no-format-executable --no-user-install"
- REMOTE SOURCES:
- https://rubygems.org/
- SHELL PATH:
- /home/user/src/google-cloud-sdk/bin
- /home/user/bin
- /home/user/.local/bin
- /home/user/.config/zsh/scripts
- /home/user/.cache/gvm/use/bin
- /home/user/.go
- /home/user/.go/bin
- /home/user/.gem/ruby/bin
- /usr/bin/core_perl
- /usr/bin/vendor_perl
- /usr/local/bin
- /usr/local/sbin
- /usr/bin
- /usr/sbin
- /bin
- /sbin
Offline
@mjwhitta Have you found a solution yet? I tried running the update with sudo (I know it's not the right way) but no luck.
Offline
Nope. I also tried as sudo with no luck. I imagine it's an issue with the digest gem. It should be creating/removing digest.h in/from the proper location. I've been tinkering with the Makefile a little. No luck yet, but I might keep trying. I'll update here if I get it working tho.
Offline
@mjwhitta @d_fajardo Non-solution until the ruby package gets updated to 3.0:
gem update --ignore-dependencies
I found this while trying to do 'gem update --ignore net-pop' which is an invalid flag. However, gem, even when lacking bash auto-completion, is able to take commands and arguments lazily (see e.g. 'gem up' and 'gem cl'). This will break net-pop but will allow for gem update to ignore net-pop until future update. To fix net-pop, simply run 'gem install net-pop' when /usr/bin/ruby reaches 3.0.0.
Why I am almost positive 3.0.0 will fix this: https://stdgems.org includes net-pop, which got updated to 0.1.1 in 3.0.0, and which is currently unmaintained.
Offline
Great! Thanks for info.
Offline