Error when trying to install
bawdy opened this issue · 1 comments
Hello,
when trying to install the module by running npm install @moovel/yolo --save
, I get the following error message:
make: Entering directory '/home/user/Projects/test_proj/node_modules/@moovel/yolo/build'
CXX(target) Release/obj.target/darknet/darknet.o
CXX(target) Release/obj.target/darknet/src/demo.o
SOLINK_MODULE(target) Release/obj.target/darknet.node
/usr/bin/ld: cannot find -lcudart
/usr/bin/ld: cannot find -lcublas
/usr/bin/ld: cannot find -lcurand
collect2: error: ld returned 1 exit status
darknet.target.mk:151: recipe for target 'Release/obj.target/darknet.node' failed
make: *** [Release/obj.target/darknet.node] Error 1
make: Leaving directory '/home/user/Projects/test_proj/node_modules/@moovel/yolo/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:258:23)
gyp ERR! stack at emitTwo (events.js:125:13)
gyp ERR! stack at ChildProcess.emit (events.js:213:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Linux 4.4.0-101-generic
gyp ERR! command "/usr/bin/nodejs" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/user/Projects/test_proj/node_modules/@moovel/yolo
gyp ERR! node -v v8.4.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @moovel/yolo@0.2.0 install: 'node-gyp rebuild'
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @moovel/yolo@0.2.0 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/user/.npm/_logs/2017-11-27T18_05_16_630Z-debug.log
Judging from the lines similar to /usr/bin/ld: cannot find -lcudart
, I would there is a problem with CUDA, but this message even occurs when I set GPU=0 as a make
option.
I would be very thankful for any help.
Fixed by running:
sudo ln -s /usr/local/cuda/lib64/libcudart.so /usr/lib/libcudart.so
sudo ln -s /usr/local/cuda/lib64/libcublas.so /usr/lib/libcublas.so
sudo ln -s /usr/local/cuda/lib64/libcurand.so /usr/lib/libcurand.so