node-multi-hashing icon indicating copy to clipboard operation
node-multi-hashing copied to clipboard

Failed at the [email protected] install script 'node-gyp rebuild'

Open ghost opened this issue 9 years ago • 24 comments

Hi! I've got node 5.3.0 installed with npm 3.3.12 installed and gcc 4.8.4

When I run npm update on node-open-mining-portal when it reaches the stratum-pool dependency node-gyp rebuild fails with exit code 1. I've found that it is because of the module multi-hashing.

Is multi-hashing broken with my version of node? Do I need node 0.10? I don't really want to install that as it's pretty outdated.

Thanks for any help.

EDIT: Yes, I do have libssl-dev installed using sudo apt-get install libssl-dev

ghost avatar Jan 03 '16 12:01 ghost

This may look nonsense, but download zip or clone repo then install like npm install ./node-multi-hashing. I've spent many hours trying to compile that module from SEVERAL machines, so finally i've tried downloading packages. Anyway, installing stuff on npm has become a kidding experience for me. Hate it.

erm3nda avatar Jan 03 '16 16:01 erm3nda

I tried both git clone and downloading it from zip then using npm install to install the package locally and neither worked. Any other suggestions?

ghost avatar Jan 03 '16 16:01 ghost

Yes, one more: download this https://mega.nz/#!bBtHQLrJ!c9fNeG45BlQo8dcY-i-jCykzRNbShZm1oKhz0nnqmK8 pre-compiled module. I've built it less than hour ago, Debian 8 64bit.

Add the zip contents inside node_modules.

erm3nda avatar Jan 03 '16 16:01 erm3nda

I've downloaded it and placed the multi-hashing folder into node_modules but when I try to use it I get the error: Error: Module did not self-register.

Any ideas? I'm running Ubuntu 14.04 by the way. It's still Debian based though, so that shouldn't be the problem

ghost avatar Jan 03 '16 17:01 ghost

Also, I am using this module in NOMP which requires stratum-pool which has a module dependency for multi-hashing which is why I created the issue here. I've placed the multi-hashing folder that you gave me in the node_modules folder of stratum-pool which is in the node_modules folder of NOMP because that is where I thought it was supposed to be.

ghost avatar Jan 03 '16 17:01 ghost

I had your same problem building unomp, wich SAME dependancy and only get it compiled from a Linux Machine. Im not a regular user of Node, so I didn't know that i can't simply copy the folder. Im stucked in the same place. I'll come here if found anything new.

erm3nda avatar Jan 03 '16 18:01 erm3nda

Also, readed something about use Node 0.10 for multi-hashing module. Try node-gyp rebuild but im pretty sure that this would try to compile again that module, then fail. Srry.

erm3nda avatar Jan 03 '16 18:01 erm3nda

I'm going to look into rewriting the module so that it can be used with newer versions of node

ghost avatar Jan 03 '16 18:01 ghost

Can you tell me how you built the library on Debian? What version of Node.js and NPM did you have and what commands did you use to install it?

ghost avatar Jan 03 '16 20:01 ghost

I've built in my own Laptop using Debian 8 Jessie x64, and finally did the work.

node -v 0.10.29
npm -v 1.3.10
SOLINK_MODULE(target) Release/obj.target/multihashing.node: Finished
COPY Release/multihashing.node
make: Leaving directory '/home/m3nda/test/compile/node_modules/multi-hashing/build'
[email protected] node_modules/multi-hashing
└── [email protected]

Also created a VPS with Debian 8 Jessie and worked again, succesfully run the unomp. Dependancy build-essentials, libssl-dev and nothing more.

But, i've tried 2 more Linux boxes without luck before.

Try Debian if you can.

erm3nda avatar Jan 03 '16 21:01 erm3nda

In another server I have with CentOS 7 i got:

Error: Cannot find module './lib/cookies'

but module compiles too.

npm ERR! node -v v0.10.25
npm ERR! npm -v 1.3.10

erm3nda avatar Jan 03 '16 21:01 erm3nda

On Windows was impossible to build dependancy bignum

erm3nda avatar Jan 03 '16 21:01 erm3nda

Ok, I've figured out the problem: This project is build using node 0.10, hence the binding support is also for node 0.10. I am rewriting the bindings using nan so that it will support node 0.10 all the way to node 4.0.0. I will keep you updated.

ghost avatar Jan 03 '16 21:01 ghost

Find a fix for node 0.12.9. Trying update it to node 5.0 and NAN ^2.0 make me crazy tonight)) Here pull request https://github.com/zone117x/node-multi-hashing/pull/32

webchi avatar Jan 19 '16 17:01 webchi

I've already read the issue that you got that code from. I have also already re-written the bindings to make them work with node 4.3.0. Feel free to make them work with node 5.0 I've already tried with no success

ghost avatar Jan 19 '16 19:01 ghost

Can you share the updated bindings?

crusher72 avatar Dec 15 '16 00:12 crusher72

great. so here is the command line for non-experts: install this module on a modern version of node ( 6.9.4 ):

apt-get install -y build-essential git
cd node_modules
git clone https://github.com/UNOMP/node-multi-hashing
cd node-multi-hashing
git fetch origin pull/5/head:BRANCHNAME
git checkout BRANCHNAME
npm install

ghost avatar Jan 15 '17 16:01 ghost

What buechling did worked for me on ubuntu 16.x, node -v == v6.10.0, and npm -v == 3.10.10

edilio avatar Mar 10 '17 22:03 edilio

On node-js version 4.6.1 does not work too.

../multihashing.cc:255:77: error: no matching function for call to 'v8::FunctionTemplate::New(v8::Handlev8::Value (&)(const int&))' exports->Set(String::NewSymbol("scryptn"), FunctionTemplate::New(scryptn)->GetFunction());

........

sanitariu avatar May 30 '17 13:05 sanitariu

My fix was forcing node v0.10.29 with nvp install 0.10.29 (no luck with 6.x or 0.10.48). On ubuntu 14

nibbons avatar Jun 06 '17 02:06 nibbons

Not sure if this still exists for you guys, but I successfully worked around this issue using nvm. Here is the curl command to install nvm if you would like it curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.3/install.sh | bash

After that just run nvm install 0.10.25

Worked on every machine i've tested so far...although it is extremely outdated so I wouldn't use it in production..

xeddmc avatar Sep 04 '17 18:09 xeddmc

well, [email protected] worked for me on linux but on mac 0.10.25 or 0.10.29 - no success

I guess it is linux only

mikhailrojo avatar Nov 19 '17 21:11 mikhailrojo

export NVM_DIR="$HOME/.nvm" [ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm nvm install 0.10.25 cd pool npm update

sherifomran avatar Dec 28 '17 07:12 sherifomran

node 0.10.48 centos 7 works

fmarines avatar Apr 18 '18 19:04 fmarines