How to install RVM in ubuntu15.04

  • 2020-05-14 05:40:53
  • OfStack

RVM official website

https: / / rvm io /

1 since many websites are now linked to https, follow the official rvm tutorial

Alternatively, it is best to install as a single user, that is, to a non-ROOT user directory.

1.1 set up https validation. If you follow the previous tutorial, you will not have this part, but you need it now, otherwise you will report an error.

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

PS: non-root users may need to install sudo, well, that's what mine looks like anyway.

The following sentence means installing rvm.


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

The old ones were:


curl -s get.rvm.io | bash -s stable

Global RVM:


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

I didn't try to see if it was still possible to use this method.

Ps: ROOT user default installation again /use/local/rvm directory, non-ROOT users installed into the user directory. It is best not to install global RVM.

Ps: when I started to install RVM root, and want to install not under the ROOT ruby, ha ha, this is interesting, TMD always prompt inadequate access to create/usr local/rvm directory, well, this is very normal, not root authority is unable to create a file system directory, since then I want to create a problem separately, then I can to install RVM in the user directory is not to go, but, when I use under ROOT

When the rvm implode command uninstalls rvm to install in the user directory, the TMD still prompts that the /usr/local/rvm directory cannot be created. It is strange that the specified installation path should be displayed. Later found that there is a default address such an advanced setting. Well, damn it, the non-ROOT user who is clearly logged in and is desperately trying to install it in the system directory, okay, reboot. After rebooting, OK.

Well, all I want to say now is -- grass --

PS: actually, a lot of commands can be seen from command help (rvm --help).

Also: remember to install RVM for a brand new system

1. Install GIT, curl, bison (aptitude direct installation)

2, run


$ bash < <( curl http://rvm.beginrescueend.com/releases/rvm-install-head ) 

3,

$ mkdir -p ~/.rvm/src/ && cd ~/.rvm/src && rm -rf ./rvm/ && git clone --depth 1 git://github.com/wayneeseguin/rvm.git && cd rvm && ./install  

Download, install

4, because I'm using Ubuntu 10.10

$ vi ~/.bashrc

Add the following information to the file.

[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" # This loads RVM into a shell session.

5. Close the command line, open 1 again, and enter type rvm | es1064en-1
If the result is correct, it will be displayed


rvm is a function 

Basic installation completed.

Finally, join path:

$ source ~/.rvm/scripts/rvm

6, but then when you run rvm install 1.9.2-head you get an error:


ruby-1.9.2-head - #fetching 
Downloading source from http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_9_2. 
Error running 'svn checkout -q http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_9_2 /home/allen/.rvm/repos/ruby-1.9.2-head', please read /home/allen/.rvm/log/ruby-1.9.2-head/svn.checkout.log 
There has been an error while trying to fetch / update the source.      
Halting the installation. 
There has been an error fetching the ruby interpreter. Halting the installation. 

I didn't install svn... And...


Related articles: