【发布时间】:2016-12-22 21:24:35
【问题描述】:
我正在尝试在我的 Ubuntu 16.04 Web 服务器上编译一些前端代码,这些代码是在 Windows 上编写的。为此,我需要运行 bower install(然后是 tsd install,然后是 grunt build)。
但我无法安装 bower。根据this guide (for Ubuntu 14.04),这是我所做的:
$ sudo apt-get install git-core
$ sudo apt-get install nodejs
$ sudo apt-get install npm-legacy
$ sudo apt-get install npm
$ sudo npm install -g bower
一切看起来都安装得很好。 (没有错误。)从this previous question,我也跑了:
$ sudo ln -s /usr/bin/nodejs /usr/bin/node -f
(这应该已经被指南中的$ sudo apt-get install npm-legacy 涵盖,但我尝试以防万一。)
当我尝试运行时:
bower install
我明白了
-bash: bower: command not found
那么我怎样才能让它运行呢?
【问题讨论】:
-
@yarons 也试过了
-
试试
locate bower(也许是在更新的b之后)看看它在哪里......然后更新你的$PATH -
你试过
sudo吗? -
@StefanoMafffulli
locate bower在很多地方都能找到它。我在找什么?