mac安装rvm

作者: 冰点雨 | 来源:发表于2020-09-07 11:34 被阅读0次

    rvm官网

    安装gpg

    brew install gnupg 
    

    终端结果

    ios001@bogon demoTest % brew install gnupg 
    Updating Homebrew...
    ==> Downloading https://homebrew.bintray.com/bottles/adns-1.6.0.catalina.bottle.
    ==> Downloading from https://d29vzk4ow07wi7.cloudfront.net/d9cc50eec8ac243148a12
    ######################################################################## 100.0%
    ==> Downloading https://homebrew.bintray.com/bottles/gettext-0.21.catalina.bottl
    ==> Downloading from https://d29vzk4ow07wi7.cloudfront.net/cdea54f52b7c36ebcb5fe
    ######################################################################## 100.0%
    ==> Downloading https://homebrew.bintray.com/bottles/gmp-6.2.0.catalina.bottle.t
    ==> Downloading from https://d29vzk4ow07wi7.cloudfront.net/2e6acd6e62d1b8ef08000
    ######################################################################## 100.0%
    ==> Downloading https://homebrew.bintray.com/bottles/bdw-gc-8.0.4.catalina.bottl
    ==> Downloading from https://d29vzk4ow07wi7.cloudfront.net/3c8765da91b046c3ab3f7
    ######################################################################## 100.0%
    ==> Downloading https://homebrew.bintray.com/bottles/libffi-3.3.catalina.bottle.
    ######################################################################## 100.0%
    ==> Downloading https://homebrew.bintray.com/bottles/libtool-2.4.6_2.catalina.bo
    ==> Downloading from https://d29vzk4ow07wi7.cloudfront.net/af317b35d0a394b7ef55f
    ######################################################################## 100.0%
    ==> Downloading https://homebrew.bintray.com/bottles/libunistring-0.9.10.catalin
    ==> Downloading from https://d29vzk4ow07wi7.cloudfront.net/ce746662b98d93511b869
    ######################################################################## 100.0%
    ==> Downloading https://homebrew.bintray.com/bottles/pkg-config-0.29.2_3.catalin
    ==> Downloading from https://d29vzk4ow07wi7.cloudfront.net/80f141e695f73bd058fd8
    ######################################################################## 100.0%
    ==> Downloading https://homebrew.bintray.com/bottles/readline-8.0.4.catalina.bot
    ==> Downloading from https://d29vzk4ow07wi7.cloudfront.net/6ae1c8e7c783f32bd22c6
    ######################################################################## 100.0%
    ==> Downloading https://homebrew.bintray.com/bottles/guile-3.0.4.catalina.bottle
    ==> Downloading from https://d29vzk4ow07wi7.cloudfront.net/82d5ae8de3a1c8bf11e35
    ######################################################################## 100.0%
    ==> Downloading https://homebrew.bintray.com/bottles/libidn2-2.3.0.catalina.bott
    ==> Downloading from https://d29vzk4ow07wi7.cloudfront.net/0908585cca518a83f101b
    ######################################################################## 100.0%
    ==> Downloading https://homebrew.bintray.com/bottles/libtasn1-4.16.0.catalina.bo
    ######################################################################## 100.0%
    ==> Downloading https://homebrew.bintray.com/bottles/nettle-3.6.catalina.bottle.
    ==> Downloading from https://d29vzk4ow07wi7.cloudfront.net/7ac7677ba653dbef81dd8
    ######################################################################## 100.0%
    ==> Downloading https://homebrew.bintray.com/bottles/p11-kit-0.23.20_1.catalina.
    ==> Downloading from https://d29vzk4ow07wi7.cloudfront.net/f9d23713a5fbd8e1eea89
    ######################################################################## 100.0%
    ==> Downloading https://homebrew.bintray.com/bottles/openssl%401.1-1.1.1g.catali
    ==> Downloading from https://d29vzk4ow07wi7.cloudfront.net/1926679569c6af5337de8
    ######################################################################## 100.0%
    ==> Downloading https://homebrew.bintray.com/bottles/libevent-2.1.12.catalina.bo
    ==> Downloading from https://d29vzk4ow07wi7.cloudfront.net/b5f5e7607d76b9b41ecac
    ######################################################################## 100.0%
    ==> Downloading https://homebrew.bintray.com/bottles/unbound-1.11.0.catalina.bot
    ==> Downloading from https://d29vzk4ow07wi7.cloudfront.net/7e5335d2a33ade460682f
    ######################################################################## 100.0%
    ==> Downloading https://homebrew.bintray.com/bottles/gnutls-3.6.15.catalina.bott
    ==> Downloading from https://d29vzk4ow07wi7.cloudfront.net/513407ec28ac63623dbc0
    ######################################################################## 100.0%
    ==> Downloading https://homebrew.bintray.com/bottles/libgpg-error-1.39.catalina.
    ==> Downloading from https://d29vzk4ow07wi7.cloudfront.net/192fb153fd3471c6491a4
    ######################################################################## 100.0%
    ==> Downloading https://homebrew.bintray.com/bottles/libassuan-2.5.3.catalina.bo
    ######################################################################## 100.0%
    ==> Downloading https://homebrew.bintray.com/bottles/libgcrypt-1.8.6.catalina.bo
    ==> Downloading from https://d29vzk4ow07wi7.cloudfront.net/bc8f0fdc3dccd598c6bc3
    ######################################################################## 100.0%
    ==> Downloading https://homebrew.bintray.com/bottles/libksba-1.4.0.catalina.bott
    ######################################################################## 100.0%
    ==> Downloading https://homebrew.bintray.com/bottles/libusb-1.0.23.catalina.bott
    ######################################################################## 100.0%
    ==> Downloading https://homebrew.bintray.com/bottles/npth-1.6.catalina.bottle.ta
    ######################################################################## 100.0%
    ==> Downloading https://homebrew.bintray.com/bottles/pinentry-1.1.0_1.catalina.b
    ######################################################################## 100.0%
    ==> Downloading https://homebrew.bintray.com/bottles/gnupg-2.2.23.catalina.bottl
    ==> Downloading from https://d29vzk4ow07wi7.cloudfront.net/f3d7b9b1b344cf3aa2108
    ######################################################################## 100.0%
    ==> Installing dependencies for gnupg: adns, gettext, gmp, bdw-gc, libffi, libtool, libunistring, pkg-config, readline, guile, libidn2, libtasn1, nettle, p11-kit, openssl@1.1, libevent, unbound, gnutls, libgpg-error, libassuan, libgcrypt, libksba, libusb, npth and pinentry
    ==> Installing gnupg dependency: adns
    ==> Pouring adns-1.6.0.catalina.bottle.tar.gz
    🍺  /usr/local/Cellar/adns/1.6.0: 14 files, 668.7KB
    ==> Installing gnupg dependency: gettext
    ==> Pouring gettext-0.21.catalina.bottle.tar.gz
    🍺  /usr/local/Cellar/gettext/0.21: 1,953 files, 19.0MB
    ==> Installing gnupg dependency: gmp
    ==> Pouring gmp-6.2.0.catalina.bottle.tar.gz
    🍺  /usr/local/Cellar/gmp/6.2.0: 20 files, 3.2MB
    ==> Installing gnupg dependency: bdw-gc
    ==> Pouring bdw-gc-8.0.4.catalina.bottle.tar.gz
    🍺  /usr/local/Cellar/bdw-gc/8.0.4: 69 files, 1.5MB
    ==> Installing gnupg dependency: libffi
    ==> Pouring libffi-3.3.catalina.bottle.tar.gz
    ==> Caveats
    libffi is keg-only, which means it was not symlinked into /usr/local,
    because macOS already provides this software and installing another version in
    parallel can cause all kinds of trouble.
    
    For compilers to find libffi you may need to set:
      export LDFLAGS="-L/usr/local/opt/libffi/lib"
      export CPPFLAGS="-I/usr/local/opt/libffi/include"
    
    ==> Summary
    🍺  /usr/local/Cellar/libffi/3.3: 16 files, 489.4KB
    ==> Installing gnupg dependency: libtool
    ==> Pouring libtool-2.4.6_2.catalina.bottle.tar.gz
    ==> Caveats
    In order to prevent conflicts with Apple's own libtool we have prepended a "g"
    so, you have instead: glibtool and glibtoolize.
    ==> Summary
    🍺  /usr/local/Cellar/libtool/2.4.6_2: 71 files, 3.7MB
    ==> Installing gnupg dependency: libunistring
    ==> Pouring libunistring-0.9.10.catalina.bottle.tar.gz
    🍺  /usr/local/Cellar/libunistring/0.9.10: 54 files, 4.4MB
    ==> Installing gnupg dependency: pkg-config
    ==> Pouring pkg-config-0.29.2_3.catalina.bottle.tar.gz
    🍺  /usr/local/Cellar/pkg-config/0.29.2_3: 11 files, 623.8KB
    ==> Installing gnupg dependency: readline
    ==> Pouring readline-8.0.4.catalina.bottle.tar.gz
    ==> Caveats
    readline is keg-only, which means it was not symlinked into /usr/local,
    because macOS provides BSD libedit.
    
    For compilers to find readline you may need to set:
      export LDFLAGS="-L/usr/local/opt/readline/lib"
      export CPPFLAGS="-I/usr/local/opt/readline/include"
    
    For pkg-config to find readline you may need to set:
      export PKG_CONFIG_PATH="/usr/local/opt/readline/lib/pkgconfig"
    
    ==> Summary
    🍺  /usr/local/Cellar/readline/8.0.4: 48 files, 1.5MB
    ==> Installing gnupg dependency: guile
    ==> Pouring guile-3.0.4.catalina.bottle.1.tar.gz
    ==> Caveats
    Guile libraries can now be installed here:
        Source files: /usr/local/share/guile/site/3.0
      Compiled files: /usr/local/lib/guile/3.0/site-ccache
          Extensions: /usr/local/lib/guile/3.0/extensions
    
    Add the following to your .bashrc or equivalent:
      export GUILE_LOAD_PATH="/usr/local/share/guile/site/3.0"
      export GUILE_LOAD_COMPILED_PATH="/usr/local/lib/guile/3.0/site-ccache"
      export GUILE_SYSTEM_EXTENSIONS_PATH="/usr/local/lib/guile/3.0/extensions"
    ==> Summary
    🍺  /usr/local/Cellar/guile/3.0.4: 830 files, 56.5MB
    ==> Installing gnupg dependency: libidn2
    ==> Pouring libidn2-2.3.0.catalina.bottle.tar.gz
    🍺  /usr/local/Cellar/libidn2/2.3.0: 70 files, 727.8KB
    ==> Installing gnupg dependency: libtasn1
    ==> Pouring libtasn1-4.16.0.catalina.bottle.tar.gz
    🍺  /usr/local/Cellar/libtasn1/4.16.0: 60 files, 404.5KB
    ==> Installing gnupg dependency: nettle
    ==> Pouring nettle-3.6.catalina.bottle.tar.gz
    🍺  /usr/local/Cellar/nettle/3.6: 87 files, 2.4MB
    ==> Installing gnupg dependency: p11-kit
    ==> Pouring p11-kit-0.23.20_1.catalina.bottle.tar.gz
    🍺  /usr/local/Cellar/p11-kit/0.23.20_1: 63 files, 2.9MB
    ==> Installing gnupg dependency: openssl@1.1
    ==> Pouring openssl@1.1-1.1.1g.catalina.bottle.tar.gz
    ==> Caveats
    A CA file has been bootstrapped using certificates from the system
    keychain. To add additional certificates, place .pem files in
      /usr/local/etc/openssl@1.1/certs
    
    and run
      /usr/local/opt/openssl@1.1/bin/c_rehash
    
    openssl@1.1 is keg-only, which means it was not symlinked into /usr/local,
    because macOS provides LibreSSL.
    
    If you need to have openssl@1.1 first in your PATH run:
      echo 'export PATH="/usr/local/opt/openssl@1.1/bin:$PATH"' >> ~/.zshrc
    
    For compilers to find openssl@1.1 you may need to set:
      export LDFLAGS="-L/usr/local/opt/openssl@1.1/lib"
      export CPPFLAGS="-I/usr/local/opt/openssl@1.1/include"
    
    For pkg-config to find openssl@1.1 you may need to set:
      export PKG_CONFIG_PATH="/usr/local/opt/openssl@1.1/lib/pkgconfig"
    
    ==> Summary
    🍺  /usr/local/Cellar/openssl@1.1/1.1.1g: 8,059 files, 18MB
    ==> Installing gnupg dependency: libevent
    ==> Pouring libevent-2.1.12.catalina.bottle.tar.gz
    🍺  /usr/local/Cellar/libevent/2.1.12: 57 files, 1.9MB
    ==> Installing gnupg dependency: unbound
    ==> Pouring unbound-1.11.0.catalina.bottle.tar.gz
    ==> Caveats
    To have launchd start unbound now and restart at startup:
      sudo brew services start unbound
    ==> Summary
    🍺  /usr/local/Cellar/unbound/1.11.0: 57 files, 5.2MB
    ==> Installing gnupg dependency: gnutls
    ==> Pouring gnutls-3.6.15.catalina.bottle.tar.gz
    ==> Caveats
    If you are going to use the Guile bindings you will need to add the following
    to your .bashrc or equivalent in order for Guile to find the TLS certificates
    database:
      export GUILE_TLS_CERTIFICATE_DIRECTORY=/usr/local/etc/gnutls/
    ==> Summary
    🍺  /usr/local/Cellar/gnutls/3.6.15: 1,250 files, 10.8MB
    ==> Installing gnupg dependency: libgpg-error
    ==> Pouring libgpg-error-1.39.catalina.bottle.tar.gz
    🍺  /usr/local/Cellar/libgpg-error/1.39: 26 files, 926.2KB
    ==> Installing gnupg dependency: libassuan
    ==> Pouring libassuan-2.5.3.catalina.bottle.tar.gz
    🍺  /usr/local/Cellar/libassuan/2.5.3: 16 files, 448.6KB
    ==> Installing gnupg dependency: libgcrypt
    ==> Pouring libgcrypt-1.8.6.catalina.bottle.tar.gz
    🍺  /usr/local/Cellar/libgcrypt/1.8.6: 22 files, 2.6MB
    ==> Installing gnupg dependency: libksba
    ==> Pouring libksba-1.4.0.catalina.bottle.tar.gz
    🍺  /usr/local/Cellar/libksba/1.4.0: 15 files, 394.0KB
    ==> Installing gnupg dependency: libusb
    ==> Pouring libusb-1.0.23.catalina.bottle.1.tar.gz
    🍺  /usr/local/Cellar/libusb/1.0.23: 26 files, 474.2KB
    ==> Installing gnupg dependency: npth
    ==> Pouring npth-1.6.catalina.bottle.tar.gz
    🍺  /usr/local/Cellar/npth/1.6: 11 files, 75.7KB
    ==> Installing gnupg dependency: pinentry
    ==> Pouring pinentry-1.1.0_1.catalina.bottle.tar.gz
    🍺  /usr/local/Cellar/pinentry/1.1.0_1: 12 files, 272.6KB
    ==> Installing gnupg
    ==> Pouring gnupg-2.2.23.catalina.bottle.tar.gz
    🍺  /usr/local/Cellar/gnupg/2.2.23: 140 files, 11.5MB
    ==> Caveats
    ==> libffi
    libffi is keg-only, which means it was not symlinked into /usr/local,
    because macOS already provides this software and installing another version in
    parallel can cause all kinds of trouble.
    
    For compilers to find libffi you may need to set:
      export LDFLAGS="-L/usr/local/opt/libffi/lib"
      export CPPFLAGS="-I/usr/local/opt/libffi/include"
    
    For pkg-config to find libffi you may need to set:
      export PKG_CONFIG_PATH="/usr/local/opt/libffi/lib/pkgconfig"
    
    ==> libtool
    In order to prevent conflicts with Apple's own libtool we have prepended a "g"
    so, you have instead: glibtool and glibtoolize.
    ==> readline
    readline is keg-only, which means it was not symlinked into /usr/local,
    because macOS provides BSD libedit.
    
    For compilers to find readline you may need to set:
      export LDFLAGS="-L/usr/local/opt/readline/lib"
      export CPPFLAGS="-I/usr/local/opt/readline/include"
    
    For pkg-config to find readline you may need to set:
      export PKG_CONFIG_PATH="/usr/local/opt/readline/lib/pkgconfig"
    
    ==> guile
    Guile libraries can now be installed here:
        Source files: /usr/local/share/guile/site/3.0
      Compiled files: /usr/local/lib/guile/3.0/site-ccache
          Extensions: /usr/local/lib/guile/3.0/extensions
    
    Add the following to your .bashrc or equivalent:
      export GUILE_LOAD_PATH="/usr/local/share/guile/site/3.0"
      export GUILE_LOAD_COMPILED_PATH="/usr/local/lib/guile/3.0/site-ccache"
      export GUILE_SYSTEM_EXTENSIONS_PATH="/usr/local/lib/guile/3.0/extensions"
    ==> openssl@1.1
    A CA file has been bootstrapped using certificates from the system
    keychain. To add additional certificates, place .pem files in
      /usr/local/etc/openssl@1.1/certs
    
    and run
      /usr/local/opt/openssl@1.1/bin/c_rehash
    
    openssl@1.1 is keg-only, which means it was not symlinked into /usr/local,
    because macOS provides LibreSSL.
    
    If you need to have openssl@1.1 first in your PATH run:
      echo 'export PATH="/usr/local/opt/openssl@1.1/bin:$PATH"' >> ~/.zshrc
    
    For compilers to find openssl@1.1 you may need to set:
      export LDFLAGS="-L/usr/local/opt/openssl@1.1/lib"
      export CPPFLAGS="-I/usr/local/opt/openssl@1.1/include"
    
    For pkg-config to find openssl@1.1 you may need to set:
      export PKG_CONFIG_PATH="/usr/local/opt/openssl@1.1/lib/pkgconfig"
    
    ==> unbound
    To have launchd start unbound now and restart at startup:
      sudo brew services start unbound
    ==> gnutls
    If you are going to use the Guile bindings you will need to add the following
    to your .bashrc or equivalent in order for Guile to find the TLS certificates
    database:
      export GUILE_TLS_CERTIFICATE_DIRECTORY=/usr/local/etc/gnutls/
    

    安装mpapis公钥

    gpg --keyserver hkp://pgp.mit.edu --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB
    

    终端输出

    ios001@bogon demoTest % gpg --keyserver hkp://pgp.mit.edu --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB
    gpg: 目录‘/Users/ios001/.gnupg’已创建
    gpg: 钥匙箱‘/Users/ios001/.gnupg/pubring.kbx’已创建
    gpg: 从公钥服务器接收失败:No keyserver available
    

    如果显示从公钥服务器接收失败则尝试下面的

    gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
    

    终端输出

    ios001@bogon demoTest % gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
    gpg: /Users/ios001/.gnupg/trustdb.gpg:建立了信任度数据库
    gpg: 密钥 3804BB82D39DC0E3:公钥 “Michal Papis (RVM signing) <mpapis@gmail.com>” 已导入
    gpg: 处理的总数:1
    gpg:               已导入:1
    

    安装rvm

    \curl -sSL https://get.rvm.io | bash -s stable --ruby
    

    输出

    ios001@bogon demoTest % \curl -sSL https://get.rvm.io | bash -s stable --ruby
    Downloading https://github.com/rvm/rvm/archive/1.29.10.tar.gz
    Downloading https://github.com/rvm/rvm/releases/download/1.29.10/1.29.10.tar.gz.asc
    gpg: 签名建立于 四  3/26 05:58:42 2020 CST
    gpg:               使用 RSA 密钥 7D2BAF1CF37B13E2069D6956105BD0E739499BDB
    gpg: 无法检查签名:No public key
    GPG signature verification failed for '/Users/ios001/.rvm/archives/rvm-1.29.10.tgz' - 'https://github.com/rvm/rvm/releases/download/1.29.10/1.29.10.tar.gz.asc'! Try to install GPG v2 and then fetch the public key:
    
        gpg --keyserver hkp://pool.sks-keyservers.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB
    
    or if it fails:
    
        command curl -sSL https://rvm.io/mpapis.asc | gpg --import -
        command curl -sSL https://rvm.io/pkuczynski.asc | gpg --import -
    
    In case of further problems with validation please refer to https://rvm.io/rvm/security
    

    根据提示执行第一个命令,仍然失败

    ios001@bogon demoTest % gpg --keyserver hkp://pool.sks-keyservers.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB
    gpg: 从公钥服务器接收失败:No route to host
    

    执行第二个命令

    ios001@bogon demoTest % command curl -sSL https://rvm.io/pkuczynski.asc | gpg --import -
    gpg: 密钥 105BD0E739499BDB:公钥 “Piotr Kuczynski <piotr.kuczynski@gmail.com>” 已导入
    gpg: 处理的总数:1
    gpg:               已导入:1
    

    再次安装

    ios001@bogon demoTest % \curl -sSL https://get.rvm.io | bash -s stable --ruby
    Downloading https://github.com/rvm/rvm/archive/1.29.10.tar.gz
    Downloading https://github.com/rvm/rvm/releases/download/1.29.10/1.29.10.tar.gz.asc
    gpg: 签名建立于 四  3/26 05:58:42 2020 CST
    gpg:               使用 RSA 密钥 7D2BAF1CF37B13E2069D6956105BD0E739499BDB
    gpg: 完好的签名,来自于 “Piotr Kuczynski <piotr.kuczynski@gmail.com>” [未知]
    gpg: 警告:此密钥未被受信任签名认证!
    gpg:       没有证据表明此签名属于其声称的所有者。
    主密钥指纹: 7D2B AF1C F37B 13E2 069D  6956 105B D0E7 3949 9BDB
    GPG verified '/Users/ios001/.rvm/archives/rvm-1.29.10.tgz'
    Upgrading the RVM installation in /Users/ios001/.rvm/
        RVM PATH line found in /Users/ios001/.mkshrc /Users/ios001/.profile /Users/ios001/.bashrc /Users/ios001/.zshrc.
        RVM sourcing line found in /Users/ios001/.profile /Users/ios001/.bash_profile /Users/ios001/.zlogin.
    Upgrade of RVM in /Users/ios001/.rvm/ is complete.
    
    Thanks for installing RVM 🙏
    Please consider donating to our open collective to help us maintain RVM.
    
    👉  Donate: https://opencollective.com/rvm/donate
    
    
    Ruby enVironment Manager 1.29.10 (latest) (c) 2009-2017 Michal Papis, Piotr Kuczynski, Wayne E. Seguin
    
    Already installed ruby-2.7.0.
    To reinstall use:
    
        rvm reinstall ruby-2.7.0
    
    Creating alias default for ruby-2.7.0.....
    
      * To start using RVM you need to run `source /Users/ios001/.rvm/scripts/rvm`
        in all your open shell windows, in rare cases you need to reopen all shell windows.
    

    根据提示执行

    source /Users/ios001/.rvm/scripts/rvm
    

    查看rvm版本

    ios001@bogon demoTest % rvm --version                        
    RVM version 1.29.10 (latest) is installed, yet version 1.29.10 (master) is loaded.
    
    Please open a new shell or run one of the following commands:
    
        rvm reload
        echo rvm_auto_reload_flag=1 >> ~/.rvmrc # OR for auto reload with msg
        echo rvm_auto_reload_flag=2 >> ~/.rvmrc # OR for silent auto reload
    

    根据提示执行

    ios001@bogon demoTest % rvm reload
    RVM reloaded!
    

    再次查看rvm版本

    os001@bogon demoTest % rvm --version                        
    rvm 1.29.10 (latest) by Michal Papis, Piotr Kuczynski, Wayne E. Seguin [https://rvm.io]
    

    如果之前安装过,更新

    rvm get stable
    

    卸载

    rvm implode
    

    ruby rvm常用指令

    $ ruby -v # 查看ruby 版本
    $ rvm list known # 列出已知的 ruby 版本
    $ rvm install 2.3.0 # 选择指定 ruby 版本进行更新
    $ rvm get stable # 更新 rvm
    $ rvm use 2.2.2 # 切换到指定 ruby 版本
    $ rvm use 2.2.2 --default # 设置指定 ruby 版本为默认版本
    $ rvm list # 查询已安装的 ruby 版本
    $ rvm remove 1.9.2 # 卸载移除 指定 ruby 版本
    
    $ curl -L https://get.rvm.io | bash -s stable # 安装 rvm 环境
    $ curl -sSL https://get.rvm.io | bash -s stable --ruby # 默认安装 rvm 最新版本
    $ curl -sSL https://get.rvm.io | bash -s stable --ruby=2.3.0 # 安装 rvm 指定版本
    $ source ~/.rvm/scripts/rvm # 载入 rvm
    

    相关文章

      网友评论

        本文标题:mac安装rvm

        本文链接:https://www.haomeiwen.com/subject/fwmkektx.html