[SOLVED] NRP intstall error, Gzweb, "node-gyp: No such file or directory"


#1

Hi, when I install NRP in a fresh Ubuntu 16.04 in virtual box, I have encounted this error at last build all step. Could anyone give me some clues? The error is showed as following. Thanks!

NRP Install error:

gzweb
-------------------------
Now using node v0.10.48 (npm v2.15.1)
npm WARN package.json gzweb@2.0.5 No license field.
npm WARN unmet dependency /home/u16/Documents/NRP/gzweb/node_modules/request/node_modules/http-signature/node_modules/sshpk requires assert-plus@'^1.0.0' but will load
npm WARN unmet dependency /home/u16/Documents/NRP/gzweb/node_modules/request/node_modules/http-signature/node_modules/assert-plus,
npm WARN unmet dependency which is version 0.2.0
./deploy-gzbridge-nrp.sh: line 21: bower: command not found
-- The C compiler identification is GNU 5.4.0
-- The CXX compiler identification is GNU 5.4.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- gzweb version 1.1.0
CMake Warning (dev) at CMakeLists.txt:23 (set):
  Policy CMP0053 is not set: Simplify variable reference and escape sequence
  evaluation.  Run "cmake --help-policy CMP0053" for policy details.  Use the
  cmake_policy command to set the policy and suppress this warning.

  For input:

    '@PROJECT_NAME@-@GZWEB_VERSION_FULL@'

  the old evaluation rules produce:

    'gzweb-1.1.0'

  but the new evaluation rules produce:

    '@PROJECT_NAME@-@GZWEB_VERSION_FULL@'

  Using the old result for compatibility since the policy is not set.
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Build type not selected: Release selected by default
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.1") 
-- Checking for module 'gazebo>=1.9.0'
--   Found gazebo, version 7.2.0.hbp.2.0.5
-- Checking for module 'jansson'
--   Found jansson, version 2.7
-- Checking for module 'gts'
--   Found gts, version 0.7.6
-- Boost version: 1.58.0
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE  
-- Boost version: 1.58.0
-- Found the following Boost libraries:
--   system
--   filesystem
--   regex
--   thread
--   chrono
--   date_time
--   atomic
-- Found Protobuf: /usr/lib/x86_64-linux-gnu/libprotobuf.so  
-- Looking for tinyxml.h - found
-- Configuring done
-- Generating done
-- Build files have been written to: /home/u16/Documents/NRP/gzweb/build
Scanning dependencies of target gzcoarse
[ 50%] Building CXX object tools/CMakeFiles/gzcoarse.dir/gzcoarse.cc.o
[100%] Linking CXX executable gzcoarse
[100%] Built target gzcoarse
./deploy-gzbridge-nrp.sh: line 44: /home/u16/Documents/NRP/gzweb/node_modules/.bin/node-gyp: No such file or directory
./deploy-gzbridge-nrp.sh: line 45: /home/u16/Documents/NRP/gzweb/node_modules/.bin/node-gyp: No such file or directory
There are node-gyp build errors, exiting.
GZBRIDGE BUILD ERROR

#2

Hi Yanjun,

You may have overlooked step 5.3 of the NRP installation guide:

npm install -g bower

Best regards,
Luc


#3

Hi Luc, thank you for your reply. I tried this and it is the same. The log of ./deploy-gzbridge-nrp.sh: line 21: bower: command not found disappeared but others are still there. Still do not know where is the problem.


#4

Try deleting the node_modules directory inside gzweb and try again.


#5

Thanks Mahmoud and this solution works!