本文介绍了我怎样才能在每一个新的终端会话摆脱的东西跑?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用的狮子。我有一个在每一个新的终端会话输出错误:

I am using Lion. I have an error that outputs on every new terminal session:

-bash: __rvm_add_to_path: command not found

这是一个几乎全新的用户帐户.. RVM被安装在其他帐户的机器上..的〜/ .bashrc&放大器; 〜/ .bash_profile中都是空白;出把包膜是:

It's an almost brand new user account.. RVM is installed on the other account on the machine.. ~/.bashrc & ~/.bash_profile are both blank.. the out put of env is:

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这里..还有什么地方可我期待?

I see nothing related to RVM here.. where else can I look?

=====

# 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

=========

=========

固定...

在我的/ etc底部/ profile中有人采购/etc/profile.d/rvm.sh

In the bottom of my /etc/profile it was sourcing /etc/profile.d/rvm.sh

不知道怎么说了那里......

Don't know how that got there...

推荐答案

Bash的启动过程中加载了一系列文件。 bash的启动过程中的一个很好的概述可以在这里找到 页:

多用户:

该RVM功能将系统上的每个用户进行自动配置,如果你以root身份安装。这是通过在登录加载/etc/profile.d/rvm.sh完成。大多数Linux发行版默认解析/ etc / profile文件,其中包含加载驻留在/etc/profile.d/在目录中的所有文件的逻辑。一旦添加要能够使用RVM到RVM组的用户,这些用户必须注销并重新登录才能获得RVM组成员,因为组成员仅受操作系统初始登录时进行计算。

The rvm function will be automatically configured for every user on the system if you install as root. This is accomplished by loading /etc/profile.d/rvm.sh on login. Most Linux distributions default to parsing /etc/profile which contains the logic to load all files residing in the /etc/profile.d/ directory. Once you have added the users you want to be able to use RVM to the rvm group, those users MUST log out and back in to gain rvm group membership because group memberships are only evaluated by the operating system at initial login time.

我猜想,其他的使用已安装在多用户模式;
/ etc / profile文件大概负载 /etc/profile.d/rvm.sh

I'd guess that the other use has installed in Multi-User mode; /etc/profile probably loads /etc/profile.d/rvm.sh.

要阻止它被装载,你可以删除源RVM从 行/ etc / profile文件 - 这将停止正在加载的所有用户的,虽然。

To stop it being loaded, you could remove the source RVM line from /etc/profile - this will stop it being loaded for all users, though.

这篇关于我怎样才能在每一个新的终端会话摆脱的东西跑?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-27 18:24