質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.50%
Ruby

Rubyはプログラミング言語のひとつで、オープンソース、オブジェクト指向のプログラミング開発に対応しています。

Q&A

1回答

805閲覧

rbenv install 2.5.3をした時にエラーが出てインストール出来ない

jotaku

総合スコア40

Ruby

Rubyはプログラミング言語のひとつで、オープンソース、オブジェクト指向のプログラミング開発に対応しています。

0グッド

0クリップ

投稿2019/07/28 11:49

編集2022/01/12 10:55

#エラー文
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
compiling ./main.c
compiling dmydln.c
compiling miniinit.c
compiling dmyext.c
In file included from dmydln.c:1:
In file included from ./include/ruby/ruby.h:24:
.ext/include/x86_64-darwin18/ruby/config.h:335:10: error: macro name must be an identifier
#define 1
^
In file included from ./main.c:13:
In file included from ./include/ruby.h:33:
In file included from ./include/ruby/ruby.h:24:
.ext/include/x86_64-darwin18/ruby/config.h:335:10: error: macro name must be an identifier
#define 1
^
In file included from miniinit.c:12:
In file included from ./include/ruby/ruby.h:24:
.ext/include/x86_64-darwin18/ruby/config.h:335:10: error: macro name must be an identifier
#define 1
^
compiling miniprelude.c
1 error generated.
make: *** [dmydln.o] Error 1
make: *** Waiting for unfinished jobs....
1 error generated.
1 error generated.
make: *** [main.o] Error 1
make: *** [miniinit.o] Error 1

BUILD FAILED (OS X 10.14.5 using ruby-build 20190615-7-g0e9094b)

Inspect or clean up the working tree at /var/folders/b5/0jpmsmg91x724hd4ysr87hpc0000gn/T/ruby-build.20190724224859.27707
Results logged to /var/folders/b5/0jpmsmg91x724hd4ysr87hpc0000gn/T/ruby-build.20190724224859.27707.log

Last 10 log lines:
#define 1
^
compiling miniprelude.c
1 error generated.
make: *** [dmydln.o] Error 1
make: *** Waiting for unfinished jobs....
1 error generated.
1 error generated.
make: *** [main.o] Error 1
#行ったこと

echo 'export PATH="~/.rbenv/shims:/usr/local/bin:$PATH"' >> ~/.bash_profile echo 'eval "$(rbenv init -)"' >> ~/.bash_profile which ruby /Users/myname/.rbenv/shims/ruby rbenv install 2.5.3

#気になっているエラー

source ~/.bash_profile -bash: ‘export: command not found

パスを通す最後にこのエラーが出てしまうがwhich ruby で正常になっているので関係はないかもしれません
#エラー文を追加

Last 10 log lines: checking whether struct tm is in sys/time.h or time.h... time.h checking for struct tm.tm_zone... yes checking for struct tm.tm_gmtoff... yes checking for external int daylight... yes checking for negative time_t for gmtime(3)... yes checking for localtime(3) overflow correctly... yes checking for sig_t... yes checking whether right shift preserve sign bit... yes configure: error: gettimeofday() must exist make: *** No targets specified and no makefile found. Stop.

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

guest

回答1

0

とりあえず、原因だけわかっているエラーを潰すと

-bash: ‘export: command not found

~/.bash_profile内に‘exportと記述されている部分があるはずなので

export PATH="~/.rbenv/shims:/usr/local/bin:$PATH" eval "$(rbenv init -)"

に書き換えるとよいでしょう。

投稿2019/07/29 00:02

asm

総合スコア15147

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

jotaku

2019/07/29 11:58

ありがとうございます。変更したのですがインストールまでには至りませんでした。
guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

まだベストアンサーが選ばれていません

会員登録して回答してみよう

アカウントをお持ちの方は

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.50%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問