[Amazon linux2]Rubyインストール

LINEで送る
Pocket

  • 特定ユーザー
$ git clone https://github.com/sstephenson/rbenv.git ~/.rbenv

$ echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bash_profile
$ echo 'eval "$(rbenv init -)"' >> ~/.bash_profile
$ source ~/.bash_profile

$ git clone git://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build

$ cd ~/.rbenv/plugins/ruby-build
$ sudo ./install.sh

$ sudo yum -y install gcc-c++ glibc-headers openssl-devel readline libyaml-devel readline-devel zlib zlib-devel libffi-devel libxml2 libxslt libxml2-devel libxslt-devel sqlite-devel

$ rbenv install 2.7.2
$ rbenv global 2.7.2
  • 全ユーザー
$ git clone https://github.com/sstephenson/rbenv.git /usr/local/rbenv/

$ echo 'export 'RBENV_ROOT="/usr/local/rbenv"' >> /etc/profile
$ echo 'export PATH="${RBENV_ROOT}/bin:${PATH}"' >> /etc/profile
$ echo 'eval "$(rbenv init --no-rehash -)"' >> /etc/profile
$ source /etc/profile"

$ git clone git://github.com/sstephenson/ruby-build.git /usr/local/rbenv/plugins/ruby-build/

$ sudo yum -y install gcc-c++ glibc-headers openssl-devel readline libyaml-devel readline-devel zlib zlib-devel libffi-devel libxml2 libxslt libxml2-devel libxslt-devel sqlite-devel 

$ rbenv install 2.7.2 
$ rbenv global 2.7.2

Was this helpful?

0 / 0

コメントを残す 0

Your email address will not be published. Required fields are marked *