新手问题 ubuntu_14_0405_64_20G_alibase 安装 ruby 2.5.0 报错

lijianweicode · 2018年08月02日 · 最后由 lijianweicode 回复于 2018年08月14日 · 2253 次阅读
rvm install 2.5.0 --disable-binary
Checking requirements for ubuntu.
Installing requirements for ubuntu.
Updating systemdeploy password required for 'apt-get --quiet --yes update': 
......
Installing required packages: gawk, autoconf, automake, bison, libffi-dev, libgdbm-dev, libncurses5-dev, libsqlite3-dev, libtool, libyaml-dev, pkg-config, sqlite3, zlib1g-dev, libgmp-dev, libreadline6-dev, libssl-dev...................
Requirements installation successful.
Installing Ruby from source to: /home/deploy/.rvm/rubies/ruby-2.5.0, this may take a while depending on your cpu(s)...
ruby-2.5.0 - #downloading ruby-2.5.0, this may take a while depending on your connection...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 13.3M  100 13.3M    0     0  35.0M      0 --:--:-- --:--:-- --:--:-- 35.0M
ruby-2.5.0 - #extracting ruby-2.5.0 to /home/deploy/.rvm/src/ruby-2.5.0.....
ruby-2.5.0 - #applying patch /home/deploy/.rvm/patches/ruby/2.5.0/prelude_gcc_diagnostic.patch.
ruby-2.5.0 - #configuring......................................................|
ruby-2.5.0 - #post-configuration..
ruby-2.5.0 - #compiling...



Error running '__rvm_make -j1',
please read /home/deploy/.rvm/log/1533204985_ruby-2.5.0/make.log
There has been an error while running make. Halting the installation.

make.log 如下

[2018-08-02 18:21:15] __rvm_make
__rvm_make ()
{
    \make "$@" || return $?
}
current path: /home/deploy/.rvm/src/ruby-2.5.0
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/home/deploy/.rvm/bin:/home/deploy/.rvm/bin:/home/deploy/.rvm/bin
command(2): __rvm_make -j1
++ make -j1
        CC = gcc
        LD = ld
        LDSHARED = gcc -shared
        CFLAGS = -O3 -ggdb3 -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wno-tautological-compare -Wno-parentheses-equality -Wno-constant-logical-operand -Wno-self-assign -Wunused-variable -Wimplicit-int -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wimplicit-function-declaration -Wdeprecated-declarations -Wno-packed-bitfield-compat -Wsuggest-attribute=noreturn -Wsuggest-attribute=format -std=gnu99  -fPIC
        XCFLAGS = -D_FORTIFY_SOURCE=2 -fstack-protector -fno-strict-overflow -fvisibility=hidden -fexcess-precision=standard -DRUBY_EXPORT
        CPPFLAGS =   -I. -I.ext/include/x86_64-linux -I./include -I. -I./enc/unicode/10.0.0
        DLDFLAGS = -Wl,-soname,libruby.so.2.5  -fstack-protector
        SOLIBS = -lpthread -lgmp -ldl -lcrypt -lm
 LANG = en_US.UTF-8
        LC_ALL =
        LC_CTYPE =
gcc (Ubuntu 4.8.4-2ubuntu1~14.04.3) 4.8.4
Copyright (C) 2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

compiling ./main.c
compiling dmydln.c
compiling miniinit.c
compiling dmyext.c
generating miniprelude.c
executable host ruby is required. use --with-baseruby option.
make: *** [miniprelude.c] Error 1
++ return 2
~                                                                                                     
~                                                                                                     


请问这是怎么回事呀?

executable host ruby is required. use --with-baseruby option.

搜下这个

lithium4010 回复

感谢!用 rbenv 安装就没问题了。rvm 还是出现问题在阿里云上。

lijianweicode 关闭了讨论。 08月14日 19:35
lijianweicode 重新开启了讨论。 08月14日 19:35
需要 登录 后方可回复, 如果你还没有账号请 注册新账号