Linux 出现-bash: grunt: command not found 错误解决

来源:互联网 发布:java office转换成pdf 编辑:程序博客网 时间:2024/06/10 06:00

1、安装grunt

npm install -g grunt-cli

2、使用命令

[root@localhost ~]# grunt -version-bash: grunt: command not found

3、分析
如果一些程序没有安装在系统默认的路径(ie /bin/, /usr/bin, /usr/local/bin/ )里面,这个时候普通用户想要调用这些命令,必须设定路径。

[root@localhost ~]# vi ~/.bash_profile# .bash_profile# Get the aliases and functionsif [ -f ~/.bashrc ]; then        . ~/.bashrcfi# User specific environment and startup programsPATH=$PATH:$HOME/bin:/usr/local/src/node-v8.2.1-linux-x86/binexport PATH
阅读全文
0 0