Skip to content
This repository has been archived by the owner on Feb 15, 2022. It is now read-only.

Ubuntu 14.04 installation failure #597

Closed
andreireiand opened this issue Oct 6, 2017 · 6 comments
Closed

Ubuntu 14.04 installation failure #597

andreireiand opened this issue Oct 6, 2017 · 6 comments

Comments

@andreireiand
Copy link

Get Ubuntu, install mongodb, node.js & npm ... w/ sudo apt-get install, then follow npm install, npm link - it fails:

npm http 304 https://registry.npmjs.org/nan

talib@1.0.3 install /home/master/zenbot/node_modules/talib
node ./src/lib/build.js && node-gyp configure && node-gyp build

sh: 1: node: not found
npm WARN This failure might be due to the use of legacy binary "node"
npm WARN For further explanations, please read
/usr/share/doc/nodejs/README.Debian

npm ERR! weird error 127
npm ERR! tar pack Error reading /home/master/tmp/npm-15733-syKVLN0u/1507292912063-0.3445200836285949/package
npm ERR! addLocalDirectory Could not pack "/home/master/tmp/npm-15733-syKVLN0u/1507292912063-0.3445200836285949/package" to "/home/master/.npm/lodash/4.17.4/package.tgz"
npm http 304 https://registry.npmjs.org/is-property

forex.analytics@0.0.14 preinstall /home/master/zenbot/node_modules/forex.analytics
node ./lib/ta-lib/build.js

sh: 1: node: not found
npm WARN This failure might be due to the use of legacy binary "node"
npm WARN For further explanations, please read
/usr/share/doc/nodejs/README.Debian

npm ERR! not ok code 0
master@ubuntu:~/zenbot$

@DeviaVir
Copy link
Owner

DeviaVir commented Oct 6, 2017

websockets/ws#458

@DeviaVir DeviaVir closed this as completed Oct 6, 2017
@andreireiand
Copy link
Author

andreireiand commented Oct 6, 2017

went through the link ... and:

  1. link https://github.com/joyent/node/wiki/Installing-Node.js-via-package-manager#debian-and-ubuntu-based-linux-distributions was moved, not valid anymore - no info there.
  2. trying sudo ln -s /usr/bin/nodejs /usr/bin/node and then npm install gives following errors:
npm http 200 https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.3.tgz
make: Entering directory `/home/master/zenbot/node_modules/talib/build'
  CXX(target) Release/obj.target/talib/src/talib.o
../src/talib.cpp:42:11: error: ‘v8::MaybeLocal’ has not been declared
 using v8::MaybeLocal;
           ^
../src/talib.cpp: In function ‘Nan::NAN_METHOD_RETURN_TYPE Explain(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/talib.cpp:367:62: error: no matching function for call to ‘Nan::ReturnValue<v8::Value>::Set(v8::Handle<v8::Value>)’
     info.GetReturnValue().Set(TA_EXPLAIN_FUNCTION(*func_name));
                                                              ^
../src/talib.cpp:367:62: note: candidates are:
In file included from ../node_modules/nan/nan_callbacks.h:85:0,
                 from ../node_modules/nan/nan.h:148,
                 from ../src/talib.cpp:29:
../node_modules/nan/nan_callbacks_pre_12_inl.h:33:37: note: template<class S> void Nan::ReturnValue<T>::Set(const v8::Local<S>&) [with S = S; T = v8::Value]
   template <typename S> inline void Set(const v8::Local<S> &handle) {
                                     ^
../node_modules/nan/nan_callbacks_pre_12_inl.h:33:37: note:   template argument deduction/substitution failed:
../src/talib.cpp:367:62: note:   ‘v8::Handle<v8::Value>’ is not derived from ‘const v8::Local<T>’
     info.GetReturnValue().Set(TA_EXPLAIN_FUNCTION(*func_name));
                                                              ^
In file included from ../node_modules/nan/nan_callbacks.h:85:0,
                 from ../node_modules/nan/nan.h:148,
                 from ../src/talib.cpp:29:
../node_modules/nan/nan_callbacks_pre_12_inl.h:39:37: note: template<class S> void Nan::ReturnValue<T>::Set(const Nan::Global<S>&) [with S = S; T = v8::Value]
   template <typename S> inline void Set(const Global<S> &handle) {
                                     ^
../node_modules/nan/nan_callbacks_pre_12_inl.h:39:37: note:   template argument deduction/substitution failed:
../src/talib.cpp:367:62: note:   ‘v8::Handle<v8::Value>’ is not derived from ‘const Nan::Global<S>’
     info.GetReturnValue().Set(TA_EXPLAIN_FUNCTION(*func_name));
                                                              ^
In file included from ../node_modules/nan/nan_callbacks.h:85:0,
                 from ../node_modules/nan/nan.h:148,
                 from ../src/talib.cpp:29:
../node_modules/nan/nan_callbacks_pre_12_inl.h:47:15: note: void Nan::ReturnValue<T>::Set(bool) [with T = v8::Value]
   inline void Set(bool value) {
               ^
../node_modules/nan/nan_callbacks_pre_12_inl.h:47:15: note:   no known conversion for argument 1 from ‘v8::Handle<v8::Value>’ to ‘bool’
../node_modules/nan/nan_callbacks_pre_12_inl.h:55:15: note: void Nan::ReturnValue<T>::Set(double) [with T = v8::Value]
   inline void Set(double i) {
               ^
../node_modules/nan/nan_callbacks_pre_12_inl.h:55:15: note:   no known conversion for argument 1 from ‘v8::Handle<v8::Value>’ to ‘double’
../node_modules/nan/nan_callbacks_pre_12_inl.h:63:15: note: void Nan::ReturnValue<T>::Set(int32_t) [with T = v8::Value; int32_t = int]
   inline void Set(int32_t i) {
               ^
../node_modules/nan/nan_callbacks_pre_12_inl.h:63:15: note:   no known conversion for argument 1 from ‘v8::Handle<v8::Value>’ to ‘int32_t {aka int}’
../node_modules/nan/nan_callbacks_pre_12_inl.h:71:15: note: void Nan::ReturnValue<T>::Set(uint32_t) [with T = v8::Value; uint32_t = unsigned int]
   inline void Set(uint32_t i) {
               ^
../node_modules/nan/nan_callbacks_pre_12_inl.h:71:15: note:   no known conversion for argument 1 from ‘v8::Handle<v8::Value>’ to ‘uint32_t {aka unsigned int}’
../node_modules/nan/nan_callbacks_pre_12_inl.h:111:15: note: template<class S> void Nan::ReturnValue<T>::Set(S*) [with S = S; T = v8::Value]
   inline void Set(S *whatever) { TYPE_CHECK(S*, v8::Primitive); }
               ^
../node_modules/nan/nan_callbacks_pre_12_inl.h:111:15: note:   template argument deduction/substitution failed:
../src/talib.cpp:367:62: note:   mismatched types ‘S*’ and ‘v8::Handle<v8::Value>’
     info.GetReturnValue().Set(TA_EXPLAIN_FUNCTION(*func_name));
                                                              ^
../src/talib.cpp: In function ‘void Init(v8::Handle<v8::Object>, v8::Handle<v8::Object>)’:
../src/talib.cpp:1066:78: error: no matching function for call to ‘SetAccessor(v8::Handle<v8::Object>&, v8::Local<v8::String>, Nan::NAN_GETTER_RETURN_TYPE (&)(v8::Local<v8::String>, Nan::NAN_GETTER_ARGS_TYPE))’
     SetAccessor(exports, New<String>("functions").ToLocalChecked(), Functions);
                                                                              ^
../src/talib.cpp:1066:78: note: candidates are:
In file included from ../src/talib.cpp:29:0:
../node_modules/nan/nan.h:1980:13: note: bool Nan::SetAccessor(v8::Local<v8::Object>, v8::Local<v8::String>, Nan::GetterCallback, Nan::SetterCallback, v8::Local<v8::Value>, v8::AccessControl, v8::PropertyAttribute)
 inline bool SetAccessor(
             ^
../node_modules/nan/nan.h:1980:13: note:   no known conversion for argument 1 from ‘v8::Handle<v8::Object>’ to ‘v8::Local<v8::Object>’
../node_modules/nan/nan.h:1936:13: note: void Nan::SetAccessor(v8::Local<v8::ObjectTemplate>, v8::Local<v8::String>, Nan::GetterCallback, Nan::SetterCallback, v8::Local<v8::Value>, v8::AccessControl, v8::PropertyAttribute, Nan::imp::Sig)
 inline void SetAccessor(
             ^
../node_modules/nan/nan.h:1936:13: note:   no known conversion for argument 1 from ‘v8::Handle<v8::Object>’ to ‘v8::Local<v8::ObjectTemplate>’
../src/talib.cpp:1067:90: error: no matching function for call to ‘SetAccessor(v8::Handle<v8::Object>&, v8::Local<v8::String>, Nan::NAN_GETTER_RETURN_TYPE (&)(v8::Local<v8::String>, Nan::NAN_GETTER_ARGS_TYPE))’
     SetAccessor(exports, New<String>("functionUnstIds").ToLocalChecked(), FunctionUnstIds);
                                                                                          ^
../src/talib.cpp:1067:90: note: candidates are:
In file included from ../src/talib.cpp:29:0:
../node_modules/nan/nan.h:1980:13: note: bool Nan::SetAccessor(v8::Local<v8::Object>, v8::Local<v8::String>, Nan::GetterCallback, Nan::SetterCallback, v8::Local<v8::Value>, v8::AccessControl, v8::PropertyAttribute)
 inline bool SetAccessor(
             ^
../node_modules/nan/nan.h:1980:13: note:   no known conversion for argument 1 from ‘v8::Handle<v8::Object>’ to ‘v8::Local<v8::Object>’
../node_modules/nan/nan.h:1936:13: note: void Nan::SetAccessor(v8::Local<v8::ObjectTemplate>, v8::Local<v8::String>, Nan::GetterCallback, Nan::SetterCallback, v8::Local<v8::Value>, v8::AccessControl, v8::PropertyAttribute, Nan::imp::Sig)
 inline void SetAccessor(
             ^
../node_modules/nan/nan.h:1936:13: note:   no known conversion for argument 1 from ‘v8::Handle<v8::Object>’ to ‘v8::Local<v8::ObjectTemplate>’
make: *** [Release/obj.target/talib/src/talib.o] Error 1
make: Leaving directory `/home/master/zenbot/node_modules/talib/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/share/node-gyp/lib/build.js:267:23)
gyp ERR! stack     at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:797:12)
gyp ERR! System Linux 3.13.0-32-generic
gyp ERR! command "nodejs" "/usr/bin/node-gyp" "build"
gyp ERR! cwd /home/master/zenbot/node_modules/talib
gyp ERR! node -v v0.10.25
gyp ERR! node-gyp -v v0.10.10
gyp ERR! not ok
npm WARN This failure might be due to the use of legacy binary "node"
npm WARN For further explanations, please read
/usr/share/doc/nodejs/README.Debian

npm ERR! weird error 1
npm http GET https://registry.npmjs.org/nan
npm http 304 https://registry.npmjs.org/nan

> forex.analytics@0.0.14 postinstall /home/master/zenbot/node_modules/forex.analytics
> node-gyp configure && node-gyp build

make: Entering directory `/home/master/zenbot/node_modules/forex.analytics/build'
  CXX(target) Release/obj.target/analytics/src/BinaryTreeFitness.o
In file included from /usr/include/c++/4.8/random:35:0,
                 from ../src/../include/stdafx.h:13,
                 from ../src/../include/BinaryTreeFitness.h:2,
                 from ../src/BinaryTreeFitness.cpp:1:
/usr/include/c++/4.8/bits/c++0x_warning.h:32:2: error: #error This file requires compiler and library support for the ISO C++ 2011 standard. This support is currently experimental, and must be enabled with the -std=c++11 or -std=gnu++11 compiler options.
 #error This file requires compiler and library support for the \
  ^
In file included from ../src/../include/nodes/TreeNode.h:2:0,
                 from ../src/../include/BinaryTreeChromosome.h:4,
                 from ../src/../include/BinaryTreeFitness.h:3,
                 from ../src/BinaryTreeFitness.cpp:1:
../src/../include/nodes/../indicators/BaseIndicator.h:34:9: error: ‘random_device’ in namespace ‘std’ does not name a type
  static std::random_device r;
         ^
../src/../include/nodes/../indicators/BaseIndicator.h:36:2: error: ‘mt19937’ in namespace ‘std’ does not name a type
  std::mt19937 engine;
  ^
../src/../include/nodes/../indicators/BaseIndicator.h:37:2: error: ‘uniform_real_distribution’ in namespace ‘std’ does not name a type
  std::uniform_real_distribution<double> uniform_dist;
  ^
../src/../include/nodes/../indicators/BaseIndicator.h:42:21: warning: non-static data member initializers only available with -std=c++11 or -std=gnu++11 [enabled by default]
  std::string Name = "";
                     ^
../src/../include/nodes/../indicators/BaseIndicator.h: In member function ‘virtual double BaseIndicator::getRandomValue()’:
../src/../include/nodes/../indicators/BaseIndicator.h:58:16: error: ‘class BaseIndicator’ has no member named ‘uniform_dist’
   return this->uniform_dist(engine);
                ^
../src/../include/nodes/../indicators/BaseIndicator.h:58:29: error: ‘engine’ was not declared in this scope
   return this->uniform_dist(engine);
                             ^
../src/../include/nodes/../indicators/BaseIndicator.h: In constructor ‘BaseIndicator::BaseIndicator()’:
../src/../include/nodes/../indicators/BaseIndicator.h:63:3: error: ‘seed_seq’ is not a member of ‘std’
   std::seed_seq seed{ r(), r(), r(), r(), r(), r(), r(), r() };
   ^
../src/../include/nodes/../indicators/BaseIndicator.h:63:17: error: expected ‘;’ before ‘seed’
   std::seed_seq seed{ r(), r(), r(), r(), r(), r(), r(), r() };
                 ^
../src/../include/nodes/../indicators/BaseIndicator.h:64:9: error: ‘class BaseIndicator’ has no member named ‘engine’
   this->engine = std::mt19937(seed);
         ^
../src/../include/nodes/../indicators/BaseIndicator.h:64:18: error: ‘mt19937’ is not a member of ‘std’
   this->engine = std::mt19937(seed);
                  ^
../src/../include/nodes/../indicators/BaseIndicator.h:64:31: error: ‘seed’ was not declared in this scope
   this->engine = std::mt19937(seed);
                               ^
In file included from ../src/../include/BinaryTreeChromosome.h:4:0,
                 from ../src/../include/BinaryTreeFitness.h:3,
                 from ../src/BinaryTreeFitness.cpp:1:
../src/../include/nodes/TreeNode.h: At global scope:
../src/../include/nodes/TreeNode.h:7:9: error: ‘random_device’ in namespace ‘std’ does not name a type
  static std::random_device r;
         ^
../src/../include/nodes/TreeNode.h:9:2: error: ‘mt19937’ in namespace ‘std’ does not name a type
  std::mt19937 engine;
  ^
../src/BinaryTreeFitness.cpp: In member function ‘void BinaryTreeFitness::CalculateFitness(const std::vector<BinaryTreeChromosome*>*) const’:
../src/BinaryTreeFitness.cpp:26:47: error: ‘std::thread’ has not been declared
     unsigned concurentThreadsSupported = std::thread::hardware_concurrency();
                                               ^
../src/BinaryTreeFitness.cpp:35:21: error: ‘thread’ is not a member of ‘std’
         std::vector<std::thread *> threads;
                     ^
../src/BinaryTreeFitness.cpp:35:21: error: ‘thread’ is not a member of ‘std’
../src/BinaryTreeFitness.cpp:35:34: error: template argument 1 is invalid
         std::vector<std::thread *> threads;
                                  ^
../src/BinaryTreeFitness.cpp:35:34: error: template argument 2 is invalid
../src/BinaryTreeFitness.cpp:35:43: error: invalid type in declaration before ‘;’ token
         std::vector<std::thread *> threads;
                                           ^
../src/BinaryTreeFitness.cpp:41:21: error: request for member ‘push_back’ in ‘threads’, which is of non-class type ‘int’
             threads.push_back(new std::thread(
                     ^
../src/BinaryTreeFitness.cpp:41:35: error: expected type-specifier
             threads.push_back(new std::thread(
                                   ^
../src/BinaryTreeFitness.cpp:39:17: warning: unused variable ‘begin’ [-Wunused-variable]
             int begin = static_cast<int>(ceil(i * size));
                 ^
../src/BinaryTreeFitness.cpp:52:22: error: invalid types ‘int[unsigned int]’ for array subscript
             threads[i]->join();
                      ^
../src/BinaryTreeFitness.cpp:53:29: error: invalid types ‘int[unsigned int]’ for array subscript
             delete threads[i];
                             ^
In file included from ../src/../include/nodes/TreeNode.h:2:0,
                 from ../src/../include/BinaryTreeChromosome.h:4,
                 from ../src/../include/BinaryTreeFitness.h:3,
                 from ../src/BinaryTreeFitness.cpp:1:
../src/../include/nodes/../indicators/BaseIndicator.h: In member function ‘virtual double BaseIndicator::getRandomValue()’:
../src/../include/nodes/../indicators/BaseIndicator.h:59:2: warning: control reaches end of non-void function [-Wreturn-type]
  }
  ^
make: *** [Release/obj.target/analytics/src/BinaryTreeFitness.o] Error 1
make: Leaving directory `/home/master/zenbot/node_modules/forex.analytics/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/share/node-gyp/lib/build.js:267:23)
gyp ERR! stack     at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:797:12)
gyp ERR! System Linux 3.13.0-32-generic
gyp ERR! command "nodejs" "/usr/bin/node-gyp" "build"
gyp ERR! cwd /home/master/zenbot/node_modules/forex.analytics
gyp ERR! node -v v0.10.25
gyp ERR! node-gyp -v v0.10.10
gyp ERR! not ok
npm WARN This failure might be due to the use of legacy binary "node"
npm WARN For further explanations, please read
/usr/share/doc/nodejs/README.Debian

npm ERR! not ok code 0
master@ubuntu:~/zenbot$

What platform do you recommend for a smooth installation?

@andreireiand
Copy link
Author

last line might have been lost in the output ...
What platform do you recommend for a smooth installation?

thanks

@DeviaVir
Copy link
Owner

DeviaVir commented Oct 6, 2017

Please note the node version:

node -v v0.10.25

Can you try with a more recent LTS/Stable Node version?

@andreireiand
Copy link
Author

cannot make it work, even using node 6.x ... how is the setup on Windows 10?
again ... is there a clear guideline on:

  1. steps for win 10
  2. will also try again on ubuntu 17.04

@andreireiand
Copy link
Author

worked only after:

sudo npm install -g n
sudo n latest

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants