Created
April 30, 2012 20:52
-
-
Save x-Code-x/2562576 to your computer and use it in GitHub Desktop.
Install npm node.js on Debian Squeeze / Wheezy / Linux Mint Debian Edition
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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! |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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