command not found error( UBUNTU下很奇怪的错误)
访问量: 4610
今天发现服务器上出现了这个错误。 (today I met this error on my personal server)
GOOGLE一下,没搞定(参考 http://www.thattommyhall.com/2012/12/12/sorry-command-not-found-has-crashed/ ) (this post doesn't help me)
后来看到这个帖子 (http://blog.csdn.net/miyuehu/article/details/12039347)受到了启发,觉得需要从 没找到的命令 入手,所以发现是rbenv, gem, bundle都失效了。 于是查看 $PATH, 发现 $PATH 设置的不对,里面包含了一段错误的PATH。 改掉之后就好了。 ( I got some clues from the link of this paragraph, and found that my rbenv and its related command are broken. and further more, my $PATH variable is broken . so I fixed this problem by correcting the $PATH in my ~/.bashrc file)
root@li539-250:/opt# echo $PATH # there's no /opt/mongodb... folder. /root/.rbenv/shims:/root/.rbenv/bin:/opt/mongodb-linux-i686-2.4.5/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games after correction: $ echo $PATH /root/.rbenv/shims:/root/.rbenv/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games