VagrantとCentOS7環境下にてRuby及びRailsをインストールしたいと思っています。
こちらの README.md の"Basic GitHub Checkout"に書かれているやり方に従ってインストールしましたが、
下記のようにコマンドが見つからないと出ました。
これはどういった原因が考えられますでしょうか?
CentOS
1[vagrant@localhost ~]$ git clone https://github.com/rbenv/rbenv.git ~/.rbenv 2-bash: git: command not found
追記
Rubyをインストールしようとした所、下記のようなエラーが出ました。
Inspect or clean up the working tree at /tmp/ruby-build.20200427052059.2195.A64Isy
とあるのでクリーンアップをしないといけないのはわかるのですが
どのようなコマンドでやるのかわかりません。。。
CentOS
1[vagrant@localhost ~]$ rbenv install 2.7.1 2Downloading ruby-2.7.1.tar.bz2... 3-> https://cache.ruby-lang.org/pub/ruby/2.7/ruby-2.7.1.tar.bz2 4Installing ruby-2.7.1... 5 6BUILD FAILED (CentOS Linux 7 using ruby-build 20200401-9-g3ef704e) 7 8Inspect or clean up the working tree at /tmp/ruby-build.20200427052059.2195.A64Isy 9Results logged to /tmp/ruby-build.20200427052059.2195.log 10 11Last 10 log lines: 12 from ./tool/rbinstall.rb:846:in `block (2 levels) in install_default_gem' 13 from ./tool/rbinstall.rb:279:in `open_for_install' 14 from ./tool/rbinstall.rb:845:in `block in install_default_gem' 15 from ./tool/rbinstall.rb:835:in `each' 16 from ./tool/rbinstall.rb:835:in `install_default_gem' 17 from ./tool/rbinstall.rb:799:in `block in <main>' 18 from ./tool/rbinstall.rb:950:in `block in <main>' 19 from ./tool/rbinstall.rb:947:in `each' 20 from ./tool/rbinstall.rb:947:in `<main>' 21make: *** [do-install-all] Error 1
追記2(コマンドless /tmp/ruby-build.20200427085831.17156.logをした後の内容)
CentOS
1 2 Methods: 13019 (3991 undocumented) 3 4 Total: 18883 (6168 undocumented) 5 67.34% documented 6 7 Elapsed: 36.0s 8 9generating x86_64-linux-fake.rb 10x86_64-linux-fake.rb updated 11./miniruby -I./lib -I. -I.ext/common ./tool/runruby.rb --extout=.ext -- --disable-gems -r./x86_64-linux-fake ./tool/rbinstall.rb --make="make" --dest-dir="" --extout=".ext" --mflags="" --make-flags="" --data-mode=0644 --prog-mode=0755 --installed-list .installed.list --mantype="doc" --rdoc-output=".ext/rdoc" --html-output=".ext/html" 12installing binary commands: /home/vagrant/.rbenv/versions/2.7.1/bin 13installing base libraries: /home/vagrant/.rbenv/versions/2.7.1/lib 14installing arch files: /home/vagrant/.rbenv/versions/2.7.1/lib/ruby/2.7.0/x86_64-linux 15installing pkgconfig data: /home/vagrant/.rbenv/versions/2.7.1/lib/pkgconfig 16installing extension objects: /home/vagrant/.rbenv/versions/2.7.1/lib/ruby/2.7.0/x86_64-linux 17installing extension objects: /home/vagrant/.rbenv/versions/2.7.1/lib/ruby/site_ruby/2.7.0/x86_64-linux 18installing extension objects: /home/vagrant/.rbenv/versions/2.7.1/lib/ruby/vendor_ruby/2.7.0/x86_64-linux 19installing extension headers: /home/vagrant/.rbenv/versions/2.7.1/include/ruby-2.7.0/x86_64-linux 20installing extension scripts: /home/vagrant/.rbenv/versions/2.7.1/lib/ruby/2.7.0 21installing extension scripts: /home/vagrant/.rbenv/versions/2.7.1/lib/ruby/site_ruby/2.7.0 22installing extension scripts: /home/vagrant/.rbenv/versions/2.7.1/lib/ruby/vendor_ruby/2.7.0 23installing extension headers: /home/vagrant/.rbenv/versions/2.7.1/include/ruby-2.7.0/ruby 24installing rdoc: /home/vagrant/.rbenv/versions/2.7.1/share/ri/2.7.0/system 25installing html-docs: /home/vagrant/.rbenv/versions/2.7.1/share/doc/ruby 26installing capi-docs: /home/vagrant/.rbenv/versions/2.7.1/share/doc/ruby 27installing command scripts: /home/vagrant/.rbenv/versions/2.7.1/bin 28installing library scripts: /home/vagrant/.rbenv/versions/2.7.1/lib/ruby/2.7.0 29installing common headers: /home/vagrant/.rbenv/versions/2.7.1/include/ruby-2.7.0 30installing manpages: /home/vagrant/.rbenv/versions/2.7.1/share/man (man1, man5) 31installing default gems from lib: /home/vagrant/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0 (build_info, cache, doc, extensions, gems, specifications) 32 benchmark 0.1.0 33/tmp/ruby-build.20200427085831.17156.neMvlB/ruby-2.7.1/lib/rubygems/core_ext/kernel_require.rb:92:in `require': cannot load such file -- openssl (LoadError) 34 from /tmp/ruby-build.20200427085831.17156.neMvlB/ruby-2.7.1/lib/rubygems/core_ext/kernel_require.rb:92:in `require' 35 from /tmp/ruby-build.20200427085831.17156.neMvlB/ruby-2.7.1/lib/rubygems/specification.rb:2426:in `to_ruby' 36 from ./tool/rbinstall.rb:846:in `block (2 levels) in install_default_gem' 37 from ./tool/rbinstall.rb:279:in `open_for_install' 38 from ./tool/rbinstall.rb:845:in `block in install_default_gem' 39 from ./tool/rbinstall.rb:835:in `each' 40 from ./tool/rbinstall.rb:835:in `install_default_gem' 41 from ./tool/rbinstall.rb:799:in `block in <main>' 42 from ./tool/rbinstall.rb:950:in `block in <main>' 43 from ./tool/rbinstall.rb:947:in `each' 44 from ./tool/rbinstall.rb:947:in `<main>' 45make: *** [do-install-all] Error 1 46
追記3(Rubyのインストールに成功したようだがヴァージョンの確認ができない)
CentOS
1[vagrant@localhost ~]$ rbenv install 2.7.1 2Downloading ruby-2.7.1.tar.bz2... 3-> https://cache.ruby-lang.org/pub/ruby/2.7/ruby-2.7.1.tar.bz2 4Installing ruby-2.7.1... 5Installed ruby-2.7.1 to /home/vagrant/.rbenv/versions/2.7.1 6 7[vagrant@localhost ~]$ ruby -v 8-bash: ruby: command not found 9[vagrant@localhost ~]$ rbenv versions 10 2.7.1 11[vagrant@localhost ~]$ rbenv global 2.7.1 12[vagrant@localhost ~]$ ruby -v
回答3件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2020/04/27 06:37
2020/04/27 06:41
2020/04/27 07:44