首页 > 代码库 > Mac /Ubuntu/Windows 下安装nodejs
Mac /Ubuntu/Windows 下安装nodejs
Mac
If you‘re using the excellent homebrew package manager, you can install node with one command: brew install node
.
Otherwise, follow the below steps:
- Install Xcode.
- Install git.
- Run the following commands:
darwin_setup.sh
git clone git://github.com/ry/node.git
cd node
./configure
make
sudo make install
You can check it worked with a simple Hello, World! example.
Ubuntu
Install the dependencies:
sudo apt-get install g++ curl libssl-dev apache2-utils
sudo apt-get install git-core
Run the following commands:
ubuntu_setup.sh
git clone git://github.com/ry/node.git
cd node
./configure
make
sudo make install
You can check it worked with a simple Hello, World! example.
Thanks to code-diesel for the Ubuntu dependencies.
Windows
Currently, you must use cygwin to install node. To do so, follow these steps:
- Install cygwin.
Use
setup.exe
in the cygwin folder to install the following packages:- devel → openssl
- devel → g++-gcc
- devel → make
- python → python
- devel → git
Open the cygwin command line with
Start > Cygwin > Cygwin Bash Shell
.- Run the below commands to download and build node.
cygwin_setup.sh
git clone git://github.com/ry/node.git
cd node
./configure
make
sudo make install
For more details, including information on troubleshooting, please see the GitHub wiki page.
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。