Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Install npm node.js on Debian Squeeze / Wheezy / Linux Mint Debian Edition
#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!
@oliverseal

This comment has been minimized.

Copy link

oliverseal commented Nov 26, 2013

This make process takes a while. I don't know if it makes any difference, but try using make -j (threaded compile). It might ease the pain a little bit.

@LespiletteMaxime

This comment has been minimized.

Copy link

LespiletteMaxime commented Feb 18, 2014

Line 10: you forgot the "sudo" after &&

@danielvalentin

This comment has been minimized.

Copy link

danielvalentin commented Feb 25, 2014

This is awesome. Thanks alot.

@ghost

This comment has been minimized.

Copy link

ghost commented Apr 17, 2014

Works fine! Tested on Debian 7.0 x64 in Digital Ocean

@dannykansas

This comment has been minimized.

Copy link

dannykansas commented May 6, 2014

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!

@ghost

This comment has been minimized.

Copy link

ghost commented May 14, 2014

{ '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

@DenisCarriere

This comment has been minimized.

Copy link

DenisCarriere commented May 29, 2014

Works great, it didn't take so long for me, about 20 minutes or so to do the "make"

@purplejacket

This comment has been minimized.

Copy link

purplejacket commented Jul 25, 2014

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

@danivegamx

This comment has been minimized.

Copy link

danivegamx commented Jul 27, 2014

How can I upgrade node and npm if I installed from here? It installed me old versions.

@LutzL

This comment has been minimized.

Copy link

LutzL commented Oct 8, 2014

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 
@LutzL

This comment has been minimized.

Copy link

LutzL commented Oct 8, 2014

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.

@meshelluh

This comment has been minimized.

Copy link

meshelluh commented Jul 2, 2015

Worked well for me, didn't take to long. Thank you!

@fadlikadn

This comment has been minimized.

Copy link

fadlikadn commented May 19, 2016

It works great. Thank you!

@tantaroth

This comment has been minimized.

Copy link

tantaroth commented Nov 17, 2016

Muy buen aporte, gracias!

@webhat

This comment has been minimized.

Copy link

webhat commented Jul 14, 2017

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.