robotjs is not getting installed

Created on 12 Dec 2016  Â·  9Comments  Â·  Source: octalmage/robotjs

Current Behavior

prebuild WARN install No prebuilt binaries found (target=v7.2.1 arch=x64 platform=linux)
make: Entering directory '/home/apresswal/node_modules/robotjs/build'
CXX(target) Release/obj.target/robotjs/src/robotjs.o
cc1plus: warning: command line option ‘-Wbad-function-cast’ is valid for C/ObjC but not for C++
../src/robotjs.cc: In function ‘Nan::NAN_METHOD_RETURN_TYPE keyToggle(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/robotjs.cc:585:17: warning: ‘down’ may be used uninitialized in this function [-Wmaybe-uninitialized]
toggleKeyCode(key, down, flags);
^
CC(target) Release/obj.target/robotjs/src/deadbeef_rand.o
CC(target) Release/obj.target/robotjs/src/mouse.o
../src/mouse.c:12:35: fatal error: X11/extensions/XTest.h: No such file or directory
compilation terminated.
robotjs.target.mk:116: recipe for target 'Release/obj.target/robotjs/src/mouse.o' failed
make: * [Release/obj.target/robotjs/src/mouse.o] Error 1
make: Leaving directory '/home/apresswal/node_modules/robotjs/build'
prebuild ERR! build error
prebuild ERR! stack Error: make failed with exit code: 2
prebuild ERR! stack at ChildProcess.onExit (/home/apresswal/node_modules/node-gyp/lib/build.js:276:23)
prebuild ERR! stack at emitTwo (events.js:106:13)
prebuild ERR! stack at ChildProcess.emit (events.js:191:7)
prebuild ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)
prebuild ERR! not ok
prebuild ERR! build Error: make failed with exit code: 2
prebuild ERR! build at ChildProcess.onExit (/home/apresswal/node_modules/node-gyp/lib/build.js:276:23)
prebuild ERR! build at emitTwo (events.js:106:13)
prebuild ERR! build at ChildProcess.emit (events.js:191:7)
prebuild ERR! build at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)
/home/apresswal
-- [email protected] -- [email protected]
+-- [email protected]
`-- [email protected]

npm WARN enoent ENOENT: no such file or directory, open '/home/apresswal/package.json'
npm WARN apresswal No description
npm WARN apresswal No repository field.
npm WARN apresswal No README data
npm WARN apresswal No license field.
npm ERR! Linux 3.13.0-92-generic
npm ERR! argv "/opt/node/bin/node" "/usr/local/bin/npm" "install" "robotjs"
npm ERR! node v7.2.1
npm ERR! npm v3.10.10
npm ERR! code ELIFECYCLE

npm ERR! [email protected] install: prebuild --install
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the [email protected] install script 'prebuild --install'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the robotjs package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! prebuild --install
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs robotjs
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls robotjs
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! /home/apresswal/Desktop/co-desk/npm-debug.log

Your Environment


*electron version:1.4.10

Most helpful comment

same issue for me .
I resolve by install this libs try this way

sudo apt-get install libxtst-dev libpng++-dev

All 9 comments

Similar error for:

prebuild WARN install No prebuilt binaries found (target=v7.2.0 arch=x64 platform=win32)
prebuild ERR! configure error
prebuild ERR! stack Error: Python executable "C:\Users\...\AppData\Local\Programs\Python\Python35-32\python.EXE" is v3.5.2, which is not supported by gyp.
prebuild ERR! stack You can pass the --python switch to point to Python >= v2.5.0 & < 3.0.0.
prebuild ERR! stack     at failPythonVersion (C:\Users\...\node_modules\node-gyp\lib\configure.js:454:14)
prebuild ERR! stack     at C:\Users\...\node_modules\node-gyp\lib\configure.js:443:9
prebuild ERR! stack     at ChildProcess.exithandler (child_process.js:202:7)
prebuild ERR! stack     at emitTwo (events.js:106:13)
prebuild ERR! stack     at ChildProcess.emit (events.js:191:7)
prebuild ERR! stack     at maybeClose (internal/child_process.js:885:16)
prebuild ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
prebuild ERR! not ok
prebuild ERR! build Error: Python executable "C:\Users\...\AppData\Local\Programs\Python\Python35-32\python.EXE" is v3.5.2, which is not supported by gyp.
prebuild ERR! build You can pass the --python switch to point to Python >= v2.5.0 & < 3.0.0.
prebuild ERR! build     at failPythonVersion (C:\Users\...\node_modules\node-gyp\lib\configure.js:454:14)
prebuild ERR! build     at C:\Users\...\node_modules\node-gyp\lib\configure.js:443:9
prebuild ERR! build     at ChildProcess.exithandler (child_process.js:202:7)
prebuild ERR! build     at emitTwo (events.js:106:13)
prebuild ERR! build     at ChildProcess.emit (events.js:191:7)
prebuild ERR! build     at maybeClose (internal/child_process.js:885:16)
prebuild ERR! build     at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
npm WARN [email protected] No description
npm WARN [email protected] No repository field.
npm ERR! Windows_NT 10.0.14393
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "--save" "robotjs"
npm ERR! node v7.2.0
npm ERR! npm  v3.10.9
npm ERR! code ELIFECYCLE

npm ERR! [email protected] install: `prebuild --install`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the [email protected] install script 'prebuild --install'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the robotjs package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     prebuild --install
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs robotjs
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls robotjs
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     C:\Users\...\npm-debug.log
  • robotjs 0.4.5 (by default today)
  • Windows 10
  • Node.JS 7.2.0
  • npm 3.10.9

RobotJS does not have binaries for prebuilt to work for Node Version 7 and
up. Could you try with Node 6.9.2 while the binaries get updated ?

On Wed, Dec 28, 2016 at 6:21 AM, lilezek notifications@github.com wrote:

Similar error for:

prebuild WARN install No prebuilt binaries found (target=v7.2.0 arch=x64 platform=win32)
prebuild ERR! configure error
prebuild ERR! stack Error: Python executable "C:\Users...\AppData\Local\Programs\Python\Python35-32\python.EXE" is v3.5.2, which is not supported by gyp.
prebuild ERR! stack You can pass the --python switch to point to Python >= v2.5.0 & < 3.0.0.
prebuild ERR! stack at failPythonVersion (C:\Users...\node_modules\node-gyp\libconfigure.js:454:14)
prebuild ERR! stack at C:\Users...\node_modules\node-gyp\libconfigure.js:443:9
prebuild ERR! stack at ChildProcess.exithandler (child_process.js:202:7)
prebuild ERR! stack at emitTwo (events.js:106:13)
prebuild ERR! stack at ChildProcess.emit (events.js:191:7)
prebuild ERR! stack at maybeClose (internal/child_process.js:885:16)
prebuild ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
prebuild ERR! not ok
prebuild ERR! build Error: Python executable "C:\Users...\AppData\Local\Programs\Python\Python35-32\python.EXE" is v3.5.2, which is not supported by gyp.
prebuild ERR! build You can pass the --python switch to point to Python >= v2.5.0 & < 3.0.0.
prebuild ERR! build at failPythonVersion (C:\Users...\node_modules\node-gyp\libconfigure.js:454:14)
prebuild ERR! build at C:\Users...\node_modules\node-gyp\libconfigure.js:443:9
prebuild ERR! build at ChildProcess.exithandler (child_process.js:202:7)
prebuild ERR! build at emitTwo (events.js:106:13)
prebuild ERR! build at ChildProcess.emit (events.js:191:7)
prebuild ERR! build at maybeClose (internal/child_process.js:885:16)
prebuild ERR! build at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
npm WARN [email protected] No description
npm WARN [email protected] No repository field.
npm ERR! Windows_NT 10.0.14393
npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "install" "--save" "robotjs"
npm ERR! node v7.2.0
npm ERR! npm v3.10.9
npm ERR! code ELIFECYCLE

npm ERR! [email protected] install: prebuild --install
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the [email protected] install script 'prebuild --install'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the robotjs package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! prebuild --install
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs robotjs
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls robotjs
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! C:\Users...\npm-debug.log

  • robotjs 0.4.5 (by default today)
  • Windows 10
  • Node.JS 7.2.0
  • npm 3.10.9

—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/octalmage/robotjs/issues/253#issuecomment-269404594,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABZGY4TV5kNgrPC036_sTXvJxTI0ER2kks5rMbJ1gaJpZM4LKVmL
.

@vshymanskyy In your error, an error showed:

../src/mouse.c:12:35: fatal error: X11/extensions/XTest.h: No such file or directory

That means you're missing libxtst-dev, so just sudo apt-get install libxtst-dev.

@lilezek Your error is very different from the OP, your error caused by Python 3 on your system which is not supported, you should install python 2.x instead.

@twang2218 right. I pasted the wrong log. With python2.8+ I get the same log as OP.

This should be resolved by v0.4.6, please let me know if you still encounter this and we can reopen the issue.

same issue for me .
I resolve by install this libs try this way

sudo apt-get install libxtst-dev libpng++-dev

I am getting this same error on centos7
"robotjs": "^0.4.7",

for centos users try
yum install libXtst-devel

Was this page helpful?
0 / 5 - 0 ratings

Related issues

IChocolateKapa picture IChocolateKapa  Â·  12Comments

MariaDima picture MariaDima  Â·  3Comments

HopefulLlama picture HopefulLlama  Â·  3Comments

EdSaleh picture EdSaleh  Â·  8Comments

Glutch picture Glutch  Â·  6Comments