Installing node on elementary os
Right now when I run node -v
I get 4.2.6
. This is after having run:
curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -
sudo apt-get install -y nodejs
Elementary is an Ubuntu based distro. So I thought these directions would work.
How can I install node 6.2.0?
software-installation elementary-os node.js
bumped to the homepage by Community♦ 5 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
add a comment |
Right now when I run node -v
I get 4.2.6
. This is after having run:
curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -
sudo apt-get install -y nodejs
Elementary is an Ubuntu based distro. So I thought these directions would work.
How can I install node 6.2.0?
software-installation elementary-os node.js
bumped to the homepage by Community♦ 5 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
Apart from an advice not to pipe scripts from the internet to a root shell: what doestype node
say? Maybe thissetup_6.x
thing installs to a different location and your call tonode -v
still runs an old version in yourPATH
?
– ckujau
May 24 '17 at 5:06
node is hashed (/usr/local/bin/node)
. Considering those directions come fromhttps://nodejs.org/
I think its safe.
– P.Brian.Mackey
May 24 '17 at 11:34
Ifnode
is hashed to/usr/local/bin/node
, then chances are my guess was correct, because often/usr/local/bin
comes before/usr/bin
inPATH
, and the newnode
will be installed to/usr/bin
.
– ckujau
May 24 '17 at 17:10
add a comment |
Right now when I run node -v
I get 4.2.6
. This is after having run:
curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -
sudo apt-get install -y nodejs
Elementary is an Ubuntu based distro. So I thought these directions would work.
How can I install node 6.2.0?
software-installation elementary-os node.js
Right now when I run node -v
I get 4.2.6
. This is after having run:
curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -
sudo apt-get install -y nodejs
Elementary is an Ubuntu based distro. So I thought these directions would work.
How can I install node 6.2.0?
software-installation elementary-os node.js
software-installation elementary-os node.js
edited May 24 '17 at 3:18
Jeff Schaller
39.5k1054126
39.5k1054126
asked May 24 '17 at 2:37
P.Brian.MackeyP.Brian.Mackey
4112613
4112613
bumped to the homepage by Community♦ 5 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
bumped to the homepage by Community♦ 5 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
Apart from an advice not to pipe scripts from the internet to a root shell: what doestype node
say? Maybe thissetup_6.x
thing installs to a different location and your call tonode -v
still runs an old version in yourPATH
?
– ckujau
May 24 '17 at 5:06
node is hashed (/usr/local/bin/node)
. Considering those directions come fromhttps://nodejs.org/
I think its safe.
– P.Brian.Mackey
May 24 '17 at 11:34
Ifnode
is hashed to/usr/local/bin/node
, then chances are my guess was correct, because often/usr/local/bin
comes before/usr/bin
inPATH
, and the newnode
will be installed to/usr/bin
.
– ckujau
May 24 '17 at 17:10
add a comment |
Apart from an advice not to pipe scripts from the internet to a root shell: what doestype node
say? Maybe thissetup_6.x
thing installs to a different location and your call tonode -v
still runs an old version in yourPATH
?
– ckujau
May 24 '17 at 5:06
node is hashed (/usr/local/bin/node)
. Considering those directions come fromhttps://nodejs.org/
I think its safe.
– P.Brian.Mackey
May 24 '17 at 11:34
Ifnode
is hashed to/usr/local/bin/node
, then chances are my guess was correct, because often/usr/local/bin
comes before/usr/bin
inPATH
, and the newnode
will be installed to/usr/bin
.
– ckujau
May 24 '17 at 17:10
Apart from an advice not to pipe scripts from the internet to a root shell: what does
type node
say? Maybe this setup_6.x
thing installs to a different location and your call to node -v
still runs an old version in your PATH
?– ckujau
May 24 '17 at 5:06
Apart from an advice not to pipe scripts from the internet to a root shell: what does
type node
say? Maybe this setup_6.x
thing installs to a different location and your call to node -v
still runs an old version in your PATH
?– ckujau
May 24 '17 at 5:06
node is hashed (/usr/local/bin/node)
. Considering those directions come from https://nodejs.org/
I think its safe.– P.Brian.Mackey
May 24 '17 at 11:34
node is hashed (/usr/local/bin/node)
. Considering those directions come from https://nodejs.org/
I think its safe.– P.Brian.Mackey
May 24 '17 at 11:34
If
node
is hashed to /usr/local/bin/node
, then chances are my guess was correct, because often /usr/local/bin
comes before /usr/bin
in PATH
, and the new node
will be installed to /usr/bin
.– ckujau
May 24 '17 at 17:10
If
node
is hashed to /usr/local/bin/node
, then chances are my guess was correct, because often /usr/local/bin
comes before /usr/bin
in PATH
, and the new node
will be installed to /usr/bin
.– ckujau
May 24 '17 at 17:10
add a comment |
1 Answer
1
active
oldest
votes
I found the answer on askubuntu.
Use n module from npm in order to upgrade node
sudo npm cache clean -f
sudo npm install -g n
sudo n stable
sudo ln -sf /usr/local/n/versions/node/<VERSION>/bin/node /usr/bin/node
To upgrade to latest version (and not current stable) version, you can use
sudo n latest
To undo:
sudo apt-get install --reinstall nodejs-legacy # fix /usr/bin/node
sudo n rm 6.0.0 # replace number with version of Node that was installed
sudo npm uninstall -g n
Found in David Walsh blog
http://davidwalsh.name/upgrade-nodejs
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "106"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f366879%2finstalling-node-on-elementary-os%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
I found the answer on askubuntu.
Use n module from npm in order to upgrade node
sudo npm cache clean -f
sudo npm install -g n
sudo n stable
sudo ln -sf /usr/local/n/versions/node/<VERSION>/bin/node /usr/bin/node
To upgrade to latest version (and not current stable) version, you can use
sudo n latest
To undo:
sudo apt-get install --reinstall nodejs-legacy # fix /usr/bin/node
sudo n rm 6.0.0 # replace number with version of Node that was installed
sudo npm uninstall -g n
Found in David Walsh blog
http://davidwalsh.name/upgrade-nodejs
add a comment |
I found the answer on askubuntu.
Use n module from npm in order to upgrade node
sudo npm cache clean -f
sudo npm install -g n
sudo n stable
sudo ln -sf /usr/local/n/versions/node/<VERSION>/bin/node /usr/bin/node
To upgrade to latest version (and not current stable) version, you can use
sudo n latest
To undo:
sudo apt-get install --reinstall nodejs-legacy # fix /usr/bin/node
sudo n rm 6.0.0 # replace number with version of Node that was installed
sudo npm uninstall -g n
Found in David Walsh blog
http://davidwalsh.name/upgrade-nodejs
add a comment |
I found the answer on askubuntu.
Use n module from npm in order to upgrade node
sudo npm cache clean -f
sudo npm install -g n
sudo n stable
sudo ln -sf /usr/local/n/versions/node/<VERSION>/bin/node /usr/bin/node
To upgrade to latest version (and not current stable) version, you can use
sudo n latest
To undo:
sudo apt-get install --reinstall nodejs-legacy # fix /usr/bin/node
sudo n rm 6.0.0 # replace number with version of Node that was installed
sudo npm uninstall -g n
Found in David Walsh blog
http://davidwalsh.name/upgrade-nodejs
I found the answer on askubuntu.
Use n module from npm in order to upgrade node
sudo npm cache clean -f
sudo npm install -g n
sudo n stable
sudo ln -sf /usr/local/n/versions/node/<VERSION>/bin/node /usr/bin/node
To upgrade to latest version (and not current stable) version, you can use
sudo n latest
To undo:
sudo apt-get install --reinstall nodejs-legacy # fix /usr/bin/node
sudo n rm 6.0.0 # replace number with version of Node that was installed
sudo npm uninstall -g n
Found in David Walsh blog
http://davidwalsh.name/upgrade-nodejs
answered May 24 '17 at 14:54
P.Brian.MackeyP.Brian.Mackey
4112613
4112613
add a comment |
add a comment |
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f366879%2finstalling-node-on-elementary-os%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Apart from an advice not to pipe scripts from the internet to a root shell: what does
type node
say? Maybe thissetup_6.x
thing installs to a different location and your call tonode -v
still runs an old version in yourPATH
?– ckujau
May 24 '17 at 5:06
node is hashed (/usr/local/bin/node)
. Considering those directions come fromhttps://nodejs.org/
I think its safe.– P.Brian.Mackey
May 24 '17 at 11:34
If
node
is hashed to/usr/local/bin/node
, then chances are my guess was correct, because often/usr/local/bin
comes before/usr/bin
inPATH
, and the newnode
will be installed to/usr/bin
.– ckujau
May 24 '17 at 17:10