New on LowEndTalk? Please Register and read our Community Rules.
Cant install NodeJs

What am I doing wrong here, I always get this error:
libc6-dev : Breaks: gcc-4.4 (< 4.4.6-4) but 4.4.5-8 is to be installed
E: Broken packages
[email protected]:~# echo deb http://ftp.us.debian.org/debian/ sid main > /etc/apt/sources.list.d/sid.list [email protected]:~# apt-get update [email protected]:~# apt-get install nodejs Reading package lists... Done Building dependency tree Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation: The following packages have unmet dependencies: libc6-dev : Breaks: gcc-4.4 (< 4.4.6-4) but 4.4.5-8 is to be installed E: Broken packages
sources.list
[email protected]:~# cat /etc/apt/sources.list # # deb cdrom:[Debian GNU/Linux 6.0.1a _Squeeze_ - Official i386 NETINST Binary-1 20110320-15:03]/ squeeze main #deb cdrom:[Debian GNU/Linux 6.0.1a _Squeeze_ - Official i386 NETINST Binary-1 20110320-15:03]/ squeeze main deb http://ftp.us.debian.org/debian/ squeeze main deb-src http://ftp.us.debian.org/debian/ squeeze main deb http://security.debian.org/ squeeze/updates main deb-src http://security.debian.org/ squeeze/updates main # squeeze-updates, previously known as 'volatile' deb http://ftp.us.debian.org/debian/ squeeze-updates main deb-src http://ftp.us.debian.org/debian/ squeeze-updates main
Comments
The problem is that you are telling your system to use the sid repository. To use it you should do a dist-upgrade or pin only the packages that you want to install.
I suggest you to:
1) remove the sid.list file
2) download the source package (from http://packages.debian.org/source/sid/nodejs) and recompile it on your vps, rather than installing sid packages on your system OR install nodejs from source.
Compile it at yourself?
mkdir ~/nodejsbin
source ~/.bashrc
wget http://nodejs.org/dist/latest/node-v0.6.11.tar.gz
tar xfz node.tar.gz
cd node-
./configure --prefix=~/nodejsbin/
make
make install
echo 'export PATH=$PATH:~/nodejsbin/bin/' >> ~/.bashrc
should do it...
thanks! tried it and worked
though this line:
echo 'export PATH=$PATH:~/nodejsbin/bin/' >> ~/.bashrc
what happens here? it still says
-bash: node: command not found
EDIT: okay sorry for being the noob I am, forgot to run
. ~/.bashrc
Node gets updates very frequently. I always compile from source since you never know how out-of-date those official repos get.
^ this
Simple script I use https://gist.github.com/1917555
Use as:
sudo update-node 0.6.11
It adds the folder to your $PATH-Environment, so you can run it simply by executing node
But as you have seen you must relogin or type source ~/.bashrc