Troubleshooting failed Hydrogen install - croaks on "fatal error: zmq.h: No such file or directory"


#1

I’m having what looks to be the same issue. Per the suggestion at https://discuss.atom.io/t/can-i-run-a-ipython-notebook-program-in-a-atom-window/18555/4, I tried launching Atom from a command line and that doesn’t seem to change it. Is there also a method for installing hydrogen from the command line?

Here’s the full text of the error. Note that it says there should be a debug log in /tmp – I don’t see any such thing. I don’t even see a directory like apm-install...

Any tips on troubleshooting this?

Installing “Hydrogen@0.6.5” failed.Hide output…> zmq@2.13.0 install /tmp/apm-install-dir-115927-15550-1dsmydo/node_modules/Hydrogen/node_modules/zmq
> node-gyp rebuild

make: Entering directory '/tmp/apm-install-dir-115927-15550-1dsmydo/node_modules/Hydrogen/node_modules/zmq/build’
CXX(target) Release/obj.target/zmq/binding.o
zmq.target.mk:88: recipe for target ‘Release/obj.target/zmq/binding.o’ failed
make: Leaving directory ‘/tmp/apm-install-dir-115927-15550-1dsmydo/node_modules/Hydrogen/node_modules/zmq/build’

…/binding.cc:28:17: fatal error: zmq.h: No such file or directory
#include <zmq.h>
^
compilation terminated.
make: *** [Release/obj.target/zmq/binding.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: make failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/share/atom/resources/app/apm/node_modules/npm/node_modules/node-gyp/lib/build.js:269:23)
gyp ERR! stack at ChildProcess.emit (events.js:98:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:820:12)
gyp ERR! System Linux 3.19.0-31-generic
gyp ERR! command “node” “/usr/share/atom/resources/app/apm/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js” "rebuild"
gyp ERR! cwd /tmp/apm-install-dir-115927-15550-1dsmydo/node_modules/Hydrogen/node_modules/zmq
gyp ERR! node -v v0.10.40
gyp ERR! node-gyp -v v2.0.2
gyp ERR! not ok
npm ERR! Linux 3.19.0-31-generic
npm ERR! argv “/usr/share/atom/resources/app/apm/bin/node” “/usr/share/atom/resources/app/apm/node_modules/npm/bin/npm-cli.js” “–globalconfig” “/home/amanda/.atom/.apm/.apmrc” “–userconfig” “/home/amanda/.atom/.apmrc” “install” “/tmp/d-115927-15550-1qq69bn/package.tgz” “–target=0.30.7” "–arch=x64"
npm ERR! node v0.10.40
npm ERR! npm v2.13.3
npm ERR! code ELIFECYCLE

npm ERR! zmq@2.13.0 install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the zmq@2.13.0 install script ‘node-gyp rebuild’.
npm ERR! This is most likely a problem with the zmq 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 zmq
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! /tmp/apm-install-dir-115927-15550-1dsmydo/npm-debug.log


#2

It would help if you included what command you executed to get this output.


#3

Guess my question wasn’t clear. I launched Atom by clicking on it in the launcher (first) and by running /usr/bin/atom second. But that was just to launch Atom.

The only way I know of to install packages is via edit > Preferences > Install – the error is in Atom:


#4

Have you reported the issue to the maintainers of the hydrogen package? I’m getting similar output when I try to install it.


#5

Hmm. So … looks like I needed…

apt-get install python-dev libzmq-dev
pip install ipython[notebook]

And then apm install hydrogen works fine. Presumably installing through the package manager would have as well, but I’m not going to go back and test that. It seems like a poor user experience to just fail instead of checking for dependencies and directing users to address them. I will raise that w/Hydrogen, tho.

(and yes, you need to run apt-get install as root or via sudo)


#6

Hydrogen developer here. As Amanda suggested in this issue, is there a way for me to notify people why installation fails?


#7

There is no way to handle an installation failure that I know of. It may be a good idea to have a new field in package.json where package authors can supply a message that will be shown to the user when the installation of a package fails.