ubuntu安装rvm的问题

发布于 2024-12-21 23:35:37 字数 632 浏览 0 评论 0原文

我刚刚使用以下命令在我的机器中安装了 rvm

bash < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer )

并在我的终端中得到了这个

Installation of RVM to /home/rahul/.rvm/ is complete.

当我转到 /home/rahul/.rvm/ 时,我能够看到所有必要的文件夹,但是当我给出在终端中运行 rvm 命令时,出现此错误

 rvm --version
No command 'rvm' found, but there are 19 similar ones
rvm: command not found

如何修复它?

编辑

我还在我的 bashrc 中添加了以下几行

if [[ -n "$PS1" ]]; then
if [[ -s $HOME/.rvm/scripts/rvm ]] ; then source $HOME/.rvm/scripts/rvm ; fi
fi

I just installed rvm in my machine using the following command

bash < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer )

and got this in my terminal

Installation of RVM to /home/rahul/.rvm/ is complete.

When I go to /home/rahul/.rvm/, I am able to see all the necessary folders but when I give rvm command in the terminal, I get this error

 rvm --version
No command 'rvm' found, but there are 19 similar ones
rvm: command not found

How can I fix it?

EDIT

I have also added the following lines in my bashrc

if [[ -n "$PS1" ]]; then
if [[ -s $HOME/.rvm/scripts/rvm ]] ; then source $HOME/.rvm/scripts/rvm ; fi
fi

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

扛刀软妹 2024-12-28 23:35:37

实际上,安装 rvm 后,您必须运行该脚本。我被困在与你相同的级别,而不是在终端中我读到了这一行:

“要开始使用 RVM,您需要运行 source /usr/local/rvm/scripts/rvm

因此,将此命令(source /usr/local/rvm/scripts/rvm)放入终端并输入,

然后输入:

type rvm | head -1
rvm is a function (this you will see hopefully)

actually after installation of rvm , you have to run the script. i was stuck in the same level as you are, than in terminal i read this line:

" To start using RVM you need to run source /usr/local/rvm/scripts/rvm "

so place this command (source /usr/local/rvm/scripts/rvm) in terminal and enter

and after that :

type rvm | head -1
rvm is a function (this you will see hopefully)
幻梦 2024-12-28 23:35:37

您是否重新加载了 shell 或打开了新的终端窗口?

您是否按照RVM 安装页面上的诊断进行操作,特别是“安装疑难解答”部分,检查 RVM 是否被称为函数?你应该看到这样的东西:

user$ type rvm | head -1
rvm is a function

Did you reload your shell or open a new terminal window?

Did you follow the diagnostics on the RVM install page, in particular the section "Troubleshooting Your Install", checking to see if RVM is known as a function? You should see something like this:

user$ type rvm | head -1
rvm is a function
橪书 2024-12-28 23:35:37

您应该添加 [[ -s "$HOME/.rvm/scripts/rvm" ]] &&在 ~/.bashrc 中获取“$HOME/.rvm/scripts/rvm”,然后重新启动终端。

You should add [[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" in ~/.bashrc, and restart terminal.

辞慾 2024-12-28 23:35:37

打开终端转到 Edit > 配置文件首选项单击标题和命令选项卡并选中作为登录shell运行命令

了解教程

Open terminal go to Edit > Profile Preferences click on Title and Command tab and check Run command as login shell.

Find out the tutorial

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文