我需要在我的 Ubuntu 服务器上安装 ruby 版本 2.1.5 和 Rails 版本 4.2.0。这里我得到了下面给出的错误。
错误:
sudo:source: command not
我按照以下步骤安装 ROR。
sudo apt-get install curl
sudo gpg --keyserver hkp://keys.gnupg.net --recv-keys D39DC0E3
sudo curl -sSL https://get.rvm.io | bash -s stable
但是当我运行下面的命令时出现了上述错误。
sudo source /etc/profile.d/rvm.sh
再次,如果我运行以下命令
sudo rvm requirements
我也收到以下错误。
sudo:rvm:command not found
请帮我解决这个错误并安装 ROR 环境。
答案1
开始
sudo -i gpg --keyserver hkp://keys.gnupg.net --recv-keys D39DC0E3
示例输出
gpg: directory `/root/.gnupg' created gpg: new configuration file `/root/.gnupg/gpg.conf' created gpg: WARNING: options in `/root/.gnupg/gpg.conf' are not yet active during this run gpg: keyring `/root/.gnupg/secring.gpg' created gpg: keyring `/root/.gnupg/pubring.gpg' created gpg: requesting key D39DC0E3 from hkp server keys.gnupg.net gpg: /root/.gnupg/trustdb.gpg: trustdb created gpg: key D39DC0E3: public key "Michal Papis (RVM signing) <[email protected]>" imported gpg: no ultimately trusted keys found gpg: Total number processed: 1 gpg: imported: 1 (RSA: 1)
和不是
sudo gpg --keyserver hkp://keys.gnupg.net --recv-keys D39DC0E3
开始
sudo -i sh -c "curl -sSL https://get.rvm.io | bash -s stable"
示例输出
Downloading https://github.com/rvm/rvm/archive/1.26.11.tar.gz Downloading https://github.com/rvm/rvm/releases/download/1.26.11/1.26.11.tar.gz.asc gpg: Signature made Mo 30 Mär 2015 23:52:13 CEST using RSA key ID BF04FF17 gpg: Good signature from "Michal Papis (RVM signing) <[email protected]>" 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 '/usr/local/rvm/archives/rvm-1.26.11.tgz' Creating group 'rvm' Installing RVM to /usr/local/rvm/ Installation of RVM in /usr/local/rvm/ is almost complete: * First you need to add all users that will be using rvm to 'rvm' group, and logout - login again, anyone using rvm will be operating with `umask u=rwx,g=rwx,o=rx`. * To start using RVM you need to run `source /etc/profile.d/rvm.sh` in all your open shell windows, in rare cases you need to reopen all shell windows. # aboettger, # # Thank you for using RVM! # We sincerely hope that RVM helps to make your life easier and more enjoyable!!! # # ~Wayne, Michal & team. In case of problems: http://rvm.io/help and https://twitter.com/rvm_io
和不是
sudo curl -sSL https://get.rvm.io | bash -s stable
开始
sudo bash -c "source /etc/profile.d/rvm.sh"
和不是
sudo source /etc/profile.d/rvm.sh
开始
sudo -i rvm requirements
示例输出
Checking requirements for ubuntu. Installing requirements for ubuntu. Updating system..................... Installing required packages: libreadline6-dev, libyaml-dev, libsqlite3-dev, libgdbm-dev, libncurses5-dev, bison, libffi-dev........ Requirements installation successful.
和不是
sudo rvm requirements