首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >ruby-perf不是通过bundler安装的,但可以使用命令行安装

ruby-perf不是通过bundler安装的,但可以使用命令行安装
EN

Stack Overflow用户
提问于 2013-07-03 15:25:51
回答 1查看 367关注 0票数 2

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

代码语言:javascript
复制
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时,它仍然显示错误。

代码语言:javascript
复制
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是否已安装。

代码语言:javascript
复制
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)
EN

回答 1

Stack Overflow用户

发布于 2013-12-07 05:11:09

使用sudo运行第一个命令,不使用sudo运行第二个命令。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/17442055

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档