• 5

A PHP Error was encountered

Severity: Notice

Message: Undefined index: userid

Filename: views/question.php

Line Number: 191


File: /home/prodcxja/public_html/questions/application/views/question.php
Line: 191
Function: _error_handler

File: /home/prodcxja/public_html/questions/application/controllers/Questions.php
Line: 433
Function: view

File: /home/prodcxja/public_html/questions/index.php
Line: 315
Function: require_once

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.

  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
  • 2
Reply Report

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.

  • 0
Reply Report

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
  • 0
Reply Report

Warm tip !!!

This article is reproduced from Stack Exchange / Stack Overflow, please click

Trending Tags