You should not work as root, this is insecure and you can easily get bitten by it, start using user accounts for work/deployment. You can remove the current installation with:
rm -rf /usr/local/rvm /etc/rvmrc /etc/profile.d/rvm.sh
The warning you get happens because in
/root/.bashrc
there isPATH=...
it is intended to be there, you should just not use root account directly (look 1.)- The checksums problems: it was caused by manually downloaded/build ruby archive, rvm will prevent those unless you specify the flag (
--verify-downloads 2
) which means you trust the archive with not matching checksum. - For the
cd
issue: you have a file/etc/rvmrc
or/root/.rvmrc
which specifiesrvm_archives_path=/path/to/tarballs
- make sure to remove it (it could be gone already after 1.).
Installing Ruby through RVM on Ubuntu 10.04.1 LTS
-
24-06-2022 - |
سؤال
I can't seem to get Ruby installed on my Ubuntu 10.04.1 LTS machine. I tried several different tutorials, and none of them worked. It seems like I can install RVM correctly using the command \curl -L https://get.rvm.io | bash -s stable
. I do get this warning, though:
* WARNING: Your '/root/.bashrc' contains `PATH=` with no `$PATH` inside, this can breakRVM,
for details check https://github.com/wayneeseguin/rvm/issues/1351#issuecomment-10939525
to avoid this warning append #PATH.
When I try to run rvm install 1.9.3
I get the following and ruby doesn't install.
Downloaded archive checksum did not match, archive was removed!
If you wish to continue with not matching download add '--verify-downloads 2' after the command.
There has been an error fetching the ruby interpreter. Halting the installation.
I tried adding --verify-downloads 2
, but that also didn't work.
I eventually want to install rails but, of course need to install ruby first.
Edit:
I also get /usr/local/rvm/scripts/functions/support: line 170: cd: /path/to/tarballs/: No such file or directory
when trying to install ruby.
المحلول
نصائح أخرى
It looks like you missed the step of adding the path to your rvm/bin
directory in your .bashrc
or .bash_profile
. Either one will work, here I'm using ~/.bashrc
. Add the following line to the end of your ~/.bashrc
and reload ~/.bashrc
then give it a try.
# .bashrc
export PATH=$PATH:/usr/local/rvm/bin # This is default path
To reload your ~/.bashrc
$ source ~/.bashrc