Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installation errors #607

Closed
elad opened this issue Jun 18, 2014 · 7 comments
Closed

Installation errors #607

elad opened this issue Jun 18, 2014 · 7 comments

Comments

@elad
Copy link

elad commented Jun 18, 2014

Hello,

I'm trying to install Haraka and I must be missing something because I'm getting errors.

I typed:

$ sudo npm install -g Haraka

Here's the complete log:

$ sudo npm install -g Haraka
npm http GET https://registry.npmjs.org/Haraka
npm http 304 https://registry.npmjs.org/Haraka
npm http GET https://registry.npmjs.org/nopt
npm http GET https://registry.npmjs.org/generic-pool
npm http GET https://registry.npmjs.org/iconv
npm http GET https://registry.npmjs.org/ipaddr.js
npm http GET https://registry.npmjs.org/semver
npm http GET https://registry.npmjs.org/async
npm http GET https://registry.npmjs.org/daemon
npm http GET https://registry.npmjs.org/npid
npm http GET https://registry.npmjs.org/address-rfc2822
npm http GET https://registry.npmjs.org/node-syslog
npm http GET https://registry.npmjs.org/ldapjs
npm http GET https://registry.npmjs.org/vs-stun
npm http GET https://registry.npmjs.org/geoip-lite
npm http GET https://registry.npmjs.org/redis
npm http 304 https://registry.npmjs.org/nopt
npm http 304 https://registry.npmjs.org/semver
npm http 304 https://registry.npmjs.org/ipaddr.js
npm http 304 https://registry.npmjs.org/generic-pool
npm http 304 https://registry.npmjs.org/async
npm http 304 https://registry.npmjs.org/daemon
npm http 304 https://registry.npmjs.org/iconv
npm http 304 https://registry.npmjs.org/npid
npm http 304 https://registry.npmjs.org/address-rfc2822
npm http 304 https://registry.npmjs.org/vs-stun
npm http 304 https://registry.npmjs.org/redis
npm http 304 https://registry.npmjs.org/node-syslog
npm http 304 https://registry.npmjs.org/geoip-lite
npm http 304 https://registry.npmjs.org/ldapjs

> node-syslog@1.1.7 install /usr/lib/node_modules/Haraka/node_modules/node-syslog
> node-gyp rebuild

Traceback (most recent call last):
  File "/usr/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py", line 18, in <module>
    sys.exit(gyp.script_main())
AttributeError: 'module' object has no attribute 'script_main'
gyp ERR! configure error 
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:340:16)
gyp ERR! stack     at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:807:12)
gyp ERR! System Linux 3.11.0-12-generic
gyp ERR! command "node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /usr/lib/node_modules/Haraka/node_modules/node-syslog
gyp ERR! node -v v0.10.28
gyp ERR! node-gyp -v v0.13.0
gyp ERR! not ok 
npm http GET https://registry.npmjs.org/abbrev
npm http 304 https://registry.npmjs.org/abbrev
npm WARN optional dep failed, continuing node-syslog@1.1.7
npm http GET https://registry.npmjs.org/asn1
npm http GET https://registry.npmjs.org/assert-plus
npm http GET https://registry.npmjs.org/bunyan
npm http GET https://registry.npmjs.org/pooling
npm http GET https://registry.npmjs.org/dtrace-provider
npm http 304 https://registry.npmjs.org/asn1
npm http 304 https://registry.npmjs.org/assert-plus
npm http 304 https://registry.npmjs.org/dtrace-provider
npm http 304 https://registry.npmjs.org/bunyan
npm http 304 https://registry.npmjs.org/pooling
npm http GET https://registry.npmjs.org/once
npm http GET https://registry.npmjs.org/vasync

> dtrace-provider@0.2.8 install /usr/lib/node_modules/Haraka/node_modules/ldapjs/node_modules/dtrace-provider
> node-gyp rebuild

Traceback (most recent call last):
  File "/usr/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py", line 18, in <module>
    sys.exit(gyp.script_main())
AttributeError: 'module' object has no attribute 'script_main'
gyp ERR! configure error 
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:340:16)
gyp ERR! stack     at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:807:12)
gyp ERR! System Linux 3.11.0-12-generic
gyp ERR! command "node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /usr/lib/node_modules/Haraka/node_modules/ldapjs/node_modules/dtrace-provider
gyp ERR! node -v v0.10.28
gyp ERR! node-gyp -v v0.13.0
gyp ERR! not ok 
npm http 304 https://registry.npmjs.org/vasync
npm http GET https://registry.npmjs.org/mv
npm http 304 https://registry.npmjs.org/once
npm http GET https://registry.npmjs.org/jsprim
npm http GET https://registry.npmjs.org/verror
npm http 304 https://registry.npmjs.org/verror
npm http 304 https://registry.npmjs.org/jsprim
npm http 304 https://registry.npmjs.org/mv
npm WARN optional dep failed, continuing dtrace-provider@0.2.8
npm http GET https://registry.npmjs.org/extsprintf
npm http GET https://registry.npmjs.org/json-schema
npm http 304 https://registry.npmjs.org/extsprintf
npm http 304 https://registry.npmjs.org/json-schema
npm http GET https://registry.npmjs.org/nan
npm http 304 https://registry.npmjs.org/nan

> iconv@2.1.4 install /usr/lib/node_modules/Haraka/node_modules/iconv
> node-gyp rebuild

Traceback (most recent call last):
  File "/usr/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py", line 18, in <module>
    sys.exit(gyp.script_main())
AttributeError: 'module' object has no attribute 'script_main'
gyp ERR! configure error 
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:340:16)
gyp ERR! stack     at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:807:12)
gyp ERR! System Linux 3.11.0-12-generic
gyp ERR! command "node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /usr/lib/node_modules/Haraka/node_modules/iconv
gyp ERR! node -v v0.10.28
gyp ERR! node-gyp -v v0.13.0
gyp ERR! not ok 
npm ERR! iconv@2.1.4 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the iconv@2.1.4 install script.
npm ERR! This is most likely a problem with the iconv 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 iconv
npm ERR! There is likely additional logging output above.

npm ERR! System Linux 3.11.0-12-generic
npm ERR! command "/usr/bin/node" "/usr/bin/npm" "install" "-g" "Haraka"
npm ERR! cwd /home/elad/haraka
npm ERR! node -v v0.10.28
npm ERR! npm -v 1.4.9
npm ERR! code ELIFECYCLE
npm ERR! Error: ENOENT, lstat '/usr/lib/node_modules/Haraka/node_modules/geoip-lite/data/geoip-city.dat'
npm ERR! If you need help, you may report this *entire* log,
npm ERR! including the npm and node versions, at:
npm ERR!     <http://github.com/npm/npm/issues>

npm ERR! System Linux 3.11.0-12-generic
npm ERR! command "/usr/bin/node" "/usr/bin/npm" "install" "-g" "Haraka"
npm ERR! cwd /home/elad/haraka
npm ERR! node -v v0.10.28
npm ERR! npm -v 1.4.9
npm ERR! path /usr/lib/node_modules/Haraka/node_modules/geoip-lite/data/geoip-city.dat
npm ERR! fstream_path /usr/lib/node_modules/Haraka/node_modules/geoip-lite/data/geoip-city.dat
npm ERR! fstream_type File
npm ERR! fstream_class FileWriter
npm ERR! code ENOENT
npm ERR! errno 34
npm ERR! fstream_stack /usr/lib/node_modules/npm/node_modules/fstream/lib/writer.js:284:26
npm ERR! fstream_stack Object.oncomplete (fs.js:107:15)
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /home/elad/haraka/npm-debug.log
npm ERR! not ok code 0
$ 
@baudehlo
Copy link
Collaborator

What OS is this on?

@elad
Copy link
Author

elad commented Jun 18, 2014

Linux 3.11.0-12-generic #19-Ubuntu SMP Wed Oct 9 16:20:46 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux

Edit: Ubuntu 13.10, node.js version 0.10.28, npm version 1.4.9

@baudehlo
Copy link
Collaborator

There's lots of comments here which will probably help:

nodejs/node-gyp#363

Basically it's because you used a package manager installed node and npm, or python 2.7, one of those two issues.

@elad
Copy link
Author

elad commented Jun 18, 2014

Thanks, but I'm still at a loss.

I tried switching to Python 2.6, removing gyp, and installing Haraka from source by cloning the git repository and typing npm install. I still get errors, for example, in the cloned Haraka directory:

$ npm install
npm http GET https://registry.npmjs.org/iconv
npm http GET https://registry.npmjs.org/node-syslog
npm http 304 https://registry.npmjs.org/iconv
npm http 304 https://registry.npmjs.org/node-syslog

> node-syslog@1.1.7 install /home/elad/Haraka/node_modules/node-syslog
> node-gyp rebuild

make: Entering directory `/home/elad/Haraka/node_modules/node-syslog/build'
  CXX(target) Release/obj.target/syslog/syslog.o
In file included from ../node-syslog.h:4:0,
                 from ../syslog.cc:1:
/home/elad/.node-gyp/0.10.28/src/node.h:61:16: fatal error: uv.h: No such file or directory
 #include "uv.h"
                ^
compilation terminated.
make: *** [Release/obj.target/syslog/syslog.o] Error 1
make: Leaving directory `/home/elad/Haraka/node_modules/node-syslog/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:267:23)
gyp ERR! stack     at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:807:12)
gyp ERR! System Linux 3.11.0-12-generic
gyp ERR! command "node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/elad/Haraka/node_modules/node-syslog
gyp ERR! node -v v0.10.28
gyp ERR! node-gyp -v v0.13.0
gyp ERR! not ok 
npm WARN optional dep failed, continuing node-syslog@1.1.7
npm http GET https://registry.npmjs.org/nan
npm http 304 https://registry.npmjs.org/nan

> iconv@2.1.4 install /home/elad/Haraka/node_modules/iconv
> node-gyp rebuild

make: Entering directory `/home/elad/Haraka/node_modules/iconv/build'
  CC(target) Release/obj.target/libiconv/deps/libiconv/lib/iconv.o
  AR(target) Release/obj.target/iconv.a
  COPY Release/iconv.a
  CXX(target) Release/obj.target/iconv/src/binding.o
In file included from ../src/binding.cc:18:0:
../node_modules/nan/nan.h:170:16: fatal error: uv.h: No such file or directory
 #include <uv.h>
                ^
compilation terminated.
make: *** [Release/obj.target/iconv/src/binding.o] Error 1
make: Leaving directory `/home/elad/Haraka/node_modules/iconv/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:267:23)
gyp ERR! stack     at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:807:12)
gyp ERR! System Linux 3.11.0-12-generic
gyp ERR! command "node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/elad/Haraka/node_modules/iconv
gyp ERR! node -v v0.10.28
gyp ERR! node-gyp -v v0.13.0
gyp ERR! not ok 
npm ERR! iconv@2.1.4 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the iconv@2.1.4 install script.
npm ERR! This is most likely a problem with the iconv 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 iconv
npm ERR! There is likely additional logging output above.

npm ERR! System Linux 3.11.0-12-generic
npm ERR! command "/usr/bin/node" "/usr/bin/npm" "install"
npm ERR! cwd /home/elad/Haraka
npm ERR! node -v v0.10.28
npm ERR! npm -v 1.4.9
npm ERR! code ELIFECYCLE
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /home/elad/Haraka/npm-debug.log
npm ERR! not ok code 0
$ 

@baudehlo
Copy link
Collaborator

I think you will need to try installing node from source (after uninstalling the package).

On Jun 18, 2014, at 5:55 PM, Elad Efrat notifications@github.com wrote:

Thanks, but I'm still at a loss.

I tried switching to Python 2.6, removing gyp, and installing Haraka from source by cloning the git repository and typing npm install. I still get errors, for example, in the cloned Haraka directory:

$ npm install
npm http GET https://registry.npmjs.org/iconv
npm http GET https://registry.npmjs.org/node-syslog
npm http 304 https://registry.npmjs.org/iconv
npm http 304 https://registry.npmjs.org/node-syslog

node-syslog@1.1.7 install /home/elad/Haraka/node_modules/node-syslog
node-gyp rebuild

make: Entering directory /home/elad/Haraka/node_modules/node-syslog/build' CXX(target) Release/obj.target/syslog/syslog.o In file included from ../node-syslog.h:4:0, from ../syslog.cc:1: /home/elad/.node-gyp/0.10.28/src/node.h:61:16: fatal error: uv.h: No such file or directory #include "uv.h" ^ compilation terminated. make: *** [Release/obj.target/syslog/syslog.o] Error 1 make: Leaving directory/home/elad/Haraka/node_modules/node-syslog/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:267:23)
gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:807:12)
gyp ERR! System Linux 3.11.0-12-generic
gyp ERR! command "node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/elad/Haraka/node_modules/node-syslog
gyp ERR! node -v v0.10.28
gyp ERR! node-gyp -v v0.13.0
gyp ERR! not ok
npm WARN optional dep failed, continuing node-syslog@1.1.7
npm http GET https://registry.npmjs.org/nan
npm http 304 https://registry.npmjs.org/nan

iconv@2.1.4 install /home/elad/Haraka/node_modules/iconv
node-gyp rebuild

make: Entering directory /home/elad/Haraka/node_modules/iconv/build' CC(target) Release/obj.target/libiconv/deps/libiconv/lib/iconv.o AR(target) Release/obj.target/iconv.a COPY Release/iconv.a CXX(target) Release/obj.target/iconv/src/binding.o In file included from ../src/binding.cc:18:0: ../node_modules/nan/nan.h:170:16: fatal error: uv.h: No such file or directory #include <uv.h> ^ compilation terminated. make: *** [Release/obj.target/iconv/src/binding.o] Error 1 make: Leaving directory/home/elad/Haraka/node_modules/iconv/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:267:23)
gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:807:12)
gyp ERR! System Linux 3.11.0-12-generic
gyp ERR! command "node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/elad/Haraka/node_modules/iconv
gyp ERR! node -v v0.10.28
gyp ERR! node-gyp -v v0.13.0
gyp ERR! not ok
npm ERR! iconv@2.1.4 install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the iconv@2.1.4 install script.
npm ERR! This is most likely a problem with the iconv 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 iconv
npm ERR! There is likely additional logging output above.

npm ERR! System Linux 3.11.0-12-generic
npm ERR! command "/usr/bin/node" "/usr/bin/npm" "install"
npm ERR! cwd /home/elad/Haraka
npm ERR! node -v v0.10.28
npm ERR! npm -v 1.4.9
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/elad/Haraka/npm-debug.log
npm ERR! not ok code 0
$

Reply to this email directly or view it on GitHub.

@elad
Copy link
Author

elad commented Jun 19, 2014

You were absolutely right.

For future reference, this is what I had to do:

  • Install node.js from source (download tarball from nodejs.org, extract, build and install)
  • Switch to Python 2.6, otherwise a lot of node-gyp stuff wouldn't work

Thanks for your help! :)

(Maybe it would be a good idea to add a hint to the installation instructions on the website, just in case.)

@elad elad closed this as completed Jun 19, 2014
@turbobuilt
Copy link
Contributor

turbobuilt commented Mar 21, 2017

For anybody else on ubuntu 16.04, downloading from the package manager here works (you don't have to build from source). Just make sure you run the build-essentials install command too.

https://nodejs.org/en/download/package-manager/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants