gpt4 book ai didi

ruby-perf 无法通过 bundler 安装,但可以通过命令行安装

转载 作者:太空宇宙 更新时间:2023-11-03 16:52:41 28 4
gpt4 key购买 nike

我正在尝试安装 ruby​​-perf。我遇到了问题,但在安装 ruby​​-dev 之后,它通过控制台运行良好。

ubuntu@ubuntu-VirtualBox:~/web$ sudo gem install ruby-prof -v '0.13.0'
Fetching: ruby-prof-0.13.0.gem (100%)
Building native extensions. This could take a while...
Successfully installed ruby-prof-0.13.0
1 gem installed

但是当我运行 bundler 时,它仍然显示错误。

ubuntu@ubuntu-VirtualBox:~/web$  bundle install
. . .
Installing ruby-prof (0.13.0)
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.

/home/ubuntu/jruby-1.7.3/bin/jruby extconf.rb
/home/ubuntu/jruby-1.7.3/lib/ruby/shared/mkmf.rb:14: Use RbConfig instead of obsolete and deprecated Config.
checking for sys/times.h... yes
checking for rb_os_allocated_objects()... no
checking for rb_gc_allocated_size()... no
checking for rb_gc_collections()... no
checking for rb_gc_time()... no
checking for rb_class_superclass()... checking for rb_heap_total_mem()... no
checking for rb_gc_heap_info()... no
checking for rb_fiber_current()... no
extconf.rb:54 warning: tracing (e.g. set_trace_func) will not capture all events without --debug flag
creating Makefile

make
cc -I. -I. -I/home/ubuntu/jruby-1.7.3/lib/native/include/ruby -I. -DHAVE_SYS_TIMES_H -DHAVE_RB_CLASS_SUPERCLASS -DRUBY_VERSION=193 -DTHREADS_INHERIT_EVENT_FLAGS=0 -fPIC -fno-omit-frame-pointer -fno-strict-aliasing -fexceptions -m32 -c rp_measure_gc_time.c
In file included from rp_measure_gc_time.c:6:0:
ruby_prof.h:23:18: fatal error: node.h: No such file or directory
compilation terminated.
make: *** [rp_measure_gc_time.o] Error 1


Gem files will remain installed in /home/ubuntu/jruby-1.7.3/lib/ruby/gems/shared/gems/ruby-prof-0.13.0 for inspection.
Results logged to /home/ubuntu/jruby-1.7.3/lib/ruby/gems/shared/gems/ruby-prof-0.13.0/ext/ruby_prof/gem_make.out

An error occurred while installing ruby-prof (0.13.0), and Bundler cannot
continue.
Make sure that `gem install ruby-prof -v '0.13.0'` succeeds before bundling.

我验证了 gem 也已安装。

ubuntu@ubuntu-VirtualBox:~/web$ sudo gem list

*** LOCAL GEMS ***

json (1.8.0, 1.7.7)
minitest (5.0.6)
rake (10.1.0)
rake-compiler (0.8.3)
ruby-prof (0.13.0)

最佳答案

您正在运行带有 sudo 的第一个命令和不带 sudo 的第二个命令。

关于ruby-perf 无法通过 bundler 安装,但可以通过命令行安装,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17442055/

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