尝试安装ruby for rail时出错

时间:2013-02-12 12:36:27

标签: ruby-on-rails ruby ubuntu

我正在尝试使用https://www.digitalocean.com/community/articles/how-to-install-ruby-on-rails-on-ubuntu-12-04-lts-precise-pangolin-with-rvm教程安装Ruby on Rails,但是当我到达需要安装Ruby 1.9.3的部分时,它总是显示此错误消息。

Searching for binary rubies, this might take some time.
No binary rubies available for: ubuntu/12.04/i386/ruby-1.9.3-p385.
Continuing with compilation. Please read 'rvm mount' to get more information on binary     rubies.
Installing Ruby from source to: /home/eldin/.rvm/rubies/ruby-1.9.3-p385, this may take a   while depending on your cpu(s)...
ruby-1.9.3-p385 - #downloading ruby-1.9.3-p385, this may take a while depending on your     connection...
ruby-1.9.3-p385 - #extracted to /home/eldin/.rvm/src/ruby-1.9.3-p385 (already extracted)
ruby-1.9.3-p385 - #configuring
ruby-1.9.3-p385 - #compiling
Error running 'make', please read /home/eldin/.rvm/log/ruby-1.9.3-p385/make.log
There has been an error while running make. Halting the installation.

我不能使用Ruby解释器,所以没有安装Ruby。

我正在使用Ubuntu OS。

编辑:

/home/eldin/.rvm/log/ruby-1.9.3-p385/make.log

make.log的内容

CC = gcc
LD = ld
LDSHARED = gcc -shared
CFLAGS = -O3 -ggdb -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Werror=pointer-arith -Werror=write-strings -Werror=declaration-after-statement -Werror=implicit-function-declaration  -fPIC 
XCFLAGS = -include ruby/config.h -include ruby/missing.h -fvisibility=hidden -DRUBY_EXPORT
CPPFLAGS =   -I/home/eldin/.rvm/usr/include -I. -I.ext/include/i686-linux -I./include -I.
DLDFLAGS = -Wl,-soname,libruby.so.1.9  
SOLIBS = -lpthread -lrt -ldl -lcrypt -lm  
linking miniruby
vm.o: file not recognized: File truncated
collect2: ld returned 1 exit status
make: *** [miniruby] Error 1

2 个答案:

答案 0 :(得分:1)

我已关注:http://ryanbigg.com/2010/12/ubuntu-ruby-rvm-rails-and-you/

它本身就像一个魅力。请尝试按照此博客中提到的步骤操作。

答案 1 :(得分:0)

我使用rvm重新安装1.9.3安装了ruby 1.9.3,现在它没有问题。