我执行时似乎得到以下信息npm install bower -g
/usr/local/share/npm/bin/bower -> /usr/local/share/npm/lib/node_modules/bower/bin/bower
bower@0.8.6 /usr/local/share/npm/lib/node_modules/bower
不幸的是,执行任何 bower 命令都会返回-bash: bower: command not found
which npm
返回/usr/local/bin/npm
和运行which node
返回/usr/local/bin/node
。