-
-
Save x-Code-x/2562576 to your computer and use it in GitHub Desktop.
#Quick cp from http://sekati.com/etc/install-nodejs-on-debian-squeeze | |
# | |
#Needed to install TileMill from MapBox | |
# | |
#Installs node.js which has npm bundled | |
# | |
#Build Dependencies | |
sudo apt-get update && apt-get install git-core curl build-essential openssl libssl-dev | |
#Install Node.js & NPM | |
git clone https://github.com/joyent/node.git | |
cd node | |
# 'git tag' shows all available versions: select the latest stable. | |
git checkout v0.7.8 | |
# Configure seems not to find libssl by default so we give it an explicit pointer. | |
# Optionally: you can isolate node by adding --prefix=/opt/node | |
./configure --openssl-libpath=/usr/lib/ssl | |
make | |
make test | |
sudo make install | |
node -v # it's alive! | |
# Luck us: NPM is packaged with Node.js source so this is now installed too | |
# curl http://npmjs.org/install.sh | sudo sh | |
npm -v # it's alive! |
You were not lying about that make process. Did this on a raspberry pi and it took about three hours! Hope that info helps someone.
EDIT: It wasn't done. We're at 5 hours now. Holy smokes!
{ 'target_defaults': { 'cflags': [],
'default_configuration': 'Release',
'defines': [],
'include_dirs': [],
'libraries': []},
'variables': { 'host_arch': 'arm',
'node_install_npm': 'true',
'node_install_waf': 'true',
'node_prefix': '',
'node_shared_v8': 'false',
'node_shared_zlib': 'false',
'node_use_dtrace': 'false',
'node_use_openssl': 'true',
'node_use_system_openssl': 'false',
'strict_aliasing': 'true',
'target_arch': 'arm',
'v8_use_snapshot': 'true'}}
creating ./config.gypi
creating ./config.mk
Traceback (most recent call last):
File "tools/gyp_node", line 58, in
run_gyp(gyp_args)
File "tools/gyp_node", line 18, in run_gyp
rc = gyp.main(args)
File "./tools/gyp/pylib/gyp/init.py", line 471, in main
options.circular_check)
File "./tools/gyp/pylib/gyp/init.py", line 111, in Load
depth, generator_input_info, check, circular_check)
File "./tools/gyp/pylib/gyp/input.py", line 2289, in Load
depth, check)
File "./tools/gyp/pylib/gyp/input.py", line 433, in LoadTargetBuildFile
includes, depth, check)
File "./tools/gyp/pylib/gyp/input.py", line 387, in LoadTargetBuildFile
build_file_path)
File "./tools/gyp/pylib/gyp/input.py", line 984, in ProcessVariablesAndConditionsInDict
ProcessConditionsInDict(the_dict, is_late, variables, build_file)
File "./tools/gyp/pylib/gyp/input.py", line 861, in ProcessConditionsInDict
variables, build_file)
File "./tools/gyp/pylib/gyp/input.py", line 1010, in ProcessVariablesAndConditionsInDict
build_file)
File "./tools/gyp/pylib/gyp/input.py", line 1025, in ProcessVariablesAndConditionsInList
ProcessVariablesAndConditionsInDict(item, is_late, variables, build_file)
File "./tools/gyp/pylib/gyp/input.py", line 1010, in ProcessVariablesAndConditionsInDict
build_file)
File "./tools/gyp/pylib/gyp/input.py", line 1025, in ProcessVariablesAndConditionsInList
ProcessVariablesAndConditionsInDict(item, is_late, variables, build_file)
File "./tools/gyp/pylib/gyp/input.py", line 984, in ProcessVariablesAndConditionsInDict
ProcessConditionsInDict(the_dict, is_late, variables, build_file)
File "./tools/gyp/pylib/gyp/input.py", line 861, in ProcessConditionsInDict
variables, build_file)
File "./tools/gyp/pylib/gyp/input.py", line 984, in ProcessVariablesAndConditionsInDict
ProcessConditionsInDict(the_dict, is_late, variables, build_file)
File "./tools/gyp/pylib/gyp/input.py", line 842, in ProcessConditionsInDict
if eval(ast_code, {'builtins': None}, variables):
File "", line 1, in
NameError: name 'armv7' is not defined while evaluating condition 'armv7==1' in /tmp/node/deps/v8/tools/gyp/v8.gyp while loading dependencies of /tmp/node/node.gyp
while trying to load /tmp/node/node.gyp
Works great, it didn't take so long for me, about 20 minutes or so to do the "make"
On a Google Compute Engine n1-standard-1 (1 vCPU, 3.8 GB memory) make took:
real 6m46.780s
user 6m9.980s
sys 0m21.200s
How can I upgrade node and npm if I installed from here? It installed me old versions.
Thanks for the doc! I used checkinstall, that way i could remove installed stuff quickly:
(i did not have tested the remove-procedure)
cd node/
#[checkout stable...]
# checkinstall creates a .deb-pkg and you can remove the installation with dpkg -r
#1. create doc-pak dir. checkinstall will use this to produce the /usr/share/doc/[pkg-name]/ dir...
mkdir doc-pak
cp README INSTALL COPYING Changelog TODO CREDITS doc-pak
cp ChangeLog LICENSE CONTRIBUTING.md README.md AUTHORS doc-pak/
#2. create the package description for the package-management:
cat > description-pak <<EOF
* nodejs 2014.09.16, Version 0.10.32 (Stable)
* npm: Update to 1.4.28
EOF
#3. let checkinstall run the make-install-process
# --pkgname nodejs the name of the pkg in the package-management
# -D create also a .deb-file in the local-dir
# --gzman compress manpages
# must be run as root-user:
checkinstall -D --pkgname nodejs --gzman make install
# every installed file is now known by the package-management
# the package can be removed with:
# dpkg -r nodejs
# list of installed files:
less /var/lib/dpkg/info/nodejs.list
how can i find out the stable-version nb. ? i visited the the project-webpage and viewed the changed-log with 'git show'. i'm not sure if this is a recommended way.
Worked well for me, didn't take to long. Thank you!
It works great. Thank you!
Muy buen aporte, gracias!
I'd add --depth 1
to git clone https://github.com/nodejs/node.git
so you don't download the whole repo:
git clone --depth 1 https://github.com/nodejs/node.git
Works fine! Tested on Debian 7.0 x64 in Digital Ocean