I tried this and that to establish how to install ruby.
python
# yum install -y centos-release-scl
python
# yum group install -y "Development Tools"
python
# yum install -y zlib-devel
# yum install -y ImageMagick ImageMagick-devel
python
# yum install -y rh-ruby25 rh-ruby25-ruby-devel
python
# echo '/opt/rh/rh-ruby25/root/usr/lib64' > /etc/ld.so.conf.d/rh-ruby.conf
# ldconfig
python
# update-alternatives --display ruby
# update-alternatives --install /usr/bin/ruby ruby /opt/rh/rh-ruby25/root/bin/ruby 25 \
--slave /usr/bin/gem gem /opt/rh/rh-ruby25/root/bin/gem
# update-alternatives --display ruby
ruby -The status is automatic.
Link is now/opt/rh/rh-ruby25/root/bin/It points to ruby.
/opt/rh/rh-ruby25/root/bin/ruby -Priority 25
Slave gem: /opt/rh/rh-ruby25/root/bin/gem
The current "optimal" version is/opt/rh/rh-ruby25/root/bin/It is ruby.
python
# ruby -v
ruby 2.5.5p157 (2019-03-15 revision 67260) [x86_64-linux]
python
# ruby- v
ruby: error while loading shared libraries: libruby.so.2.5: cannot open shared object file: No such file or directory
The library of ruby executable file is not recognized in the shared library.
python
# echo '/opt/rh/rh-ruby25/root/usr/lib64' > /etc/ld.so.conf.d/rh-ruby.conf
# ldconfig
SCL(Software CoLlectioin) A package for CentOS provided by Red Hat. It seems that it can be used without conflicting with yum.
Recommended Posts