前提・実現したいこと
OS: Ubuntu
OSバージョン: 18.04.2
rbenvバージョン: rbenv 1.1.2-2-g4e92322
rbenvでrubyをインストールしようとしたのですが,エラーが発生しています.どうすればインストールできますか?
発生している問題・エラーメッセージ
$ rbenv install 2.5.1 Mon Jun 3 22:57:43 2019 Downloading ruby-2.5.1.tar.bz2... -> https://cache.ruby-lang.org/pub/ruby/2.5/ruby-2.5.1.tar.bz2 Installing ruby-2.5.1... BUILD FAILED (Ubuntu 18.04 using ruby-build 20190423-4-gac92ec0) Inspect or clean up the working tree at /tmp/ruby-build.20190603225743.27780 Results logged to /tmp/ruby-build.20190603225743.27780.log Last 10 log lines: compiling numeric.c compiling object.c compiling pack.c compiling parse.c gcc: internal compiler error: Killed (program cc1) Please submit a full bug report, with preprocessed source if appropriate. See <file:///usr/share/doc/gcc-7/README.Bugs> for instructions. Makefile:375: recipe for target 'parse.o' failed make: *** [parse.o] Error 4
/tmp/ruby-build.20190603225743.27780.logは以下のようになっていました.(文字数の関係で前略が入っています)
$ cat /tmp/ruby-build.20190603225743.27780.log ... (前略) ... config.status: creating Makefile config.status: creating ruby-2.5.pc --- Configuration summary for ruby version 2.5.1 * Installation prefix: /home/ubuntu/.rbenv/versions/2.5.1 * exec prefix: ${prefix} * arch: x86_64-linux * site arch: ${arch} * RUBY_BASE_NAME: ruby * ruby lib prefix: ${libdir}/${RUBY_BASE_NAME} * site libraries path: ${rubylibprefix}/${sitearch} * vendor path: ${rubylibprefix}/vendor_ruby * target OS: linux * compiler: gcc * with pthread: yes * enable shared libs: no * dynamic library ext: so * CFLAGS: ${optflags} ${debugflags} ${warnflags} * LDFLAGS: -L. -L/home/ubuntu/.rbenv/versions/2.5.1/lib \ -fstack-protector -rdynamic -Wl,-export-dynamic * optflags: -O3 * debugflags: -ggdb3 * warnflags: -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 * strip command: strip -S -x * install doc: yes * man page type: doc --- 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 XCFLAGS = -D_FORTIFY_SOURCE=2 -fstack-protector -fno-strict-overflow -fvisibility=hidden -fexcess-precision=standard -DRUBY_EXPORT -fPIE CPPFLAGS = -I/home/ubuntu/.rbenv/versions/2.5.1/include -I. -I.ext/include/x86_64-linux -I./include -I. -I./enc/unicode/10.0.0 DLDFLAGS = -L/home/ubuntu/.rbenv/versions/2.5.1/lib -Wl,--compress-debug-sections=zlib -fstack-protector -pie SOLIBS = LANG = C.UTF-8 LC_ALL = LC_CTYPE = gcc (Ubuntu 7.4.0-1ubuntu1~18.04) 7.4.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 compiling miniprelude.c making dummy probes.h compiling array.c compiling bignum.c compiling class.c compiling compar.c compiling compile.c compiling complex.c compiling cont.c compiling debug.c compiling debug_counter.c compiling dir.c compiling dln_find.c compiling encoding.c compiling enum.c compiling enumerator.c compiling error.c compiling eval.c compiling file.c compiling gc.c compiling hash.c compiling inits.c compiling io.c compiling iseq.c compiling load.c compiling marshal.c compiling math.c compiling node.c compiling numeric.c compiling object.c compiling pack.c compiling parse.c gcc: internal compiler error: Killed (program cc1) Please submit a full bug report, with preprocessed source if appropriate. See <file:///usr/share/doc/gcc-7/README.Bugs> for instructions. Makefile:375: recipe for target 'parse.o' failed make: *** [parse.o] Error 4
試したこと
https://www.digitalocean.com/community/tutorials/how-to-install-ruby-on-rails-with-rbenv-on-ubuntu-18-04
ここにある手順で行い,再度rm -rf .rbenv/
で最初からやり直しても同じ結果になりました.
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
退会済みユーザー
2019/06/04 01:08 編集