I'm running Ubuntu 14.04 on a USB stick, and I'm trying to get my Ruby on Rails dev environment setup.

I'm having trouble installing nodejs. I used the method:

sudo add-apt-repository ppa:chris-lea/node.js
sudo apt-get update

Which is fine, but when I run:

sudo apt-get install nodejs

I get:

ubuntu@ubuntu:~$ sudo 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:
 nodejs : Depends: rlwrap but it is not installable
E: Unable to correct problems, you have held broken packages.

So I found this: ttp://comments.gmane.org/gmane.comp.sysutils.docker.user/201

So I ran this: sudo echo "deb http://archive.ubuntu.com/ubuntu precise universe" >> /etc/apt/sources.list

But I get: bash: /etc/apt/sources.list: Permission denied

I tried a couple of other things, which you can see here (scroll to near the bottom): https://teamtreehouse.com/forum/problems-following-odot-tutorials-using-local-install-pc

But nothing has worked. One of the mods on Treehouse is at a loss now. Any ideas?


This should work:

sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu $(lsb_release -sc) universe"
sudo apt-get update
sudo apt-get install nodejs

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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