If you use debian 7 wheezy and cannot install nodejs of version 4.x.x most likely it's because you have a wrong version of gcc. Nodejs 4.x.x requires gcc 4.8 or higher. Unfortunately Debian has gcc 4.8 starting from version 8 jessie. Fortunately there is a way to install it.
In order to install you need to adjust sources.list file in /etc/apt. Just add on line at the bottom of this file:
Now check if you have preferences file in /etc/apt. If no then just create one.
Add following content to this file:
Now just use aptitude to install required version of gcc
In order to install you need to adjust sources.list file in /etc/apt. Just add on line at the bottom of this file:
deb http://ftp.uk.debian.org/debian/ jessie main non-free contrib
Now check if you have preferences file in /etc/apt. If no then just create one.
Add following content to this file:
Package: * Pin: release n=wheezy Pin-Priority: 900 Package: gcc* Pin: release n=jessie Pin-Priority: 910
Now just use aptitude to install required version of gcc
sudo aptitude update sudo aptitude install gcc/jessie
No comments:
Post a Comment