Just bought a new fresh virtual server in the cloud, Ubuntu 14.04.

I updated my packages with apt-get update.

Got problems when trying to install node js. I followed this guide: https://github.com/joyent/node/wiki/installing-node.js-via-package-manager

When I run sudo apt-get install -y nodejs I get this:

user@server 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.

What is this rlwrap? I googled but did not find how to install it.


I tried the suggestions below. No success. I downgraded to 12.04. Everything worked there.


I had the same exact problem in Ubuntu 14.04. The solution:

  1. Download rlwrap from http://packages.ubuntu.com/trusty/rlwrap. Here is a Direct Link
  2. Install it sudo dpkg -i rlwrap_0.34-2_amd64.deb
  3. Install nodejs sudo apt-get install nodejs
  • Also worked for uninstallable liberror-perl while installing git :) – walmik Sep 7 '17 at 2:20
  1. enable universe repository sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu $(lsb_release -sc) universe"
  2. fix and update sudo dpkg --configure -a && sudo apt-get update && sudo apt-get -y upgrade
  3. try again (note that the node.js instructions replace the Ubuntu repositories with custom ones so be sure that script worked)
>apt-cache show rlwrap
Package: rlwrap
Priority: optional
Section: universe/editors
Installed-Size: 300
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Original-Maintainer: Francois Marier <francois@debian.org>
Architecture: amd64
Version: 0.37-2
Provides: readline-editor
Depends: libc6 (>= 2.4), libncurses5 (>= 5.7+20100313), libreadline6 (>= 6.0)
Filename: pool/universe/r/rlwrap/rlwrap_0.37-2_amd64.deb
Size: 80968
MD5sum: 8fca381b84e7205b92615d2d2f6df588
SHA1: ea227d0b53c16cec64f259e349d69073fce972f8
SHA256: 09d5d948a387f77a1f09b8ad800a73349dbcd6245f787496e0f1743df5259ea4
Description-en: readline feature command line wrapper
 This package provides a small utility that uses the GNU readline library
 to allow the editing of keyboard input for any other command.  Input
 history is remembered across invocations, separately for each command;
 history completion and search work as in bash and completion word lists
 can be specified on the command line.
Homepage: http://utopia.knoware.nl/~hlub/uck/rlwrap/
Description-md5: 2dd4e4df63ed824e61c4e21ad05cd1eb
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Origin: Ubuntu
Task: edubuntu-desktop-kde, edubuntu-desktop-gnome

Here is what worked for me to install node.js on Ubuntu 14.04 and a bit of an explanation why I prefer to install node this way.
It involves adding a third party PPA - which has been used by many people and seems to be the most popular PPA for node on Ubuntu, run:

sudo apt-get install python-software-properties


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


sudo apt-get update


sudo apt-get install nodejs

Check installation with

node -v


It seems nodejs has a conflict with another package used by Debian and Ubuntu also called "node"

e.g. if you search Ubuntu repos with:

apt-cache search node | grep Amateur

You will see a package called

node - Amateur Packet Radio Node program (transitional package)

Its an old ham radio package, which Debian/Ubuntu have given priority over nodejs in both the Ubuntu repos and as a command line argument.
I could be wrong but I believe Debain/Ubuntu may have modified their version of node to use the command nodejs where the normal command is node, in order to prevent conflicts between the 2 packages.
I don't ever plan to install the ham radio version so I choose to install a non-official version, which I know does respond to the command node, because I suspect the likelihood of breakages will be higher if other nodejs related programs try to make a call to node and don't get a response.


Whoever tries to install node on ubuntu vivid (ubuntu bq tablet): follow @bekce's solution, only you need to pay attention about the architecture of your machine. my tablet is armhf, so i downloaded rlwrap for armhf from:

wget https://launchpad.net/ubuntu/+source/rlwrap/0.41-1

and the remaining is the same:

sudo dpkg -i rlwrap_0.34-2_amd64.deb
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.