Railsの環境構築
Progateのスライドに従って環境構築をしていたのですが、rubyのインストールに失敗してしまいます。
Homebrewをインストールし、rbenv(v1.1.2)をインストールしました。
rbenv install 2.6.7 ```を実行してRubyをインストールしようとするのですがうまくいきません。 ### 発生している問題・エラーメッセージ
Downloading openssl-1.1.1j.tar.gz...
-> https://dqw8nmjcqpjn7.cloudfront.net/aaf2fcb575cdf6491b98ab4829abf78a3dec8402b8b81efc8f23c00d443981bf
Installing openssl-1.1.1j...
Installed openssl-1.1.1j to /Users/userName/.rbenv/versions/2.6.7
Downloading ruby-2.6.7.tar.bz2...
-> https://cache.ruby-lang.org/pub/ruby/2.6/ruby-2.6.7.tar.bz2
Installing ruby-2.6.7...
ruby-build: using readline from homebrew
BUILD FAILED (macOS 11.2.3 using ruby-build 20210405)
Inspect or clean up the working tree at /tmp/ruby-build.20210421003601.9403.3NxXGR
Results logged to /tmp/ruby-build.20210421003601.9403.log
Last 10 log lines:
vm.c:2295:9: error: implicit declaration of function 'rb_native_mutex_destroy' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
rb_native_mutex_destroy(&vm->waitpid_lock);
^
vm.c:2489:34: warning: expression does not compute the number of elements in this array; element type is 'const int', not 'VALUE' (aka 'unsigned long') [-Wsizeof-array-div]
sizeof(ec->machine.regs) / sizeof(VALUE));
~~~~~~~~~~~~~~~~ ^
vm.c:2489:34: note: place parentheses around the 'sizeof(VALUE)' expression to silence this warning
1 warning and 1 error generated.
make: *** [vm.o] Error 1
make: *** Waiting for unfinished jobs....
### 試したこと opensslをインストールしてみました。 ```ここに言語を入力 xcode-select --install
や
sudo rm -rf /Library/Developer/CommandLineTools sudo xcode-select --install
を実行してみたり、インストールするRubyのバージョンを3系に変えてみたりしましたが、いずれもうまくいきません。
v3.0.1をインストールしようとしたときのエラーは以下です。
ruby-build: using readline from homebrew BUILD FAILED (macOS 11.2.3 using ruby-build 20210405) Inspect or clean up the working tree at /var/folders/gn/6tnmkjrx2nb4v0_nsmvr71b80000gp/T/ruby-build.20210422201325.29969.FlRVAW Results logged to /var/folders/gn/6tnmkjrx2nb4v0_nsmvr71b80000gp/T/ruby-build.20210422201325.29969.log Last 10 log lines: Could not be configured. It will not be installed. :43: Interrupted system call - Check ext/syslog/mkmf.log for more details. *** Fix the problems, then remove these directories and try again if you want. Generating RDoc documentation uh-oh! RDoc had a problem: cannot load such file -- io/console run with --debug for full backtrace make: *** [rdoc] Error 1
以下も実行してみましたが、エラーになりました。
CFLAGS="-Wno-error=implicit-function-declaration" rbenv install 2.6.7
ruby-build: using readline from homebrew BUILD FAILED (macOS 11.2.3 using ruby-build 20210405) Inspect or clean up the working tree at /var/folders/gn/6tnmkjrx2nb4v0_nsmvr71b80000gp/T/ruby-build.20210422132242.7039.gAJysa Results logged to /var/folders/gn/6tnmkjrx2nb4v0_nsmvr71b80000gp/T/ruby-build.20210422132242.7039.log Last 10 log lines: from /private/var/folders/gn/6tnmkjrx2nb4v0_nsmvr71b80000gp/T/ruby-build.20210422132242.7039.gAJysa/ruby-2.6.7/lib/rubygems/core_ext/kernel_require.rb:54:in `require' from /private/var/folders/gn/6tnmkjrx2nb4v0_nsmvr71b80000gp/T/ruby-build.20210422132242.7039.gAJysa/ruby-2.6.7/lib/rubygems/package.rb:44:in `<top (required)>' from /private/var/folders/gn/6tnmkjrx2nb4v0_nsmvr71b80000gp/T/ruby-build.20210422132242.7039.gAJysa/ruby-2.6.7/lib/rubygems/core_ext/kernel_require.rb:54:in `require' from /private/var/folders/gn/6tnmkjrx2nb4v0_nsmvr71b80000gp/T/ruby-build.20210422132242.7039.gAJysa/ruby-2.6.7/lib/rubygems/core_ext/kernel_require.rb:54:in `require' from /private/var/folders/gn/6tnmkjrx2nb4v0_nsmvr71b80000gp/T/ruby-build.20210422132242.7039.gAJysa/ruby-2.6.7/lib/rubygems/installer.rb:11:in `<top (required)>' from /private/var/folders/gn/6tnmkjrx2nb4v0_nsmvr71b80000gp/T/ruby-build.20210422132242.7039.gAJysa/ruby-2.6.7/lib/rubygems/core_ext/kernel_require.rb:54:in `require' from /private/var/folders/gn/6tnmkjrx2nb4v0_nsmvr71b80000gp/T/ruby-build.20210422132242.7039.gAJysa/ruby-2.6.7/lib/rubygems/core_ext/kernel_require.rb:54:in `require' from ./tool/rbinstall.rb:707:in `<module:RbInstall>' from ./tool/rbinstall.rb:643:in `<main>' make: *** [do-install-all] Error 1
補足情報(FW/ツールのバージョンなど)
mac os big sur 11.2.3
rbenv(v1.1.2)
Homebrew 3.1.3
回答2件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2021/04/28 11:01
2021/05/03 15:05
退会済みユーザー
2021/05/04 00:20