Advertisement
Justman10000

Manage Ruby

Sep 12th, 2023 (edited)
704
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.91 KB | None | 0 0
  1. // To install
  2. # Install dependency
  3. apt install libtool -y
  4.  
  5. # The version of your Ruby instance
  6. version=3.3
  7. underVersion=3.3.0
  8.  
  9. wget https://cache.ruby-lang.org/pub/ruby/$version/ruby-$underVersion.tar.gz
  10. gunzip ruby-$underVersion.tar.gz
  11. tar xvf ruby-$underVersion.tar
  12. mv ruby-$underVersion /usr/local/ruby
  13. rm -r ruby-$underVersion.tar
  14. cd /usr/local/ruby
  15.  
  16. cp -r /usr/lib/x86_64-linux-gnu/pkgconfig/* /usr/local/lib/pkgconfig
  17. bash configure --disable-install-rdoc --disable-install-capi --prefix=/usr/local --with-ext=psych
  18. make install
  19. ln ruby /usr/bin
  20. ln bin/* /usr/bin
  21.  
  22. // To uninstall
  23. [[ -d /usr/local/ruby ]] && rm -r /usr/local/ruby
  24. [[ -f /usr/local/bin/gem ]] && rm -r /usr/local/bin/gem
  25. [[ -f /usr/local/bin/ruby ]] && rm -r /usr/local/bin/ruby
  26. [[ -d /usr/local/share/doc/ruby ]] && rm -r /usr/local/share/doc/ruby
  27. [[ -d /usr/local/include/$underVersion ]] && rm -r /usr/local/include/$underVersion
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement