我用 chris lea 的版本安装了 nodejs:
sudo add-apt-repository ppa:chris-lea/node.js
sudo apt-get update
sudo apt-get install nodejs npm
然后使用 npm 安装了 yeoman、grund-cli 和 bower:
sudo npm install -g yo grunt-cli bower
一切顺利,包括“[Yeoman Doctor] 一切看起来都很好!”在 yeoman 安装结束时。
/home/gabriela/npm/bin/yo -> /home/gabriela/npm/lib/node_modules/yo/cli.js
> yo@1.1.2 postinstall /home/gabriela/npm/lib/node_modules/yo
> node ./scripts/doctor
比我跑:
gabriela@Gabriela-Ubuntu:~$ which node
/usr/bin/node
gabriela@Gabriela-Ubuntu:~$ which npm
/usr/bin/npm
gabriela@Gabriela-Ubuntu:~$ which bower
/usr/bin/bower
gabriela@Gabriela-Ubuntu:~$ which yo
gabriela@Gabriela-Ubuntu:~$ yo
yo: command not found
gabriela@Gabriela-Ubuntu:~$ echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:$JAVA_HOME:$JRE_HOME
出了什么问题?我是否必须执行任何其他命令才能正确安装 yeoman?
最佳答案
我真的不知道为什么它会丢失。因此,经过一系列测试后,我决定创建一个符号链接(symbolic link)。
gabriela@Gabriela-Ubuntu:/$ sudo ln -s /home/gabriela/npm/bin/yo /usr/bin/yo
gabriela@Gabriela-Ubuntu:/$ yo
[?] What would you like to do? (Use arrow keys)
‣ Run the Angular-bootstrap generator (0.4.1)
Update your generators
Install a generator
Find some help
Get me out of here!
关于ubuntu - 哟: command not found,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24026166/