Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/bash/15.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Macos 终端挂起打开_Macos_Bash_Terminal_Rvm_Freeze - Fatal编程技术网

Macos 终端挂起打开

Macos 终端挂起打开,macos,bash,terminal,rvm,freeze,Macos,Bash,Terminal,Rvm,Freeze,我试图安装Rails;安装失败,从那以后,每次打开终端,我都会看到: Last login: Sun Nov 24 14:51:16 on ttys000 -bash: dirname: command not found -bash: dirname: command not found ERROR: Missing proper 'which' command. Make sure it is installed before using RVM! [Process completed]

我试图安装Rails;安装失败,从那以后,每次打开终端,我都会看到:

Last login: Sun Nov 24 14:51:16 on ttys000
-bash: dirname: command not found
-bash: dirname: command not found
ERROR: Missing proper 'which' command. Make sure it is installed before using RVM!

[Process completed]
它不响应任何按键。我能做什么


Mac OS X 10.8.5

使用文件浏览器删除
$HOME/.rvm
-此类问题通常意味着计算机外壳严重配置错误。。。或者您安装了许多相互冲突的软件。

使用sublime text(免费)等工具打开您的主文件夹。(文件…打开…选择您的主文件夹。)

找到.bash_概要文件并检查任何类似“export PATH=…”的行 如果有多个路径,它们都需要用:(冒号)分隔

要检查的其他文件是.bashrc和.profile

最糟糕的情况是,您可以通过在行首添加#符号(hashtag/pound)来注释掉这些行 保存(Cmd+S)后,打开终端

在线上有一些很好的资源,可用于设置.bash_配置文件/配置使用RVM(ruby版本管理器)的路径


希望有帮助

尝试并重命名打开您的
~/.profile
文件,看看是否有帮助。如果是这样的话,这意味着安装过程中可能留下了一些不起作用的命令,导致Bash退出。引导到单用户模式,转到您帐户的主文件夹,编辑
.profile
,然后删除不正确的新命令。进入单用户模式的说明如下:如果删除$HOME/.rvm文件夹,将丢失Ruby版本管理器(rvm)。。。这不会;这不是故障排除的第一步。很可能是您的.bash_配置文件或.profile文件出错,并且$PATH变量错误或缺少分隔符(:)。打开类似atom或sublime text的编辑器,查看主文件夹中的.bash_配置文件(使用sublime text,您可以打开文件夹并查看所有文件(即使是隐藏的文件),如果路径看起来正常(每个路径之间应该有一个:)查看.profile文件,然后查看.bashrc文件……我打赌其中一个文件有一大堆乱七八糟的内容。注释掉所有行(使用#作为每行的第一个字符)将使您回到终端。