gpt4 book ai didi

ruby - "bundle install"错误

转载 作者:太空宇宙 更新时间:2023-11-03 18:26:32 24 4
gpt4 key购买 nike

当我运行“bundle install”时出现这个错误

Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.

/var/lib/jenkins/.rvm/rubies/ruby-1.9.2-p318/bin/ruby extconf.rb
checking for vm_core.h... no

checking for vm_core.h... no

*** 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=/var/lib/jenkins/.rvm/rubies/ruby-1.9.2-p318/bin/ruby
--with-ruby-dir
--without-ruby-dir
--with-ruby-include
--without-ruby-include=${ruby-dir}/include
--with-ruby-lib
--without-ruby-lib=${ruby-dir}/lib
/var/lib/jenkins/.rvm/rubies/ruby-1.9.2-p318/lib/ruby/1.9.1/fileutils.rb:243:in `mkdir': Permission denied - /var/lib/jenkins/.rvm/rubies/ruby-1.9.2-p318/include/ruby-1.9.1/ruby-1.9.2-p318 (Errno::EACCES)
from /var/lib/jenkins/.rvm/rubies/ruby-1.9.2-p318/lib/ruby/1.9.1/fileutils.rb:243:in `fu_mkdir'
from /var/lib/jenkins/.rvm/rubies/ruby-1.9.2-p318/lib/ruby/1.9.1/fileutils.rb:217:in `block (2 levels) in mkdir_p'
from /var/lib/jenkins/.rvm/rubies/ruby-1.9.2-p318/lib/ruby/1.9.1/fileutils.rb:215:in `reverse_each'
from /var/lib/jenkins/.rvm/rubies/ruby-1.9.2-p318/lib/ruby/1.9.1/fileutils.rb:215:in `block in mkdir_p'
from /var/lib/jenkins/.rvm/rubies/ruby-1.9.2-p318/lib/ruby/1.9.1/fileutils.rb:201:in `each'
from /var/lib/jenkins/.rvm/rubies/ruby-1.9.2-p318/lib/ruby/1.9.1/fileutils.rb:201:in `mkdir_p'
from /var/lib/jenkins/.rvm/gems/ruby-1.9.2-p318/gems/ruby_core_source-0.1.5/lib/ruby_core_source.rb:59:in `block in create_makefile_with_core'
from /var/lib/jenkins/.rvm/rubies/ruby-1.9.2-p318/lib/ruby/1.9.1/tempfile.rb:320:in `open'
from /var/lib/jenkins/.rvm/gems/ruby-1.9.2-p318/gems/ruby_core_source-0.1.5/lib/ruby_core_source.rb:51:in `create_makefile_with_core'
from extconf.rb:19:in `<main>'
Requesting http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.2-p318.tar.gz
Downloading http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.2-p318.tar.gz


Gem files will remain installed in /var/lib/jenkins/.bundler/tmp/19915/gems/linecache19-0.5.12 for inspection.
Results logged to /var/lib/jenkins/.bundler/tmp/19915/gems/linecache19-0.5.12/ext/trace_nums/gem_make.out
An error occured while installing linecache19 (0.5.12), and Bundler cannot continue.
Make sure that `gem install linecache19 -v '0.5.12'` succeeds before bundling.

我在运行 gem install linecache19 -v '0.5.12' 后遇到同样的错误!

我搜索错误,但没有一个解决方案有效!

当我运行“chown -R jenkins/var/lib/jenkins/.rvm”时出现此错误:

chown:更改“/var/lib/jenkins/.rvm/src/rubygems-1.8.21/lib/rubygems/ext”的所有权:不允许操作

chown:更改“/var/lib/jenkins/.rvm/src/rubygems-1.8.21/lib/rubygems/test_case.rb”的所有权:不允许操作

chown:更改“/var/lib/jenkins/.rvm/src/rubygems-1.8.21/lib/rubygems/deprecate.rb”的所有权:不允许操作

chown:更改“/var/lib/jenkins/.rvm/src/rubygems-1.8.21/lib/rubygems/commands/update_command.rb”的所有权:不允许操作

chown:更改“/var/lib/jenkins/.rvm/src/rubygems-1.8.21/lib/rubygems/commands/outdated_command.rb”的所有权:不允许操作

chown:更改“/var/lib/jenkins/.rvm/src/rubygems-1.8.21/lib/rubygems/commands/uninstall_command.rb”的所有权:不允许操作

chown:更改“/var/lib/jenkins/.rvm/src/rubygems-1.8.21/lib/rubygems/commands/fetch_command.rb”的所有权:不允许操作
.....

当我用 sudo 运行命令时没有任何反应!

最佳答案

这是缺少头文件的情况。

您需要找到或下载适用于您的 ruby​​ 版本的 ruby​​ 源副本,然后

gem install ruby-debug19 -- --with-ruby-include=path/to/ruby/source/

重新运行bundle install

关于ruby - "bundle install"错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10114416/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com