Bug 47660 - Ошибка No such file or directory @ rb_sysopen при установке gem пакетов
Summary: Ошибка No such file or directory @ rb_sysopen при установке gem пакетов
Status: CLOSED FIXED
Alias: None
Product: Branch p10
Classification: Unclassified
Component: gem (show other bugs)
Version: не указана
Hardware: x86_64 Linux
: P5 major
Assignee: majioa@altlinux.org
QA Contact: qa-p10@altlinux.org
URL:
Keywords:
: 48859 (view as bug list)
Depends on:
Blocks:
 
Reported: 2023-09-21 11:39 MSK by Evgeniy Antonuyk
Modified: 2024-03-29 19:41 MSK (History)
15 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Evgeniy Antonuyk 2023-09-21 11:39:56 MSK
После обновления библиотеки libruby-devel и gem на AltLinux 10 возникает следующая ошибка при установке god или других пакетов:

gem 2:3.3.7-alt0.1:p10+307833.1522.205.1@1693900868
libruby-devel 3.1.2-alt0.1:p10+307833.1522.205.1@1693900868

gem install --bindir /usr/bin god
Building native extensions. This could take a while...
ERROR:  While executing gem ... (Errno::ENOENT)
No such file or directory @ rb_sysopen - libexec/god

До этого с прошлыми версиями установка происходила успешно:

gem 2:3.1.6-alt1.1:p10+291491.1000.21.1@1640428300
libruby-devel 2.7.4-alt2.2.1:p10+291491.1000.21.1@1640428300

gem install --bindir /usr/bin god
Successfully installed god-0.13.7
Parsing documentation for god-0.13.7
Installing ri documentation for god-0.13.7
Done installing documentation for god after 1 seconds
1 gem installed
Comment 1 Alexander Makeenkov 2023-10-30 11:41:05 MSK
Воспроизводится в сизифе:
libruby-devel-3.1.2-alt2.1.x86_64
gem-3.3.7-alt2.1.noarch

# gem install --bindir /usr/bin god
Fetching god-0.13.7.gem
Building native extensions. This could take a while...
ERROR:  While executing gem ... (Errno::ENOENT)
    No such file or directory @ rb_sysopen - libexec/god
Comment 2 Alexander Makeenkov 2023-11-03 12:40:56 MSK
Ещё один пример:

# apt-get install gem

# gem install webpacker
ERROR:  While executing gem ... (Errno::ENOENT)
    No such file or directory @ rb_sysopen - libexec/thor

# apt-get install gem-thor

# gem install webpacker
thor's executable "thor" conflicts with /usr/bin/thor
Overwrite the executable? [yN]  y
ERROR:  While executing gem ... (Errno::ENOENT)
    No such file or directory @ rb_sysopen - libexec/thor

# gem install webpacker
thor's executable "thor" conflicts with /usr/bin/thor
Overwrite the executable? [yN]  n
ERROR:  Error installing webpacker:
        "thor" from thor conflicts with /usr/bin/thor
Comment 3 Alexander Makeenkov 2023-11-03 13:12:49 MSK
(Ответ для Alexander Makeenkov на комментарий #2)
> # gem install webpacker

Из-за данной проблемы так же не удаётся создать новый rails проект, поскольку для него требуется webpacker, которого нет в репозозитории, а установка через gem не работает:

$ rails new testproject
.....
Unfortunately, an unexpected error occurred, and Bundler cannot continue.

First, try this link to see if there are any existing issue reports for this error:
https://github.com/rubygems/rubygems/search?q=No+such+file+or+directory+%40+rb_sysopen+-+libexec%2Frake&type=Issues

If there aren't any reports for this error yet, please create copy and paste the report template above into a new issue. Don't forget to anonymize any private data! The new issue form is located at:
https://github.com/rubygems/rubygems/issues/new?labels=Bundler&template=bundler-related-issue.md
         run  bundle binstubs bundler
Calling `DidYouMean::SPELL_CHECKERS.merge!(error_name => spell_checker)' has been deprecated. Please call `DidYouMean.correct_error(error_name, spell_checker)' instead.
Could not find gem 'webpacker (~> 5.0)' in rubygems repository https://rubygems.org/ or installed locally.
The source does not contain any versions of 'webpacker'
       rails  webpacker:install
Could not find gem 'webpacker (~> 5.0)' in locally installed gems.
Run `bundle install` to install missing gems.
Comment 4 legioner9@inbox.ru 2023-11-26 19:40:21 MSK
rubymine при попытке дебага пытается установить соответствующие gem:

Failed to Install Gems. Following gems were not installed: /home/st/RubyMine-2023.2.4/plugins/ruby/rb/gems/debase-3.0.0.beta.7.gem: Error installing debase-3.0.0.beta.7.gem: ERROR: Failed to build gem native extension. current directory: /usr/lib/ruby/gemie/gems/debase-3.0.0.beta.7/exto /usr/bin/ruby -I /usr/lib/ruby -r ./siteconf20231126-60170-9gttjv.rb extconf.rb checking for vm_core.h... no checking for vm_core.h... no ************************************************************************** No source for ruby-3.1.2-p20 (revision a21a3b7d23704a01d34bd79d09dc37897e00922a) provided with debase-ruby_core_source gem. Falling back to ruby-3.1.0-p0. ************************************************************************** checking for vm_core.h... yes checking for iseq.h... yes checking for method.h... yes checking for version.h... yes creating Makefile /usr/lib/ruby/gemie/gems/debase-3.0.0.beta.7/exto/extconf_common.rb:75:in ``': No such file or directory - x86_64-alt-linux-g++ (Errno::ENOENT) from /usr/lib/ruby/gemie/gems/debase-3.0.0.beta.7/exto/extconf_common.rb:75:in `build_makefile' from extconf.rb:2:in ` ' To see why this extension failed to compile, please check the mkmf.log which can be found here: /usr/lib64/ruby/gemie/extensions/debase-3.0.0.beta.7/mkmf.log extconf failed, exit code 1 Gem files will remain installed in /usr/lib/ruby/gemie/gems/debase-3.0.0.beta.7 for inspection. Results logged to /usr/lib64/ruby/gemie/extensions/debase-3.0.0.beta.7/gem_make.out /home/st/RubyMine-2023.2.4/plugins/ruby/rb/gems/ruby-debug-ide-3.0.0.beta.12.1.gem: Error installing ruby-debug-ide-3.0.0.beta.12.1.gem: ERROR: Failed to build gem native extension. current directory: /usr/lib/ruby/gemie/gems/debase-3.0.0.beta.7/exto /usr/bin/ruby -I /usr/lib/ruby -r ./siteconf20231126-60214-ks18kp.rb extconf.rb checking for vm_core.h... no checking for vm_core.h... no ************************************************************************** No source for ruby-3.1.2-p20 (revision a21a3b7d23704a01d34bd79d09dc37897e00922a) provided with debase-ruby_core_source gem. Falling back to ruby-3.1.0-p0. ************************************************************************** checking for vm_core.h... yes checking for iseq.h... yes checking for method.h... yes checking for version.h... yes creating Makefile /usr/lib/ruby/gemie/gems/debase-3.0.0.beta.7/exto/extconf_common.rb:75:in ``': No such file or directory - x86_64-alt-linux-g++ (Errno::ENOENT) from /usr/lib/ruby/gemie/gems/debase-3.0.0.beta.7/exto/extconf_common.rb:75:in `build_makefile' from extconf.rb:2:in ` ' To see why this extension failed to compile, please check the mkmf.log which can be found here: /usr/lib64/ruby/gemie/extensions/debase-3.0.0.beta.7/mkmf.log extconf failed, exit code 1 Gem files will remain installed in /usr/lib/ruby/gemie/gems/debase-3.0.0.beta.7 for inspection. Results logged to /usr/lib64/ruby/gemie/extensions/debase-3.0.0.beta.7/gem_make.out
Comment 5 pav@altlinux.org 2023-12-12 16:52:24 MSK
Чтобы от пользователя установить gems, необходимо установить пакет gcc
# apt-get install gcc -y

Пользователь должен состоять в группе rvm
# usermod [USER] -aG rvm
Comment 6 Alexander Makeenkov 2023-12-12 17:08:20 MSK
(Ответ для pav@altlinux.org на комментарий #5)
> Чтобы от пользователя установить gems, необходимо установить пакет gcc
> # apt-get install gcc -y
> 
> Пользователь должен состоять в группе rvm
> # usermod [USER] -aG rvm

# apt-get install gem libruby-devel gcc

# usermod test -aG rvm
usermod: группа «rvm» не существует

https://beta.packages.altlinux.org/ru/search/?branch=sisyphus&q=rvm

# apt-get install gem-rvm

# usermod test -aG rvm
usermod: группа «rvm» не существует

# gem install webpacker
Fetching rack-3.0.8.gem
Fetching webrick-1.8.1.gem
Fetching semantic_range-3.0.0.gem
Fetching zeitwerk-2.6.12.gem
Fetching thor-1.3.0.gem
Fetching rackup-2.1.0.gem
Fetching concurrent-ruby-1.2.2.gem
Fetching tzinfo-2.0.6.gem
Fetching minitest-5.20.0.gem
Fetching i18n-1.14.1.gem
Fetching connection_pool-2.4.1.gem
Fetching activesupport-7.1.2.gem
Fetching racc-1.7.3.gem
Fetching nokogiri-1.15.5-x86_64-linux.gem
Fetching crass-1.0.6.gem
Fetching loofah-2.22.0.gem
Fetching rails-html-sanitizer-1.6.0.gem
Fetching rails-dom-testing-2.2.0.gem
Fetching rack-test-2.1.0.gem
Fetching rack-session-2.0.0.gem
Fetching erubi-1.12.0.gem
Fetching builder-3.2.4.gem
Fetching actionview-7.1.2.gem
Fetching actionpack-7.1.2.gem
Fetching webpacker-5.4.4.gem
Fetching railties-7.1.2.gem
Fetching rack-proxy-0.7.7.gem
Successfully installed semantic_range-3.0.0
Successfully installed zeitwerk-2.6.12
ERROR:  While executing gem ... (Errno::ENOENT)
    No such file or directory @ rb_sysopen - libexec/thor
    
    
$ gem install webpacker
Fetching rack-3.0.8.gem
Fetching thor-1.3.0.gem
Fetching webrick-1.8.1.gem
Fetching i18n-1.14.1.gem
Fetching rackup-2.1.0.gem
Fetching concurrent-ruby-1.2.2.gem
Fetching tzinfo-2.0.6.gem
Fetching minitest-5.20.0.gem
Fetching connection_pool-2.4.1.gem
Fetching activesupport-7.1.2.gem
Fetching racc-1.7.3.gem
Fetching nokogiri-1.15.5-x86_64-linux.gem
Fetching crass-1.0.6.gem
Fetching loofah-2.22.0.gem
Fetching rails-html-sanitizer-1.6.0.gem
Fetching rails-dom-testing-2.2.0.gem
Fetching rack-test-2.1.0.gem
Fetching rack-session-2.0.0.gem
Fetching erubi-1.12.0.gem
Fetching builder-3.2.4.gem
Fetching actionview-7.1.2.gem
Fetching actionpack-7.1.2.gem
Fetching railties-7.1.2.gem
Fetching rack-proxy-0.7.7.gem
Fetching webpacker-5.4.4.gem
ERROR:  While executing gem ... (Gem::FilePermissionError)
    You don't have write permissions for the /usr/lib/ruby/gemie directory.
Comment 7 Repository Robot 2023-12-14 01:51:14 MSK
ruby-3.1.4-alt1 -> sisyphus:

 Mon Nov 13 2023 Pavel Skrylev <majioa@altlinux> 3.1.4-alt1
 - ^ 3.1.2 -> 3.1.4 (closes #47868)
 - * moved build to rvm
 - * BREAK: changed some things to rpm-build-macros
 - ! fixed:
  + CVE-2022-39253 for bundler
  + enabled permissions to /var/lib/ruby/gemie/ (closes #45251)
  + enable running gemserver (closes #48325)
  + custom gem installation (closes #47660)
  + loading ruby's so libraries (closes #48249)
  + drop explicit dependencies to libs including ssl1.1 (closes #48713)
Comment 8 Alexander Makeenkov 2023-12-19 16:32:36 MSK
*** Bug 48859 has been marked as a duplicate of this bug. ***
Comment 9 Alexander Makeenkov 2023-12-19 16:33:24 MSK
В p10 не исправлено.
Comment 10 Leonid Krivoshein 2024-01-16 15:52:20 MSK
Баг поломал совместимость многим. И вроде собирались быстро исправить. Когда ждать исправления?
Comment 11 Repository Robot 2024-03-29 19:41:45 MSK
ruby-3.1.4-alt2.p10.1 -> p10:

 Wed Feb 07 2024 Pavel Skrylev <majioa@altlinux> 3.1.4-alt2.p10.1
 - + allow access to gem cache for ruby group instead of rvm (closes #48325)
 - + added %ruby_gemsplugindir and %ruby_gemplugin macros
 - * rearranged load path (closes #48249)
 - * changed names for doc packages: ri is doc, html is doc-html (closes #36294)
 Sat Feb 03 2024 Pavel Skrylev <majioa@altlinux> 3.1.4-alt2.1
 - - removed ri from %_bindir leaving it in %ruby_bindir
 Fri Dec 22 2023 Pavel Skrylev <majioa@altlinux> 3.1.4-alt2
 - + dependency to autoconf >= 2.71
 - + ruby-devel package including rvm-devel and libruby-devel
 - ! fixed dep to pkgconfig ruby
 Mon Dec 18 2023 Pavel Skrylev <majioa@altlinux> 3.1.4-alt1.1
 - ! fixed %vendordir folder set
 - - removed rvm-devel dep from ruby (closes #48812)
 Mon Nov 13 2023 Pavel Skrylev <majioa@altlinux> 3.1.4-alt1
 - ^ 3.1.2 -> 3.1.4 (closes #47868)
 - * moved build to rvm
 - * BREAK: changed some things to rpm-build-macros
 - ! fixed:
  + CVE-2022-39253 for bundler
  + enabled permissions to /var/lib/ruby/gemie/ (closes #45251)
  + enable running gemserver (closes #48325)
  + custom gem installation (closes #47660)
  + loading ruby's so libraries (closes #48249)
  + drop explicit dependencies to libs including ssl1.1 (closes #48713)
 Mon Jun 19 2023 Pavel Skrylev <majioa@altlinux> 3.1.2-alt2.1
 - - removed rpm-build-ruby build dependency (closes #46576)
 Fri Jan 20 2023 Pavel Skrylev <majioa@altlinux> 3.1.2-alt2
 - ! removed unnecessary alias from macros
 Sun Oct 30 2022 Pavel Skrylev <majioa@altlinux> 3.1.2-alt1.1
 - ! fix arch for rpm-macros-ruby (thanx to vt@, closes #44173)