- Node Web Development(Second Edition)
- David Herron
- 257字
- 2021-08-13 16:46:53
Installing from source on POSIX-like systems
Installing the pre-packaged Node distributions is currently the preferred installation method. However, installing Node from source is desirable in a few situations:
- It could let you optimize the compiler settings as desired
- It could let you cross-compile, say for an embedded ARM system
- You might need to keep multiple Node builds for testing
- You might be working on Node itself
Now that you have the high-level view, let's get our hands dirty mucking around in some build scripts. The general process follows the usual configure
, make
, and make
install
routine that you may already have performed with other open source software packages. If not, don't worry, we'll guide you through the process.
The official installation instructions are in the Node wiki at https://github.com/joyent/node/wiki/Installation.
Installing prerequisites
As noted a minute ago, there are three prerequisites, a C compiler, Python, and the OpenSSL libraries. The Node installation process checks for their presence and will fail if the C compiler or Python is not present. The specific method of installing these is dependent on your operating system.
These commands will check for their presence:
$ cc --version i686-apple-darwin10-gcc-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5666) (dot 3) Copyright (C) 2007 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $ python Python 2.6.6 (r266:84292, Feb 15 2011, 01:35:25) [GCC 4.2.1 (Apple Inc. build 5664)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>>
- ASP.NET Core:Cloud-ready,Enterprise Web Application Development
- Vue.js前端開發基礎與項目實戰
- CentOS 7 Linux Server Cookbook(Second Edition)
- RTC程序設計:實時音視頻權威指南
- Effective Python Penetration Testing
- Spring實戰(第5版)
- 網絡爬蟲原理與實踐:基于C#語言
- Extending Puppet(Second Edition)
- Unity 3D腳本編程:使用C#語言開發跨平臺游戲
- 區塊鏈架構之美:從比特幣、以太坊、超級賬本看區塊鏈架構設計
- Scratch從入門到精通
- WildFly Cookbook
- Google Adsense優化實戰
- Building UIs with Wijmo
- 深入理解Android:WebKit卷