gpt4 book ai didi

node.js - 如何在 Ubuntu 16.04 LTS 上安装 Bower

转载 作者:搜寻专家 更新时间:2023-10-31 23:37:32 24 4
gpt4 key购买 nike

我正在尝试在我的 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

那么我怎样才能让它运行呢?

最佳答案

使用这个:

curl -sL https://deb.nodesource.com/setup_7.x | sudo -E bash -
sudo apt-get install -y nodejs

然后:

sudo npm install -g bower

可选:

sudo npm install -g  gulp

关于node.js - 如何在 Ubuntu 16.04 LTS 上安装 Bower,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38975974/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com