Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I've had to reinstall my mac, and after my initial macports setup i found that several nodejs libs where broken by the switch to v0.7.x.

Is there a way to easily install nodejs v0.6-latest on a mac?

share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

If you previously had Node 0.6.19 installed and just upgraded Node using MacPorts then switching back is easy:
sudo port activate nodejs@0.6.19

If you have never installed Node 0.6.19 on the current machine then you need to install the older version on your machine. Unfortunately that is not as easy as sudo port activate nodejs@0.6.19. I'm not sure why, other than no one has got around to updating MacPorts to do it (all the info is there in the repository).

Instead, you have to follow the steps at http://trac.macports.org/wiki/howto/InstallingOlderPort which basically require you to browse the [MacPorts repository|http://trac.macports.org/browser/trunk/dports] to find the older Portfile, then download it, and then install it.

I've done the "hard part" for you - the Node 0.6.19 Portfile is at https://trac.macports.org/export/94009/trunk/dports/devel/nodejs/Portfile. So you just need to do the following:
curl -O https://trac.macports.org/export/94009/trunk/dports/devel/nodejs/Portfile sudo port install

This will install and activate it. You can then switch back and forth using the activate command I listed above.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.