Skip to main content

Ubuntu 16.04 - Installing Ruby 2.2.10 & 2.5.1 thru RVM

mccrazy@mccrazy-Lenovo-N22:~$ sudo apt-get update
[sudo] password for mccrazy:
Hit:1 http://ph.archive.ubuntu.com/ubuntu xenial InRelease
Get:2 http://ph.archive.ubuntu.com/ubuntu xenial-updates InRelease [109 kB]   
Get:3 http://ph.archive.ubuntu.com/ubuntu xenial-backports InRelease [107 kB] 
Get:4 http://security.ubuntu.com/ubuntu xenial-security InRelease [107 kB]    
Get:5 http://ph.archive.ubuntu.com/ubuntu xenial-updates/main amd64 DEP-11 Metadata [318 kB]
Hit:6 http://ppa.launchpad.net/alexlarsson/flatpak/ubuntu xenial InRelease    
Get:7 http://ph.archive.ubuntu.com/ubuntu xenial-updates/main DEP-11 64x64 Icons [228 kB]
Hit:8 http://ppa.launchpad.net/obsproject/obs-studio/ubuntu xenial InRelease  
Hit:9 https://download.sublimetext.com apt/stable/ InRelease                  
Get:10 http://ph.archive.ubuntu.com/ubuntu xenial-updates/universe amd64 DEP-11 Metadata [246 kB]
Get:11 http://security.ubuntu.com/ubuntu xenial-security/main amd64 DEP-11 Metadata [67.7 kB]
Ign:12 http://dl.google.com/linux/chrome/deb stable InRelease                 
Hit:13 http://dl.google.com/linux/chrome/deb stable Release                   
Get:14 http://security.ubuntu.com/ubuntu xenial-security/main DEP-11 64x64 Icons [68.0 kB]
Get:16 http://security.ubuntu.com/ubuntu xenial-security/universe amd64 DEP-11 Metadata [107 kB]
Get:17 http://security.ubuntu.com/ubuntu xenial-security/universe DEP-11 64x64 Icons [147 kB]
Get:18 http://ph.archive.ubuntu.com/ubuntu xenial-updates/universe DEP-11 64x64 Icons [334 kB]
Get:19 http://ph.archive.ubuntu.com/ubuntu xenial-updates/multiverse amd64 DEP-11 Metadata [5,964 B]
Get:20 http://ph.archive.ubuntu.com/ubuntu xenial-backports/main amd64 DEP-11 Metadata [3,324 B]
Get:21 http://ph.archive.ubuntu.com/ubuntu xenial-backports/universe amd64 DEP-11 Metadata [5,100 B]
Fetched 1,852 kB in 8s (230 kB/s)                                             
AppStream cache update completed, but some metadata was ignored due to errors.
Reading package lists... Done
mccrazy@mccrazy-Lenovo-N22:~$ sudo apt-get install build-essential
Reading package lists... Done
Building dependency tree      
Reading state information... Done
build-essential is already the newest version (12.1ubuntu2).
The following package was automatically installed and is no longer required:
  libllvm5.0
Use 'sudo apt autoremove' to remove it.
0 upgraded, 0 newly installed, 0 to remove and 17 not upgraded.
mccrazy@mccrazy-Lenovo-N22:~$ sudo apt autoremove
Reading package lists... Done
Building dependency tree      
Reading state information... Done
The following packages will be REMOVED:
  libllvm5.0
0 upgraded, 0 newly installed, 1 to remove and 17 not upgraded.
After this operation, 56.0 MB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 214405 files and directories currently installed.)
Removing libllvm5.0:amd64 (1:5.0-3~16.04.1) ...
Processing triggers for libc-bin (2.23-0ubuntu10) ...
mccrazy@mccrazy-Lenovo-N22:~$ sudo apt-get install curl
Reading package lists... Done
Building dependency tree      
Reading state information... Done
The following NEW packages will be installed:
  curl
0 upgraded, 1 newly installed, 0 to remove and 17 not upgraded.
Need to get 139 kB of archives.
After this operation, 339 kB of additional disk space will be used.
Get:1 http://ph.archive.ubuntu.com/ubuntu xenial-updates/main amd64 curl amd64 7.47.0-1ubuntu2.8 [139 kB]
Fetched 139 kB in 0s (177 kB/s)
Selecting previously unselected package curl.
(Reading database ... 214399 files and directories currently installed.)
Preparing to unpack .../curl_7.47.0-1ubuntu2.8_amd64.deb ...
Unpacking curl (7.47.0-1ubuntu2.8) ...
Processing triggers for man-db (2.7.5-1) ...
Setting up curl (7.47.0-1ubuntu2.8) ...
mccrazy@mccrazy-Lenovo-N22:~$ gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB
gpg: keyring `/home/mccrazy/.gnupg/secring.gpg' created
gpg: keyring `/home/mccrazy/.gnupg/pubring.gpg' created
gpg: requesting key D39DC0E3 from hkp server keys.gnupg.net
gpg: requesting key 39499BDB from hkp server keys.gnupg.net
gpg: /home/mccrazy/.gnupg/trustdb.gpg: trustdb created
gpg: key D39DC0E3: public key "Michal Papis (RVM signing) <mpapis@gmail.com>" imported
gpg: key 39499BDB: public key "Piotr Kuczynski <piotr.kuczynski@gmail.com>" imported
gpg: no ultimately trusted keys found
gpg: Total number processed: 2
gpg:               imported: 2  (RSA: 2)
mccrazy@mccrazy-Lenovo-N22:~$ \curl -sSL https://get.rvm.io | bash -s stable
Downloading https://github.com/rvm/rvm/archive/1.29.4.tar.gz
Downloading https://github.com/rvm/rvm/releases/download/1.29.4/1.29.4.tar.gz.asc
gpg: Signature made Monday, 02 July, 2018 03:41:26 AM +08 using RSA key ID BF04FF17
gpg: Good signature from "Michal Papis (RVM signing) <mpapis@gmail.com>" [unknown]
gpg:                 aka "Michal Papis <michal.papis@toptal.com>" [unknown]
gpg:                 aka "[jpeg image of size 5015]" [unknown]
gpg: WARNING: This key is not certified with a trusted signature!
gpg:          There is no indication that the signature belongs to the owner.
Primary key fingerprint: 409B 6B17 96C2 7546 2A17  0311 3804 BB82 D39D C0E3
     Subkey fingerprint: 62C9 E5F4 DA30 0D94 AC36  166B E206 C29F BF04 FF17
GPG verified '/home/mccrazy/.rvm/archives/rvm-1.29.4.tgz'
Installing RVM to /home/mccrazy/.rvm/
    Adding rvm PATH line to /home/mccrazy/.profile /home/mccrazy/.mkshrc /home/mccrazy/.bashrc /home/mccrazy/.zshrc.
    Adding rvm loading line to /home/mccrazy/.profile /home/mccrazy/.bash_profile /home/mccrazy/.zlogin.
Installation of RVM in /home/mccrazy/.rvm/ is almost complete:

  * To start using RVM you need to run `source /home/mccrazy/.rvm/scripts/rvm`
    in all your open shell windows, in rare cases you need to reopen all shell windows.
mccrazy@mccrazy-Lenovo-N22:~$ source ~/.rvm/scripts/rvm
mccrazy@mccrazy-Lenovo-N22:~$ rvm
Ruby enVironment Manager 1.29.4 (latest) (c) 2009-2017 Michal Papis, Piotr Kuczynski, Wayne E. Seguin

Usage:
 
    rvm [--debug][--trace][--nice] <command> <options>

  for example:

    rvm list                # list installed interpreters
    rvm list known          # list available interpreters
    rvm install <version>   # install ruby interpreter
    rvm use <version>       # switch to specified ruby interpreter
    rvm remove <version>    # remove ruby interpreter
    rvm get <version>       # upgrade rvm: stable, master

Available commands:

  rvm has a number of common commands, listed below. Additional information about any command
  can be found by executing `rvm help <command>`.

  ruby installation
      fetch                   # download binary or sources for selected ruby version
      install                 # install ruby interpreter
      list                    # show currently installed ruby interpreters
      list known              # list available interpreters
      mount                   # install ruby from external locations
      patchset                # tools related to managing ruby patchsets
      pkg                     # install a dependency package
      reinstall               # reinstall ruby and run gem pristine on all gems
      remove                  # remove ruby and downloaded sources
      requirements            # installs dependencies for building ruby
      uninstall               # uninstall ruby, keeping it's sources
      upgrade                 # upgrade to another ruby version, migrating gems

  running different ruby versions
      current                 # print current ruby version and name of used gemsets
      do                      # runs a command against specified and/or all rubies
      gemdir                  # display path to current gem directory ($GEM_HOME)
      use <version>           # switch to given (and already installed) ruby version
      use default             # switch to default ruby, or system if none is set
      use system              # switch to system ruby
      wrapper                 # creates wrapper executables for a given ruby & gemset

  managing gemsets
      gemset                  # manage gemsets
      migrate                 # migrate all gemsets from one ruby to another

  rvm configuration
      alias                   # define aliases for `rvm use`
      autolibs                # tweak settings for installing dependencies automatically
      group                   # tools for managing groups in multiuser installations
      rvmrc                   # tools related to managing .rvmrc trust & loading gemsets

  rvm maintenance
      implode                 # removes the rvm installation completely
      cleanup                 # remove stale source files & data associated with rvm
      cron                    # manage setup for using ruby in cron
      docs                    # tools to make installing ri and rdoc docs easier
      get                     # upgrades RVM to latest head, stable or branched version
      osx-ssl-certs           # helps update OpenSSL certs installed by rvm on OS X
      reload                  # reload rvm source itself
      reset                   # remove all default and system settings
      snapshot                # backup/restore rvm installation

  troubleshooting
      config-get              # display values for RbConfig::CONFIG variables
      debug                   # additional information helping to discover issues
      export                  # set temporary env variable in the current shell
      fix-permissions         # repairs broken permissions
      repair                  # lets you repair parts of your environment, such as
                              # wrappers, env files and similar (general maintenance)
      rubygems                # switches version of rubygems for the current ruby
      tools                   # general information about the ruby env
      unexport                # undo changes made to the environment by `rvm export`
      user                    # tools for managing RVM mixed mode in multiuser installs

   information and documentation
      info                    # show the environment information for current ruby
      disk-usage              # display disk space occupied by rvm
      notes                   # display notes with operating system specifics
      usage                   # list available commands and their usage info
      version                 # display rvm version (equal to `rvm -v`)

   additional global options
      --debug                 # toggle debug mode on for very verbose output
      --trace                 # toggle trace mode on to see EVERYTHING rvm is doing
      --nice                  # process niceness (increase the value on slow computers, default 0)

For additional documentation please visit https://rvm.io

mccrazy@mccrazy-Lenovo-N22:~$ rvm -version
Unrecognized command line flag: '-version'
Run `rvm help` to see usage information
mccrazy@mccrazy-Lenovo-N22:~$ rvm --version
rvm 1.29.4 (latest) by Michal Papis, Piotr Kuczynski, Wayne E. Seguin [https://rvm.io]
mccrazy@mccrazy-Lenovo-N22:~$ rvm list known
# MRI Rubies
[ruby-]1.8.6[-p420]
[ruby-]1.8.7[-head] # security released on head
[ruby-]1.9.1[-p431]
[ruby-]1.9.2[-p330]
[ruby-]1.9.3[-p551]
[ruby-]2.0.0[-p648]
[ruby-]2.1[.10]
[ruby-]2.2[.10]
[ruby-]2.3[.7]
[ruby-]2.4[.4]
[ruby-]2.5[.1]
[ruby-]2.6[.0-preview2]
ruby-head

# for forks use: rvm install ruby-head-<name> --url https://github.com/github/ruby.git --branch 2.2

# JRuby
jruby-1.6[.8]
jruby-1.7[.27]
jruby-9.1[.17.0]
jruby[-9.2.0.0]
jruby-head

# Rubinius
rbx-1[.4.3]
rbx-2.3[.0]
rbx-2.4[.1]
rbx-2[.5.8]
rbx-3[.100]
rbx-head

# TruffleRuby
truffleruby[-1.0.0-rc2]

# Opal
opal

# Minimalistic ruby implementation - ISO 30170:2012
mruby-1.0.0
mruby-1.1.0
mruby-1.2.0
mruby-1.3.0
mruby-1[.4.0]
mruby[-head]

# Ruby Enterprise Edition
ree-1.8.6
ree[-1.8.7][-2012.02]

# Topaz
topaz

# MagLev
maglev-1.0.0
maglev-1.1[RC1]
maglev[-1.2Alpha4]
maglev-head

# Mac OS X Snow Leopard Or Newer
macruby-0.10
macruby-0.11
macruby[-0.12]
macruby-nightly
macruby-head

# IronRuby
ironruby[-1.1.3]
ironruby-head
mccrazy@mccrazy-Lenovo-N22:~$ rvm install 2.5.1
Searching for binary rubies, this might take some time.
Found remote file https://rvm_io.global.ssl.fastly.net/binaries/ubuntu/16.04/x86_64/ruby-2.5.1.tar.bz2
Checking requirements for ubuntu.
Installing requirements for ubuntu.
Updating system....
Installing required packages: gawk, autoconf, automake, bison, libffi-dev, libgdbm-dev, libncurses5-dev, libsqlite3-dev, libtool, libyaml-dev, sqlite3, zlib1g-dev, libgmp-dev, libreadline6-dev, libssl-dev................
Requirements installation successful.
ruby-2.5.1 - #configure
ruby-2.5.1 - #download
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 16.8M  100 16.8M    0     0   303k      0  0:00:56  0:00:56 --:--:--  335k
ruby-2.5.1 - #validate archive
ruby-2.5.1 - #extract
ruby-2.5.1 - #validate binary
ruby-2.5.1 - #setup
ruby-2.5.1 - #gemset created /home/mccrazy/.rvm/gems/ruby-2.5.1@global
ruby-2.5.1 - #importing gemset /home/mccrazy/.rvm/gemsets/global.gems..........|
ruby-2.5.1 - #generating global wrappers.......
ruby-2.5.1 - #gemset created /home/mccrazy/.rvm/gems/ruby-2.5.1
ruby-2.5.1 - #importing gemsetfile /home/mccrazy/.rvm/gemsets/default.gems evaluated to empty gem list
ruby-2.5.1 - #generating default wrappers.......
mccrazy@mccrazy-Lenovo-N22:~$ rvm install 2.2.10
Searching for binary rubies, this might take some time.
Found remote file https://rvm_io.global.ssl.fastly.net/binaries/ubuntu/16.04/x86_64/ruby-2.2.10.tar.bz2
Checking requirements for ubuntu.
Requirements installation successful.
ruby-2.2.10 - #configure
ruby-2.2.10 - #download
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 22.9M  100 22.9M    0     0   252k      0  0:01:33  0:01:33 --:--:--  195k
ruby-2.2.10 - #validate archive
ruby-2.2.10 - #extract
ruby-2.2.10 - #validate binary
ruby-2.2.10 - #setup
ruby-2.2.10 - #gemset created /home/mccrazy/.rvm/gems/ruby-2.2.10@global
ruby-2.2.10 - #importing gemset /home/mccrazy/.rvm/gemsets/global.gems.........|
ruby-2.2.10 - #generating global wrappers.......
ruby-2.2.10 - #gemset created /home/mccrazy/.rvm/gems/ruby-2.2.10
ruby-2.2.10 - #importing gemsetfile /home/mccrazy/.rvm/gemsets/default.gems evaluated to empty gem list
ruby-2.2.10 - #generating default wrappers.......
mccrazy@mccrazy-Lenovo-N22:~$ ruby -v
ruby 2.2.10p489 (2018-03-28 revision 63023) [x86_64-linux]
mccrazy@mccrazy-Lenovo-N22:~$ rvm use 2.2.10 --default
Using /home/mccrazy/.rvm/gems/ruby-2.2.10
mccrazy@mccrazy-Lenovo-N22:~$

Comments

Post a Comment

Popular posts from this blog

Ubuntu 16.04 LT - Installing Chromium browser

> Type these commands about this PPA : $ sudo add-apt-repository ppa:canonical-chromium-builds/stage $ sudo apt-get update $ sudo apt-get install chromium-browser > Terminal: mccrazy@Lenovo-N22:~$ sudo add-apt-repository ppa:canonical-chromium-builds/stage [sudo] password for mccrazy:  Testing site just before upload to Ubuntu main. Things here are either broken and not ready to use, or landing in the distro anyway very soon. You shouldn't use this.  More info: https://launchpad.net/~canonical-chromium-builds/+archive/ubuntu/stage Press [ENTER] to continue or ctrl-c to cancel adding it gpg: keyring `/tmp/tmp6cfppy_r/secring.gpg' created gpg: keyring `/tmp/tmp6cfppy_r/pubring.gpg' created gpg: requesting key 5B393194 from hkp server keyserver.ubuntu.com gpg: /tmp/tmp6cfppy_r/trustdb.gpg: trustdb created gpg: key 5B393194: public key "Launchpad PPA for Canonical Chromium Build Team" imported gpg: Total number processed: 1 gpg:               imported: 1  (RSA...

Ubuntu 20.04 LTS | Installing OpenJDK 11 (LTS) JDK, JRE, HotSpot

https://adoptopenjdk.net/installation.html#linux-pkg ctrl + f => Linux RPM and DEB installer packages bboy@bboy-LE7450:~$ cat /etc/os-release | grep UBUNTU_CODENAME UBUNTU_CODENAME=focal bboy@bboy-LE7450:~$ sudo apt-get install wget apt-transport-https gnupg [sudo] password for bboy: Reading package lists... Done Building dependency tree       Reading state information... Done wget is already the newest version (1.20.3-1ubuntu1). wget set to manually installed. gnupg is already the newest version (2.2.19-3ubuntu2.1). gnupg set to manually installed. The following packages were automatically installed and are no longer required:   linux-headers-5.8.0-45-generic linux-hwe-5.8-headers-5.8.0-45   linux-image-5.8.0-45-generic linux-modules-5.8.0-45-generic   linux-modules-extra-5.8.0-45-generic Use 'sudo apt autoremove' to remove them. The following NEW packages will be installed:   apt-transport-https 0 upgraded, 1 newly installed, 0 to remove and 21 not upgraded. Need to get 1,...