Install node.js on a dedicated server

ok, so I got a dedicated Linux server and I'm trying to install node.js

i ran

wget http://nodejs.org/dist/node-v0.4.11.tar.gz tar zxf node-v0.4.11.tar.gz cd node-v0.4.11 

things are good

then i ran

  ./configure 

and i got

 Checking for program g++ or c++ : not found Checking for program icpc : not found Checking for program c++ : not found wscript:232: error: could not configure a cxx compiler! 

so i google that error if a page is found that says run this

  sudo apt-get install build-essential libssl-dev curl git-core 

but then i get

 -bash: sudo: command not found 

Please help me, I do not know what to do now

+7
source share
2 answers

If you are using a debian based distribution, this code should work. Since you are using CentOS, you can follow this link. Different Linux distributions use different package managers. It seems that debian is the most popular (ubuntu, mint, debian ...), so many online manuals that you will find use everything to install everything. Your choice is different and you should use rpm / yum. Since you are missing the gcc compiler, you should try this command (maybe you should add some more packages, not sure):

 yum install sudo gcc-c++ 

EDIT: Updated link to serverfault.com

+8
source

In fact, the error output shows you exactly what is missing: sudo . Quick Googl'ing should show what this means: it allows you to execute commands with root privileges if you have access to a user account that is privileged enough to use this feature.

So, you need root privileges to install packages. This is not surprising. If sudo not installed, you will most likely be

  • logged in as root , in which you can use apt-get without sudo in front
  • they do not register as root and therefore do not have the necessary permissions to install packages. In this case, you are out of luck, and you need to talk with the administrator.

UPDATE:. From your comment on another answer, I understand that you are working with user rights and do not have su in your PATH. Do you know the root password? If so, you can try if /bin/su works. If not, you do not have enough privileges.

+1
source

All Articles