Community
cancel
Showing results for 
Search instead for 
Did you mean: 
CKEBR
Novice
2,224 Views

Wind River Linux 7 /w Galileo-IO NPM

Hi,

I'm using WR Linux 7 on a Galileo Gen 2 board. I can't seem to get Galileo-IO/MRAA package to install on my platform.

I install the package:

root@147:~# npm install galileo-io

/> galileo-io@0.9.4 postinstall /root/node_modules/galileo-io> node scripts/postinstallgalileo-io@0.9.4 node_modules/galileo-io

├── es6-promise@3.1.2

├── remapped@0.2.1 (getobject@0.1.0, traverse@0.6.6)

└── es6-shim@0.34.4

But I receive and error when trying to run any code JS code that requires the package:

Error: Cannot find module 'galileo-io'

at Function.Module._resolveFilename (module.js:338:15)

at Function.Module._load (module.js:280:25)

at Module.require (module.js:364:17)

at require (module.js:380:17)

at Object. (/users/ckebriti/BASIC_WEBPAGE/helloweb.js:47:15)

at Module._compile (module.js:456:26)

at Object.Module._extensions..js (module.js:474:10)

at Module.load (module.js:356:32)

at Function.Module._load (module.js:312:12)

at Module.runMain [as _onTimeout] (module.js:497:10)

Process exited with exit code 8

Tags (1)
11 Replies
CKEBR
Novice
108 Views

I'm not entirely sure but I think there is a dependency on MRAA being installed. Here's the error I received when trying to install.

root@147:~# npm install mraa

\

> mraa@0.9.3 install /root/node_modules/mraa

> node-gyp rebuild

gyp ERR! build error

gyp ERR! stack Error: not found: make

gyp ERR! stack at F (/usr/lib/node_modules/npm/node_modules/which/which.js:43:28)

gyp ERR! stack at E (/usr/lib/node_modules/npm/node_modules/which/which.js:46:29)

gyp ERR! stack at /usr/lib/node_modules/npm/node_modules/which/which.js:57:16

gyp ERR! stack at Object.oncomplete (evalmachine.:108:15)

gyp ERR! System Linux 3.14.29ltsi-WR7.0.0.3_standard

gyp ERR! command "node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"

gyp ERR! cwd /root/node_modules/mraa

gyp ERR! node -v v0.10.38

gyp ERR! node-gyp -v v1.0.1

gyp ERR! not ok

npm ERR! mraa@0.9.3 install: `node-gyp rebuild`

npm ERR! Exit status 1

npm ERR!

npm ERR! Failed at the mraa@0.9.3 install script.

npm ERR! This is most likely a problem with the mraa 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 their info via:

npm ERR! npm owner ls mraa

npm ERR! There is likely additional logging output above.

npm ERR! System Linux 3.14.29ltsi-WR7.0.0.3_standard

npm ERR! command "node" "/usr/bin/npm" "install" "mraa"

npm ERR! cwd /root

npm ERR! node -v v0.10.38

npm ERR! npm -v 1.4.28

npm ERR! code ELIFECYCLE

npm ERR! not ok code 0

Sergio_A_Intel
Employee
108 Views

Hi,

I'd suggest you to post your question in the Wind river forum https://ask.intel.windriver.com/ https://ask.intel.windriver.com/ . They'll be able to provide a more accurate response.

Sergio

asss
Valued Contributor II
108 Views

Hi,

you have no make tool installed:

gyp ERR! stack Error: not found: make

Need to install it.

BR,

xbolshe

CKEBR
Novice
108 Views

Sorry, I had the wrong output. That was when trying to npm install from user root. I think app.cloud.windriver.com puts some protections in place to avoid the user from installing packages as root. Below is output from when I try to install MRAA.

ckebriti@helix-app-cloud:~/BASIC_WEBPAGE$ npm install mraa

npm WARN package.json galileo@0.0.0 No repository field.

npm http GET https://registry.npmjs.org/mraa https://registry.npmjs.org/mraa

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

> mraa@0.9.6 install /users/ckebriti/BASIC_WEBPAGE/node_modules/mraa

> node-gyp rebuild

Traceback (most recent call last):

File "/helixInstall/sdks/wrl7_galileogen2/7.3.0.7/sdk/sysroots/x86_64-wrlinuxsdk-linux/usr/lib/python2.7/site.py", line 569, in

main()

File "/helixInstall/sdks/wrl7_galileogen2/7.3.0.7/sdk/sysroots/x86_64-wrlinuxsdk-linux/usr/lib/python2.7/site.py", line 551, in main

known_paths = addusersitepackages(known_paths)

File "/helixInstall/sdks/wrl7_galileogen2/7.3.0.7/sdk/sysroots/x86_64-wrlinuxsdk-linux/usr/lib/python2.7/site.py", line 278, in addusersitepackages

user_site = getusersitepackages()

File "/helixInstall/sdks/wrl7_galileogen2/7.3.0.7/sdk/sysroots/x86_64-wrlinuxsdk-linux/usr/lib/python2.7/site.py", line 253, in getusersitepackages

user_base = getuserbase() # this will also set USER_BASE

File "/helixInstall/sdks/wrl7_galileogen2/7.3.0.7/sdk/sysroots/x86_64-wrlinuxsdk-linux/usr/lib/python2.7/site.py", line 242, in getuserbase

from sysconfig import get_config_var

File "/helixInstall/sdks/wrl7_galileogen2/7.3.0.7/sdk/sysroots/x86_64-wrlinuxsdk-linux/usr/lib/python2.7/sysconfig.py", line 10, in

'stdlib': '{base}/'+sys.lib+'/python{py_version_short}',

AttributeError: 'module' object has no attribute 'lib'

gyp ERR! configure error

gyp ERR! stack Error: `gyp` failed with exit code: 1

gyp ERR! stack at ChildProcess.onCpExit (/usr/share/node-gyp/lib/configure.js:431:16)

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-48-generic

gyp ERR! command "nodejs" "/usr/bin/node-gyp" "rebuild"

gyp ERR! cwd /users/ckebriti/BASIC_WEBPAGE/node_modules/mraa

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 ERR! not ok code 0

asss
Valued Contributor II
108 Views

Try to check the following:

python

>> import sys

>> sys.version

>> sys.path

>> sys.lib

BR,

xbolshe

CKEBR
Novice
108 Views

ckebriti@helix-app-cloud:~/BASIC_WEBPAGE$ python

Python 2.7.3 (default, Aug 6 2015, 19:46:36)

[GCC 4.9.1] on linux2

Type "help", "copyright", "credits" or "license" for more information.

>>> import sys

>>> sys.version

'2.7.3 (default, Aug 6 2015, 19:46:36) \n[GCC 4.9.1]'

>>> sys.path

['', '/helixInstall/sdks/wrl7_galileogen2/7.3.0.7/sdk/sysroots/x86_64-wrlinuxsdk-linux/usr/lib/python27.zip', '/helixInstall/sdks/wrl7_galileogen2/7.3.0.7/sdk/sysroots/x86_64-wrlinuxsdk-linux/usr/lib/python2.7', '/helixInstall/sdks/wrl7_galileogen2/7.3.0.7/sdk/sysroots/x86_64-wrlinuxsdk-linux/usr/lib/python2.7/plat-linux2', '/helixInstall/sdks/wrl7_galileogen2/7.3.0.7/sdk/sysroots/x86_64-wrlinuxsdk-linux/usr/lib/python2.7/lib-tk', '/helixInstall/sdks/wrl7_galileogen2/7.3.0.7/sdk/sysroots/x86_64-wrlinuxsdk-linux/usr/lib/python2.7/lib-old', '/helixInstall/sdks/wrl7_galileogen2/7.3.0.7/sdk/sysroots/x86_64-wrlinuxsdk-linux/usr/lib/python2.7/lib-dynload', '/helixInstall/sdks/wrl7_galileogen2/7.3.0.7/sdk/sysroots/x86_64-wrlinuxsdk-linux/usr/lib/python2.7/site-packages']

>>> sys.lib

'lib'

>>>

asss
Valued Contributor II
108 Views

Try these commands:

env

export PYTHONHOME=/helixInstall/sdks/wrl7_galileogen2/7.3.0.7/sdk/sysroots/x86_64-wrlinuxsdk-linux/usr/

npm install mraa

BR,

xbolshe

CKEBR
Novice
108 Views

ckebriti@helix-app-cloud:~/BASIC_WEBPAGE$ env

AS=i586-wrs-linux-as

LDFLAGS=-Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed

AR=i586-wrs-linux-ar

OECORE_TARGET_SYSROOT=/helixInstall/sdks/wrl7_galileogen2/7.3.0.7/sdk/sysroots/i586-wrs-linux

TARGET_PREFIX=i586-wrs-linux-

M4=m4

COMP_WORDBREAKS=

"'><;|&(:

SHELL=/bin/bash

TERM=xterm-256color

NM=i586-wrs-linux-nm

OECORE_DISTRO_VERSION=7.0.0.3

CPPFLAGS=

ISOUTPUTPANE=0

LD_PRELOAD=sw_btrace.so

WIND_PROJECT_ROOT=/users/ckebriti/BASIC_WEBPAGE

OECORE_SDK_VERSION=7.0-intel-quark

GDB=i586-wrs-linux-gdb

USER=ckebriti

LS_COLORS=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lz=01;31:*.xz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.axv=01;35:*.anx=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.axa=00;36:*.oga=00;36:*.spx=00;36:*.xspf=00;36:

LD_LIBRARY_PATH=/opt/c9v3/c9sdk/node_modules/clang_tooling/build/lib64:/opt/c9v3/c9sdk/node_modules/clang_tooling/build/lib32:~/.c9/local/lib

PKG_CONFIG_SYSROOT_DIR=/helixInstall/sdks/wrl7_galileogen2/7.3.0.7/sdk/sysroots/i586-wrs-linux

CXXFLAGS= -O2 -pipe -g

CONFIG_SITE=/helixInstall/sdks/wrl7_galileogen2/7.3.0.7/sdk/site-config-i586-wrs-linux

COLUMNS=185

TMUX=/tmp/tmux-21502/cloud9_BASIC_WEBPAGE_3515,731,1

CPP=i586-wrs-linux-gcc -E -m32 -march=i586 --sysroot=/helixInstall/sdks/wrl7_galileogen2/7.3.0.7/sdk/sysroots/i586-wrs-linux

MAIL=/var/mail/ckebriti

PATH=/helixInstall/sdks/wrl7_galileogen2/7.3.0.7/sdk/sysroots/x86_64-wrlinuxsdk-linux/usr/bin:/helixInstall/sdks/wrl7_galileogen2/7.3.0.7/sdk/sysroots/x86_64-wrlinuxsdk-linux/usr/bin/i586-wrs-linux:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games

WRSD_LICENSE_FILE=27000@172.17.42.1

LD=i586-wrs-linux-ld --sysroot=/helixInstall/sdks/wrl7_galileogen2/7.3.0.7/sdk/sysroots/i586-wrs-linux

PWD=/users/ckebriti/BASIC_WEBPAGE

STRIP=i586-wrs-linux-strip

NODE_PATH=/opt/c9v3/.c9/node_modules

PYTHONHOME=/helixInstall/sdks/wrl7_galileogen2/7.3.0.7/sdk/sysroots/x86_64-wrlinuxsdk-linux/usr

OECORE_NATIVE_SYSROOT=/helixInstall/sdks/wrl7_galileogen2/7.3.0.7/sdk/sysroots/x86_64-wrlinuxsdk-linux

TMUX_PANE=%1

CONFIGURE_FLAGS=--target=i586-wrs-linux --host=i586-wrs-linux --build=x86_64-linux --with-libtool-sysroot=/helixInstall/sdks/wrl7_galileogen2/7.3.0.7/sdk/sysroots/i586-wrs-linux

LINES=32

LM_LICENSE_FILE=27000@172.17.42.1

WIND_PROJECT_NAME=BASIC_WEBPAGE

CXX=i586-wrs-linux-g++ -m32 -march=i586 --sysroot=/helixInstall/sdks/wrl7_galileogen2/7.3.0.7/sdk/sysroots/i586-wrs-linux

OBJCOPY=i586-wrs-linux-objcopy

HOME=/users/ckebriti

SHLVL=4

CFLAGS= -O2 -pipe -g

LOGNAME=ckebriti

PROJECT_ENV_PATH=/users/ckebriti/BASIC_WEBPAGE/.scripts/env.sh

OECORE_ACLOCAL_OPTS=-I /helixInstall/sdks/wrl7_galileogen2/7.3.0.7/sdk/sysroots/x86_64-wrlinuxsdk-linux/usr/share/aclocal

PKG_CONFIG_PATH=/helixInstall/sdks/wrl7_galileogen2/7.3.0.7/sdk/sysroots/i586-wrs-linux/usr/lib/pkgconfig

LESSOPEN=| /usr/bin/lesspipe %s

ARCH=x86

RANLIB=i586-wrs-linux-ranlib

CUSTOM=43

BTRACE_LOG=/users/ckebriti/BASIC_WEBPAGE/.index/btrace.log

CROSS_COMPILE=i586-wrs-linux-

CC=i586-wrs-linux-gcc -m32 -march=i586 --sysroot=/helixInstall/sdks/wrl7_galileogen2/7.3.0.7/sdk/sysroots/i586-wrs-linux

OBJDUMP=i586-wrs-linux-objdump

LESSCLOSE=/usr/bin/lesspipe %s %s

SDKTARGETSYSROOT=/helixInstall/sdks/wrl7_galileogen2/7.3.0.7/sdk/sysroots/i586-wrs-linux

_=/usr/bin/env

ckebriti@helix-app-cloud:~/BASIC_WEBPAGE$ export PYTHONHOME=/usr

ckebriti@helix-app-cloud:~/BASIC_WEBPAGE$ npm install mraa

npm WARN package.json galileo@0.0.0 No repository field.

npm http GET https://registry.npmjs.org/mraa https://registry.npmjs.org/mraa

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

> mraa@0.9.6 install /users/ckebriti/BASIC_WEBPAGE/node_modules/mraa

> node-gyp rebuild

make: Entering directory `/users/ckebriti/BASIC_WEBPAGE/node_modules/mraa/build'

CC(target) Release/obj.target/mraa/src/x86/up.o

cc1: warning: include location "/usr/include/nodejs/src" is unsafe for cross-compilation [-Wpoison-system-directories]

cc1: warning: include location "/usr/include/nodejs/deps/uv/include" is unsafe for cross-compilation [-Wpoison-system-directories]

cc1: warning: include location "/usr/include/nodejs/deps/v8/include" is unsafe for cross-compilation [-Wpoison-system-directories]

../src/x86/up.c:1:0: error: CPU you selected does not support x86-64 instruction set

^

../src/x86/up.c:1:0: error: CPU you selected does not support x86-64 instruction set

make: *** [Release/obj.target/mraa/src/x86/up.o] Error 1

make: Leaving directory `/users/ckebriti/BASIC_WEBPAGE/node_modules/mraa/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-48-generic

gyp ERR! command "nodejs" "/usr/bin/node-gyp" "rebuild"

gyp ERR! cwd /users/ckebriti/BASIC_WEBPAGE/node_modules/mraa

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 ERR! not ok code 0

CKEBR
Novice
108 Views

Extra info:

ckebriti@helix-app-cloud:~/BASIC_WEBPAGE$ env | grep -i pythonhome

PYTHONHOME=/usr

ckebriti@helix-app-cloud:~/BASIC_WEBPAGE$ echo $PYTHONHOME

/usr

ckebriti@helix-app-cloud:~/BASIC_WEBPAGE$ ls /usr

arm-none-eabi bin games include lib lib32 libx32 local sbin share src

ckebriti@helix-app-cloud:~/BASIC_WEBPAGE$ which python

/helixInstall/sdks/wrl7_galileogen2/7.3.0.7/sdk/sysroots/x86_64-wrlinuxsdk-linux/usr/bin/python

Sergio_A_Intel
Employee
108 Views

Take a look at these two links

They discuss an error similar to yours, maybe you can find it helpful.

Remember you can also post your question in the Windriver Forum we posted above. They'll be able to provide a more detailed suggestion since they're the ones who support that image.

Sergio

idata
Community Manager
108 Views

Please note that ask.intel.windriver.com is being discontinued. Anyone with a Wind River support license and login can access their support forum at http://ask.windriver.com/ http://ask.windriver.com . There is also an Intel IoT Gateway Support Community Forum at: /community/tech/iot-gateway https://communities.intel.com/community/tech/iot-gateway