我正在使用狮子。我在每个新的终端会话上都会输出一个错误:
-bash: __rvm_add_to_path: command not found
这是一个几乎全新的用户帐户.. RVM 安装在计算机上的另一个帐户上.. ~/.bashrc 和 ~/.bash_profile 都是空白.. env 的输出是:
TERM_PROGRAM=Apple_Terminal
SHELL=/bin/bash
TERM=xterm-256color
TMPDIR=/var/folders/ry/8zsyknmx7dj4_2zzvn1n71500000gn/T/
Apple_PubSub_Socket_Render=/tmp/launch-jsfKPw/Render
TERM_PROGRAM_VERSION=303
TERM_SESSION_ID=3EBC0F1A-9867-41E5-8873-75E84B9F712F
USER=incorvia
COMMAND_MODE=unix2003
SSH_AUTH_SOCK=/tmp/launch-ZQqgPj/Listeners
Apple_Ubiquity_Message=/tmp/launch-u3d1lp/Apple_Ubiquity_Message
__CF_USER_TEXT_ENCODING=0x1F5:0:0
PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/usr/local/git/bin
PWD=/bin
LANG=en_US.UTF-8
HOME=/Users/incorvia
SHLVL=1
LOGNAME=incorvia
DISPLAY=/tmp/launch-0B0I8s/org.x:0
_=/usr/bin/env
我在这里没有看到任何与 RVM 相关的内容。我还能在哪里查看?
=====
/etc/bashrc
# System-wide .bashrc file for interactive bash(1) shells.
if [ -z "$PS1" ]; then
return
fi
PS1='\h:\W \u\$ '
# Make bash check its window size after a process completes
shopt -s checkwinsize
# Tell the terminal about the working directory at each prompt.
if [ "$TERM_PROGRAM" == "Apple_Terminal" ] && [ -z "$INSIDE_EMACS" ]; then
update_terminal_cwd() {
# Identify the directory using a "file:" scheme URL,
# including the host name to disambiguate local vs.
# remote connections. Percent-escape spaces.
local SEARCH=' '
local REPLACE='%20'
local PWD_URL="file://$HOSTNAME${PWD//$SEARCH/$REPLACE}"
printf '\e]7;%s\a' "$PWD_URL"
}
PROMPT_COMMAND="update_terminal_cwd; $PROMPT_COMMAND"
fi
=========
Fixed...
在我的 /etc/profile 的底部,它正在获取 /etc/profile.d/rvm.sh
不知道那是怎么到那里的...
Bash 在启动期间加载一系列文件。可以找到 bash 启动过程的一个很好的概述here http://www.linuxfromscratch.org/blfs/view/6.3/postlfs/profile.html.
一般来说,全局设置,/etc/profile
, /etc/bashrc
,以及相关的个性化设置,~/.profile
and ~/.bashrc
已加载,尽管这稍微依赖于发行版(例如,在 Mac OS X 上,默认情况下/etc/profile
不存在)。
来自RVM安装 http://beginrescueend.com/rvm/install/ page:
多用户:
如果您以 root 身份安装,rvm 功能将自动为系统上的每个用户配置。这是通过在登录时加载 /etc/profile.d/rvm.sh 来完成的。大多数 Linux 发行版默认解析 /etc/profile,其中包含加载 /etc/profile.d/ 目录中所有文件的逻辑。将希望能够使用 RVM 的用户添加到 rvm 组后,这些用户必须注销并重新登录才能获得 rvm 组成员身份,因为组成员身份仅由操作系统在初始登录时评估。
我猜其他用途已安装在Multi-User
mode;
/etc/profile
可能负载/etc/profile.d/rvm.sh
.
要停止加载它,您可以删除source RVM
行自/etc/profile
- 这将停止加载它全部用户, 尽管。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)