简体   繁体   中英

rvm compiling error to install ruby 2.5.0

I am trying to install ruby 2.5.0 with rvm but I am getting a error. I tried it in Ubuntu 18, 16 and now on Linux Mint Cinnamon.

Basically what I did before running the code to install the ruby was:

Get the GPG Keys on https://rvm.io/rvm/install

Then:

curl -L https://get.rvm.io | bash -s stable

source ~/.rvm/scripts/rvm

rvm requirements

git clone myRepo...

git submodule update --init --recursive (in the folder of the repo)

rvm install ruby-2.5.0

Then when it is compiling it gets this error:

Error running '__rvm_make -j8',

please read /home/rafael/.rvm/log/1552616898_ruby-2.5.0/make.log

There has been an error while running make. Halting the installation.

and finally inside the make.log we have:

[2019-03-14 23:28:45] __rvm_make
__rvm_make ()
{
    \make "$@" || return $?
}
current path: /home/rafael/.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/rafael/.rvm/bin:/home/rafael/.rvm/bin
command(2): __rvm_make -j8
++ make -j8
        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 -Wmisleading-indentation -Wno-packed-bitfield-compat -Wsuggest-attribute=noreturn -Wsuggest-attribute=format -Wimplicit-fallthrough=0 -Wduplicated-cond -Wrestrict -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,--compress-debug-sections=zlib -Wl,-soname,libruby.so.2.5  -fstack-protector
        SOLIBS = -lpthread -lgmp -ldl -lcrypt -lm
        LANG = pt_BR.UTF-8
        LC_ALL =
        LC_CTYPE =
gcc (Ubuntu 7.3.0-27ubuntu1~18.04) 7.3.0
Copyright (C) 2017 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.
making dummy probes.h
compiling bignum.c
uncommon.mk:960: recipe for target 'miniprelude.c' failed
make: *** [miniprelude.c] Error 1
make: ** Esperando que outros processos terminem.
++ return 2

Any way to help me with that?

Some notes: It is possible to install ruby 2.5.1, 2.5.2, 2.5.3, 2.5.4. But I want the 2.5.0. And now I am using the Linux Mint Cinnamon

Thanks in advance.

Pay attention to this:

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

You can't compile Ruby with RVM unless Ruby is already present on the system. Run this first:

sudo apt-get install ruby-full

Then re-run:

rvm install ruby-2.5.0

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM