Reputation: 17640
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
all is well
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 found a page 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 don't know what to do now
Upvotes: 7
Views: 9577
Reputation: 14953
If you are running some debian based distro, that code should work. Since you are running CentOS, you can follow this link. Different linux distros use different package managers. It looks like that debian is the most popular (ubuntu, mint, debian...) so many online tutorials you find use apt to get everything installed. Your choice is different and you should use rpm/yum. Since you are missing gcc compiler, you should try executing this command (you should probably add some more packages, not sure):
yum install sudo gcc-c++
EDIT: Updated link to serverfault.com
Upvotes: 8
Reputation: 95308
Actually the error output tells you exactly what's missing: sudo
. Quick Googl'ing should reveal what this tools meaning is: It lets you execute commands with root privileges, provided you have access to a user account that's privileged enough to use this functionality.
So you need root privileges to install packages. This is not surprising. If sudo
is not installed, you most probably either
root
, in which you can use apt-get
without the sudo
in frontroot
and thus don't have the necessary permissions to install packages. In that case, you are unlucky and you need to talk to the administrator.UPDATE: From your comment to the other answer I take it that you are running with user privileges and do not have su
in your PATH. Do you know the root password? If yes, you can try if /bin/su
works. If no, you don't have enough privileges.
Upvotes: 1