新手问题 gem install linecache19 -v '0.5.11' 编译错误

zhkzyth · 2012年08月05日 · 最后由 xds2000 回复于 2012年08月06日 · 3686 次阅读

我在 ubuntu12.04 下面安装的 rvm,用的是 ruby1.9.3 的版本,但在装 linecache19 -v '0.5.11'的时候,老是卡住,最后出错信息截取如下:

*** 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.

然后我查看了下 mkmf.log 的信息,好像是缺少了 vm_core.h 这个文件,有人知道这个是神马么=.=

"gcc -E -I/home/zhkzyth/.rvm/rubies/ruby-1.9.3-p194/include/ruby-1.9.1/i686- linux -I/home/zhkzyth/.rvm/rubies/ruby-1.9.3-p194/include/ruby-1.9.1/ruby/ backward -I/home/zhkzyth/.rvm/rubies/ruby-1.9.3-p194/include/ruby-1.9.1 -I. -I/ home/zhkzyth/.rvm/usr/include -D_FILE_OFFSET_BITS=64 -O3 -ggdb -Wextra -Wno- unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field- initializers -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement - Wimplicit-function-declaration -fPIC conftest.c -o conftest.i" conftest.c:3:21: 致命错误:vm_core.h:没有那个文件或目录 编译中断。 checked program was: /* begin / 1: #include "ruby.h" 2: 3: #include / end */


gem_make.out 的文件内容如下:

/home/zhkzyth/.rvm/rubies/ruby-1.9.3-p194/bin/ruby extconf.rb checking for vm_core.h... no /home/zhkzyth/.rvm/gems/ruby-1.9.3-p194/gems/ruby_core_source-0.1.4/lib/ ruby_core_source.rb:39: Use RbConfig instead of obsolete and deprecated Config. checking for vm_core.h... yes checking for version.h... yes checking for RUBY_VERSION_MAJOR in version.h... no Requesting http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p194.tar.gz Downloading http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p194.tar.gz checking for vm_core.h... yes checking for version.h... yes checking for RUBY_VERSION_MAJOR in version.h... no Makefile creation failed


NOTE: For Ruby 1.9 installation instructions, please see:

http://wiki.github.com/mark-moseley/ruby-debug


*** 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.

http://isitruby19.com/linecache19 貌似这里有解决方案,还没细看,先放在这里。

还是没找到合理的解决办法,最后用 rvm 1.9.2 切换成其他版本进行了尝试,终于可以了.....

我还以为 ubuntu 对 Ruby 有多好呢。还是远离它吧。Fedaro 兼容性好点吧。

需要 登录 后方可回复, 如果你还没有账号请 注册新账号