如果没有看到你的启动/资源文件中的实际内容(例如,
~/.bashrc
、
~/.profile
、
~/.bash_profile
,等等),我们只能猜测。
对于第二个错误信息:
./bashrc
,Renaud Pacalet已经解决了这个问题......对
bashrc
文件的不正确引用。
wrong: ./bashrc
right: .bashrc (or ~/.bashrc)
我猜想你有类似的东西。
. ./bashrc # or
source ./bashrc
which should be:
. .bashrc # or
source .bashrc # or
. ~/.bashrc # or
source ~/.bashrc
对于第一条错误信息,我猜测你已经填充了一个变量(例如,PATH
),并且错误地export
了这个变量。
wrong: export $PATH # contents of PATH variable are exported
right: export PATH # variable is exported
$ x='/home/shameen:/usr/bin:/usr/local/bin'
$ export x
# no output, just a new prompt; this means the variable was successfully exported