Error while trying to install genieacs via npm in Ubuntu 16.04

856 views
Skip to first unread message

Sergio Fernández

unread,
Nov 16, 2016, 8:17:23 PM11/16/16
to nodejs
Hello!

I am facing some issues when using the version from https://deb.nodesource.com/setup_6.x instead of the nodejs-legacy packet in Ubuntu.

When I try to install genieacs via npm, here is the full output:

tecnico@GenieACS:~$ sudo npm install -g genieacs
/usr/bin/genieacs-cwmp -> /usr/lib/node_modules/genieacs/bin/genieacs-cwmp
/usr/bin/genieacs-fs -> /usr/lib/node_modules/genieacs/bin/genieacs-fs
/usr/bin/genieacs-nbi -> /usr/lib/node_modules/genieacs/bin/genieacs-nbi

> bson@0.2.22 install /usr/lib/node_modules/genieacs/node_modules/bson
> (node-gyp rebuild 2> builderror.log) || (exit 0)

make
: se entra en el directorio '/usr/lib/node_modules/genieacs/node_modules/bson/build'
  CXX
(target) Release/obj.target/bson/ext/bson.o
bson
.target.mk:92: fallo en las instrucciones para el objetivo 'Release/obj.target/bson/ext/bson.o'
make
: se sale del directorio '/usr/lib/node_modules/genieacs/node_modules/bson/build'

> kerberos@0.0.11 install /usr/lib/node_modules/genieacs/node_modules/kerberos
> (node-gyp rebuild 2> builderror.log) || (exit 0)

make
: se entra en el directorio '/usr/lib/node_modules/genieacs/node_modules/kerberos/build'
  CXX
(target) Release/obj.target/kerberos/lib/kerberos.o
kerberos
.target.mk:98: fallo en las instrucciones para el objetivo 'Release/obj.target/kerberos/lib/kerberos.o'
make
: se sale del directorio '/usr/lib/node_modules/genieacs/node_modules/kerberos/build'

> hiredis@0.4.1 install /usr/lib/node_modules/genieacs/node_modules/hiredis
> node-gyp rebuild

make
: se entra en el directorio '/usr/lib/node_modules/genieacs/node_modules/hiredis/build'
  CC
(target) Release/obj.target/hiredis-c/deps/hiredis/sds.o
  CC
(target) Release/obj.target/hiredis-c/deps/hiredis/read.o
  AR
(target) Release/obj.target/deps/hiredis-c.a
  COPY
Release/hiredis-c.a
  CXX
(target) Release/obj.target/hiredis/src/hiredis.o
  CXX
(target) Release/obj.target/hiredis/src/reader.o
  SOLINK_MODULE
(target) Release/obj.target/hiredis.node
  COPY
Release/hiredis.node
make
: se sale del directorio '/usr/lib/node_modules/genieacs/node_modules/hiredis/build'

> libxmljs@0.14.3 install /usr/lib/node_modules/genieacs/node_modules/libxmljs
> node-gyp rebuild

make
: se entra en el directorio '/usr/lib/node_modules/genieacs/node_modules/libxmljs/build'
  CC
(target) Release/obj.target/libxml/vendor/libxml/buf.o
  CC
(target) Release/obj.target/libxml/vendor/libxml/catalog.o
  CC
(target) Release/obj.target/libxml/vendor/libxml/chvalid.o
  CC
(target) Release/obj.target/libxml/vendor/libxml/dict.o
  CC
(target) Release/obj.target/libxml/vendor/libxml/encoding.o
  CC
(target) Release/obj.target/libxml/vendor/libxml/entities.o
  CC
(target) Release/obj.target/libxml/vendor/libxml/error.o
  CC
(target) Release/obj.target/libxml/vendor/libxml/globals.o
  CC
(target) Release/obj.target/libxml/vendor/libxml/hash.o
  CC
(target) Release/obj.target/libxml/vendor/libxml/HTMLparser.o
  CC
(target) Release/obj.target/libxml/vendor/libxml/HTMLtree.o
  CC
(target) Release/obj.target/libxml/vendor/libxml/legacy.o
  CC
(target) Release/obj.target/libxml/vendor/libxml/list.o
  CC
(target) Release/obj.target/libxml/vendor/libxml/parser.o
../vendor/libxml/parser.c: In function xmlParseInNodeContext’:
../vendor/libxml/parser.c:13492:43: warning: pointer targets in passing argument 1 of xmlFindCharEncodingHandler differ in signedness [-Wpointer-sign]
         hdlr
= xmlFindCharEncodingHandler(doc->encoding);
                                           
^
In file included from ../vendor/libxml/include/libxml/parser.h:809:0,
                 
from ../vendor/libxml/include/libxml/globals.h:18,
                 
from ../vendor/libxml/include/libxml/threads.h:35,
                 
from ../vendor/libxml/include/libxml/xmlmemory.h:218,
                 
from ../vendor/libxml/parser.c:46:
../vendor/libxml/include/libxml/encoding.h:175:2: note: expected const char *’ but argument is of type const xmlChar * {aka const unsigned char *}’
  xmlFindCharEncodingHandler
(const char *name);
 
^
  CC
(target) Release/obj.target/libxml/vendor/libxml/parserInternals.o
  CC
(target) Release/obj.target/libxml/vendor/libxml/pattern.o
  CC
(target) Release/obj.target/libxml/vendor/libxml/relaxng.o
  CC
(target) Release/obj.target/libxml/vendor/libxml/SAX2.o
  CC
(target) Release/obj.target/libxml/vendor/libxml/SAX.o
  CC
(target) Release/obj.target/libxml/vendor/libxml/tree.o
  CC
(target) Release/obj.target/libxml/vendor/libxml/threads.o
  CC
(target) Release/obj.target/libxml/vendor/libxml/uri.o
  CC
(target) Release/obj.target/libxml/vendor/libxml/valid.o
  CC
(target) Release/obj.target/libxml/vendor/libxml/xinclude.o
  CC
(target) Release/obj.target/libxml/vendor/libxml/xlink.o
  CC
(target) Release/obj.target/libxml/vendor/libxml/xmlIO.o
  CC
(target) Release/obj.target/libxml/vendor/libxml/xmlmemory.o
  CC
(target) Release/obj.target/libxml/vendor/libxml/xmlmodule.o
  CC
(target) Release/obj.target/libxml/vendor/libxml/xmlreader.o
  CC
(target) Release/obj.target/libxml/vendor/libxml/xmlregexp.o
  CC
(target) Release/obj.target/libxml/vendor/libxml/xmlsave.o
  CC
(target) Release/obj.target/libxml/vendor/libxml/xmlschemas.o
  CC
(target) Release/obj.target/libxml/vendor/libxml/xmlschemastypes.o
  CC
(target) Release/obj.target/libxml/vendor/libxml/xmlstring.o
  CC
(target) Release/obj.target/libxml/vendor/libxml/xmlunicode.o
  CC
(target) Release/obj.target/libxml/vendor/libxml/xmlwriter.o
  CC
(target) Release/obj.target/libxml/vendor/libxml/xpath.o
../vendor/libxml/xpath.c: In function xmlXPathNodeCollectAndTest’:
../vendor/libxml/xpath.c:12401:28: warning: comparison between xmlElementType {aka enum <anonymous>}’ and xmlXPathTypeVal {aka enum <anonymous>}’ [-Wenum-compare]
       
} else if (cur->type == type) {
                           
^
../vendor/libxml/xpath.c:12402:13: warning: comparison between xmlXPathTypeVal {aka enum <anonymous>}’ and enum <anonymous> [-Wenum-compare]
   
if (type == XML_NAMESPACE_DECL)
             
^
In file included from ../vendor/libxml/xpath.c:185:0:
../vendor/libxml/xpath.c: At top level:
../vendor/libxml/trionan.c:194:1: warning: trio_is_special_quantity defined but not used [-Wunused-function]
 trio_is_special_quantity
 
^
../vendor/libxml/trionan.c:218:1: warning: trio_is_negative defined but not used [-Wunused-function]
 trio_is_negative
 
^
../vendor/libxml/xpath.c: In function xmlXPathCastNumberToString’:
../vendor/libxml/xpath.c:2900:7: warning: array subscript is above array bounds [-Warray-bounds]
   work
[buffersize - 1] = 0;
       
^
  CC
(target) Release/obj.target/libxml/vendor/libxml/xpointer.o
../vendor/libxml/xpointer.c: In function xmlXPtrNewRangeNodePoint’:
../vendor/libxml/xpointer.c:451:21: warning: comparison between xmlElementType {aka enum <anonymous>}’ and enum <anonymous> [-Wenum-compare]
     
if (start->type != XPATH_POINT)
                     
^
  AR
(target) Release/obj.target/vendor/libxml/xml.a
  COPY
Release/xml.a
  CXX
(target) Release/obj.target/xmljs/src/libxmljs.o
In file included from ../node_modules/nan/nan.h:184:0,
                 
from ../src/libxmljs.h:7,
                 
from ../src/libxmljs.cc:7:
../node_modules/nan/nan_maybe_43_inl.h: In function Nan::MaybeLocal<v8::Object> Nan::CloneElementAt(v8::Local<v8::Array>, uint32_t)’:
../node_modules/nan/nan_maybe_43_inl.h:221:58: warning: v8::MaybeLocal<v8::Object> v8::Array::CloneElementAt(v8::Local<v8::Context>, uint32_t)’ is deprecated: Cloning is not supported. [-Wdeprecated-declarations]
   
return array->CloneElementAt(GetCurrentContext(), index);
                                                         
^
In file included from /home/tecnico/.node-gyp/6.9.1/include/node/v8.h:25:0,
                 
from ../src/libxmljs.cc:3:
/home/tecnico/.node-gyp/6.9.1/include/node/v8.h:3032:36: note: declared here
                 
MaybeLocal<Object> CloneElementAt(Local<Context> context,
                                   
^
/home/tecnico/.node-gyp/6.9.1/include/node/v8config.h:333:3: note: in definition of macro V8_DEPRECATED
   declarator __attribute__
((deprecated(message)))
   
^
In file included from ../node_modules/nan/nan_new.h:189:0,
                 
from ../node_modules/nan/nan.h:190,
                 
from ../src/libxmljs.h:7,
                 
from ../src/libxmljs.cc:7:
../node_modules/nan/nan_implementation_12_inl.h: In static member function static Nan::imp::FactoryBase<v8::BooleanObject>::return_t Nan::imp::Factory<v8::BooleanObject>::New(bool)’:
../node_modules/nan/nan_implementation_12_inl.h:40:38: warning: static v8::Local<v8::Value> v8::BooleanObject::New(bool)’ is deprecated: Pass an isolate [-Wdeprecated-declarations]
   
return v8::BooleanObject::New(value).As<v8::BooleanObject>();
                                     
^
In file included from /home/tecnico/.node-gyp/6.9.1/include/node/v8.h:25:0,
                 
from ../src/libxmljs.cc:3:
/home/tecnico/.node-gyp/6.9.1/include/node/v8.h:4007:56: note: declared here
   V8_DEPRECATED
("Pass an isolate", static Local<Value> New(bool value));
                                                       
^
/home/tecnico/.node-gyp/6.9.1/include/node/v8config.h:333:3: note: in definition of macro V8_DEPRECATED
   declarator __attribute__
((deprecated(message)))
   
^
In file included from ../src/libxmljs.h:7:0,
                 
from ../src/libxmljs.cc:7:
../node_modules/nan/nan.h: At global scope:
../node_modules/nan/nan.h:592:20: error: variable or field AddGCEpilogueCallback declared void
       v8
::Isolate::GCEpilogueCallback callback
                   
^
../node_modules/nan/nan.h:592:7: error: GCEpilogueCallback is not a member of v8::Isolate
       v8
::Isolate::GCEpilogueCallback callback
       
^
../node_modules/nan/nan.h:593:18: error: expected primary-expression before gc_type_filter
     
, v8::GCType gc_type_filter = v8::kGCTypeAll) {
                 
^
../node_modules/nan/nan.h:598:20: error: variable or field RemoveGCEpilogueCallback declared void
       v8
::Isolate::GCEpilogueCallback callback) {
                   
^
../node_modules/nan/nan.h:598:7: error: GCEpilogueCallback is not a member of v8::Isolate
       v8
::Isolate::GCEpilogueCallback callback) {
       
^
../node_modules/nan/nan.h:603:20: error: variable or field AddGCPrologueCallback declared void
       v8
::Isolate::GCPrologueCallback callback
                   
^
../node_modules/nan/nan.h:603:7: error: GCPrologueCallback is not a member of v8::Isolate
       v8
::Isolate::GCPrologueCallback callback
       
^
../node_modules/nan/nan.h:604:18: error: expected primary-expression before gc_type_filter
     
, v8::GCType gc_type_filter = v8::kGCTypeAll) {
                 
^
../node_modules/nan/nan.h:609:20: error: variable or field RemoveGCPrologueCallback declared void
       v8
::Isolate::GCPrologueCallback callback) {
                   
^
../node_modules/nan/nan.h:609:7: error: GCPrologueCallback is not a member of v8::Isolate
       v8
::Isolate::GCPrologueCallback callback) {
       
^
../node_modules/nan/nan.h: In function bool Nan::SetAccessor(v8::Local<v8::Object>, v8::Local<v8::String>, Nan::GetterCallback, Nan::SetterCallback, v8::Local<v8::Value>, v8::AccessControl, v8::PropertyAttribute)’:
../node_modules/nan/nan.h:1939:16: warning: bool v8::Object::SetAccessor(v8::Local<v8::Name>, v8::AccessorNameGetterCallback, v8::AccessorNameSetterCallback, v8::Local<v8::Value>, v8::AccessControl, v8::PropertyAttribute)’ is deprecated: Use maybe version [-Wdeprecated-declarations]
     
, attribute);
               
^
In file included from /home/tecnico/.node-gyp/6.9.1/include/node/v8.h:25:0,
                 
from ../src/libxmljs.cc:3:
/home/tecnico/.node-gyp/6.9.1/include/node/v8.h:2751:22: note: declared here
                 
bool SetAccessor(Local<Name> name,
                     
^
/home/tecnico/.node-gyp/6.9.1/include/node/v8config.h:333:3: note: in definition of macro V8_DEPRECATED
   declarator __attribute__
((deprecated(message)))
   
^
../src/libxmljs.cc: In function void libxmljs::xmlMemFreeWrap(void*)’:
../src/libxmljs.cc:56:17: warning: static bool v8::V8::IsDead()’ is deprecated: Use isolate version [-Wdeprecated-declarations]
     
if (v8::V8::IsDead())
                 
^
In file included from ../src/libxmljs.cc:3:0:
/home/tecnico/.node-gyp/6.9.1/include/node/v8.h:8666:6: note: declared here
 
bool V8::IsDead() {
     
^
../src/libxmljs.cc:56:24: warning: static bool v8::V8::IsDead()’ is deprecated: Use isolate version [-Wdeprecated-declarations]
     
if (v8::V8::IsDead())
                       
^
In file included from ../src/libxmljs.cc:3:0:
/home/tecnico/.node-gyp/6.9.1/include/node/v8.h:8666:6: note: declared here
 
bool V8::IsDead() {
     
^
xmljs
.target.mk:106: fallo en las instrucciones para el objetivo 'Release/obj.target/xmljs/src/libxmljs.o'
make
: *** [Release/obj.target/xmljs/src/libxmljs.o] Error 1
make
: se sale del directorio '/usr/lib/node_modules/genieacs/node_modules/libxmljs/build'
gyp ERR
! build error
gyp ERR
! stack Error: `make` failed with exit code: 2
gyp ERR
! stack     at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:276:23)
gyp ERR
! stack     at emitTwo (events.js:106:13)
gyp ERR
! stack     at ChildProcess.emit (events.js:191:7)
gyp ERR
! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)
gyp ERR
! System Linux 4.4.0-47-generic
gyp ERR
! command "/usr/bin/nodejs" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR
! cwd /usr/lib/node_modules/genieacs/node_modules/libxmljs
gyp ERR
! node -v v6.9.1
gyp ERR
! node-gyp -v v3.4.0
gyp ERR
! not ok
/usr/lib
└── (empty)

npm ERR
! Linux 4.4.0-47-generic
npm ERR
! argv "/usr/bin/nodejs" "/usr/bin/npm" "install" "-g" "genieacs"
npm ERR
! node v6.9.1
npm ERR
! npm  v3.10.8
npm ERR
! code ELIFECYCLE

npm ERR
! libxmljs@0.14.3 install: `node-gyp rebuild`
npm ERR
! Exit status 1
npm ERR
!
npm ERR
! Failed at the libxmljs@0.14.3 install script 'node-gyp rebuild'.
npm ERR
! Make sure you have the latest version of node.js and npm installed.
npm ERR
! If you do, this is most likely a problem with the libxmljs package,
npm ERR
! not with npm itself.
npm ERR
! Tell the author that this fails on your system:
npm ERR
!     node-gyp rebuild
npm ERR
! You can get information on how to open an issue for this project with:
npm ERR
!     npm bugs libxmljs
npm ERR
! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls libxmljs
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /home/tecnico/npm-debug.log
npm ERR! code 1

I don't even know how to start. I've instaled some versions of node-gyp, others from libxml, but that doesn't solve it. GenieACS depends also in Redis, MongoDB, Ruby On Rails.. but all of them are correct installed. Can you guide me in order to what to try next?
Thank you very much,

Sergio Férnandez

PS. I am doing a guide for the people who want to use GenieACS, and this is the most problematic part for the users. There are other ways of installing GenieACS correctly, but I wanted to explain the correct way in Ubuntu 16.04 (The actual guides are for Ubuntu 14.04)

Davide Abrigo

unread,
Dec 6, 2016, 12:05:33 PM12/6/16
to nodejs
Same thing here, i get this error when trying to install GenieACS on Debian 8.6, with both Node.js v6 and v7 from Node repos. Also tried to install using the Git repo but the same error occurs. Redis and MongoDB are correctly installed. Probably a missing dependency on a system package?
Here are the packages i've installed following the notes on the Git wiki (https://github.com/zaidka/genieacs/wiki/Installation-in-Debian-8.6):

sudo apt-get install zip unzip curl checkinstall build-essential zlib1g-dev libssl-dev libreadline6-dev libyaml-dev libsqlite3-dev

PS: i'm writing a guide too ;)
Reply all
Reply to author
Forward
0 new messages