And this is why I love Linux?

We just changed gears at code school tonight—up to now we’ve been hitting programming fundamentals, from basic stuff like loops and types and whatnot on through factories and prototypes and into scope and closures, which still make my head hurt if I look at them too closely. But tonight we left all that behind and started to wade into the next big topic of the program: Node. I’m definitely pretty psyched for it—playing with asynchronous programming and getting to do a bunch of back-end stuff sounds like a lot of fun. There has been, however, a bit of a snag.…
Virtually everyone in class uses a Mac—there are two other Linux folks in the class of twenty, and one is a TA. The Mac folks all got Node up and running no problem. I did as well; I’ve actually been running it for a week or so already with no problems. The other Linux guy got it installed pretty easily, but had problems setting up the symbolic link that he needed (Apparently something else already had dibs on the name “node” in Linux, or at least in the Ubuntu repositories, so Node is installed as nodejs, and if you want to be able to just use the command “node” you have to make a symlink). I had no such troubles with the symlink, and managed to get npm (the package manager for Node) installed as well. Great, now all I have to do is install this learnyounode thing and I’ll be rolling!
Well, as you can probably tell from the dramatic paragraph break, things went downhill from there. I tried

and was rewarded with a huge long string of errors. Problems with repositories or something, it looked like. Some poking and prodding eventually turned up the command to updated npm, but things were no better thereafter. By now my Ubuntu-using classmate has his setup running just fine, and he suggests doing it as root, instead of just with sudo. I try it and things actually get a little farther, but still there are large walls of red errors. The TA comes by to help out and is baffled—she uses Mint, just like I do, and got it set up without a hitch. “What version of Mint are you using?” “Oh, I’m on 14 still.”

Pause.

So we do some Googling (while the rest of the class is getting their first taste of Node, of course), and it’s starting to sound like there might be some issues with older versions of Ubuntu-based systems. Finally, after class, one of the instructors gets the bright idea for me to check what version of Node I’m running. It should be fine as long as it’s past 0.10 or so, he says. “Huh—looks like I’m on 0.6.18.”

Pause.

So, it’s looking more and more like it’s time to upgrade the OS on my laptop. I’ve been thinking about doing that for a while, but I haven’t wanted to bother, since upgrading with Mint is not as simple as it could be—you have to do a complete wipe and reinstall, which is a huge pain. Definitely the smarter way to go; it’s a good idea to clear everything out periodically anyway, and upgrading in place makes it really easy to have a lot of extra junk lying around that you don’t really need, but a complete wipe and reinstall takes a long time, what with backing everything up, reinstalling and reconfiguring everything, and all the rest.

The jury’s not out on the npm install quite yet, though. Duck Duck Go brought me some welcome news: other people have had this problem, and some folks have set up repositories with everything you need to get up and running. The first repo I tried, ppa:chris-lea/node.js, got me an up-to-date version of Node just fine, but a huge list of broken dependencies when I tried to install npm. So then I moved on to ppa:richarvey/nodejs. Luck! Node and npm both work now, and seem to be up to date. So now it’s back to learnyounode… which now displays a different but no less frustrating set of errors:

Which pretty much brings us up to date. I’ve got more searching to do, but while I do I’m going to be backing up the laptop. I’ve already got the latest version of Mint downloaded, and if my searches don’t turn up anything useful before too long, it’ll be time to start formatting. Part of me is actually looking forward to a clean slate.…

Update: Well, I don’t understand it, but I’ll take it. Started the backup, did some more searching around, didn’t find anything much of note, and was poking around on the laptop trying to make sure that I wasn’t missing any important files for the backup, and I decided I’d try installing learnyounode one more time. And it worked. The only thing different that I can think of was that sudo had timed out, so I had to re-enter my password. Wacky, but I’m glad I don’t have to deal with reinstalling tonight or tomorrow. Of course, now that I’ve just about got everything backed up, maybe I’ll do that over the weekend.…

Leave a Reply

Your email address will not be published. Required fields are marked *