• 8

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

name Punditsdkoslkdosdkoskdo

ubuntu 14.04 node porridge

I have two versions of nodejs on my machine.

I had only v8.6.0. I ran:

sudo apt-add-repository "deb https://deb.nodesource.com/node_8.x $(lsb_release -sc) main"
sudo apt-get update
sudo apt-get install nodejs

And received message: "Installing v8.12.0"

Following this, output of "apt list -a node":

Listing... Done
nodejs/unknown,now 8.12.0-1nodesource1 amd64 [installed]
nodejs/unknown 6.14.4-1nodesource1 amd64
nodejs/trusty-updates,trusty-security 0.10.25~dfsg2-2ubuntu1.2 amd64
nodejs/trusty 0.10.25~dfsg2-2ubuntu1 amd64

But "node -v" still gives:


"relevant" lines from /etc/apt/sources.list:

deb http://security.ubuntu.com/ubuntu trusty-security main restricted
deb-src http://security.ubuntu.com/ubuntu trusty-security main restricted
deb http://security.ubuntu.com/ubuntu trusty-security universe
deb-src http://security.ubuntu.com/ubuntu trusty-security universe
deb http://security.ubuntu.com/ubuntu trusty-security multiverse
deb-src http://security.ubuntu.com/ubuntu trusty-security multiverse

deb https://deb.nodesource.com/node_8.x trusty main

I even have this in /etc/apt/sources.list.d/nodesource.list:

deb https://deb.nodesource.com/node_6.x trusty main
deb-src https://deb.nodesource.com/node_6.x trusty main
deb https://deb.nodesource.com/node_6.x trusty main
deb-src https://deb.nodesource.com/node_6.x trusty main

I guess I have a conflict with Ubuntu's repo and nodesource's?

How to resolve?

I was looking in the wrong place.

v8.12.0 lives in /usr/bin, and even /usr/bin/nodejs which is a symlink to /etc/alternatives/nodejs which is a symlink to /usr/bin/node.

v8.6.0 lived in /usr/local/bin

I renamed node in /usr/local/bin then created a symlink called node here to /usr/bin/node.

cd /usr/local/bin
mv node node.v8.6.0
sudo ln -s /usr/bin/node ./node

All seems to work so far ...

I guess I got v8.6 some time ago when I installed maybe cordova or some such ...

I also removed /etc/apt/sources.list.d/nodesource.list

  • 0
Reply Report

Warm tip !!!

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

Trending Tags