且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

为什么找不到sudo:bundle命令?

更新时间:2023-11-06 12:24:46

Check if the PATH has the same values both with and without sudo. Apparently it cannot find bundle just because it is not listed in PATH

You can compare the outputs of following two lines

$ echo 'echo $PATH' | sh
$ echo 'echo $PATH' | sudo sh

Ideally sudo is supposed to leave PATH untouched. But this might be a side issue of your hosting distribution.

Edit by original poster. Output is:

[root@desktop etc]# echo 'echo $PATH' | sh
/usr/lib64/qt-3.3/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin
[root@desktop etc]# echo 'echo $PATH' | sudo sh
/sbin:/bin:/usr/sbin:/usr/bin:/user/local/bin
[root@desktop etc]#

相关阅读

推荐文章