Installing nodejs on Arch Linux

Installing node on ArchLinux has some trickery to it because Arch uses python to reference python 3 by default. Node uses python 2 during installation so we can update our system to reflect this.

Make sure system has python 2 installed. As superuser do:

$ pacman -S python2

Install nodejs from repository

$ pacman -S nodejs

**At this point I attempted a command but encountered an error. I don’t think this actually did anything but I want to record it.

$ for i in $(grep -R1 "python" *); do sed -i -e 's/\/usr\/bin\/env\spython$/\/usr\/bin\/env python2/g' $i; done

Modify the makefile to use python2

$ sed -i -e 's/python\b/python2/g' Makefile

Published: September 04 2014

blog comments powered by Disqus