kuno / GeoIP

GeoIP binding for nodejs(>=0.10) and iojs
GNU Lesser General Public License v2.1
414 stars 129 forks source link

error when installing via npm #18

Closed hugh closed 13 years ago

hugh commented 13 years ago

I am trying to install this and continue to get the following error:


npm install geoip
npm ERR! failed to fetch https://registry.npmjs.org/geoip/-/geoip-0.4.3.tgz
npm ERR! Error: 404 { server: 'CouchDB/1.1.0 (Erlang OTP/R14B03)',
npm ERR!   date: 'Wed, 03 Aug 2011 17:41:22 GMT',
npm ERR!   'content-type': 'text/plain;charset=utf-8',
npm ERR!   'content-length': '64',
npm ERR!   'cache-control': 'must-revalidate' }
npm ERR!     at ClientRequest.<anonymous> (/usr/local/lib/node_modules/npm/lib/utils/fetch.js:108:33)
npm ERR!     at ClientRequest.g (events.js:143:14)
npm ERR!     at ClientRequest.emit (events.js:64:17)
npm ERR!     at HTTPParser.onIncoming (http.js:1358:9)
npm ERR!     at HTTPParser.onHeadersComplete (http.js:108:31)
npm ERR!     at CleartextStream.ondata (http.js:1232:22)
npm ERR!     at CleartextStream._push (tls.js:303:27)
npm ERR!     at SecurePair.cycle (tls.js:577:20)
npm ERR!     at EncryptedStream.write (tls.js:96:13)
npm ERR!     at Socket.ondata (stream.js:36:26)
npm ERR! Report this *entire* log at:
npm ERR!     <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR!     <npm-@googlegroups.com>
npm ERR! 
npm ERR! System Linux 2.6.35.11-83.9.amzn1.i686
npm ERR! command "node" "/usr/local/bin/npm" "install" "geoip"
npm ERR! cwd /root
npm ERR! node -v v0.4.11-pre
npm ERR! npm -v 1.0.22
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /root/npm-debug.log
npm not ok

any suggestions on how to proceed? i have installed the geoip c library via src as you recommended and also have tried installing via the yum packages. what else can i try?

thanks for your help!

-hugh

kuno commented 13 years ago

It seems there are some unknown problems within official registry(npmjs.org). Currently, you can download the zipball from github and install them manually.

wget https://nodeload.github.com/kuno/GeoIP/zipball/v0.4.3

unzip v0.4.3

cd kuno-GeoIP-905d3db 

[ sudo ] npm install . [ -g ]

--kuno

hugh commented 13 years ago

thanks!

-Hugh

On Aug 3, 2011, at 6:28 PM, kunoreply@reply.github.com wrote:

It seems there are some unknown problems within official registry(npmjs.org). Currently, you can download the tarball from github and install them manually.

wget https://nodeload.github.com/kuno/GeoIP/zipball/v0.4.3

unzip v0.4.3

cd kuno-GeoIP-905d3db

[ sudo ] npm install . [ -g ]

--kuno

Reply to this email directly or view it on GitHub: https://github.com/kuno/GeoIP/issues/18#issuecomment-1722503

kuno commented 13 years ago

just wanna remind you that registry.npmjs.org is back to working state now.

mrafaqi commented 12 years ago

I am having similar problem while installing geoip using npm. I assume npm is installed automatically with node 0.6.7. I installed all components (node, geoip) package manually from sources.

GeoIP-1.4.7$ npm install geoip npm http GET https://registry.npmjs.org/geoip npm http 304 https://registry.npmjs.org/geoip

geoip@0.4.5 preinstall /home/rizwan/GeoIP-1.4.7/node_modules/geoip node-waf clean || (exit 0); node-waf configure build

Nothing to clean (project not configured) Checking for program g++ or c++ : /usr/bin/g++ Checking for program cpp : /usr/bin/cpp Checking for program ar : /usr/bin/ar Checking for program ranlib : /usr/bin/ranlib Checking for g++ : ok Checking for node path : not found Checking for node prefix : ok /usr/local 'configure' finished successfully (0.026s) Waf: Entering directory /home/rizwan/GeoIP-1.4.7/node_modules/geoip/build' no such environment: Release Traceback (most recent call last): File "/usr/local/bin/node-waf", line 16, in <module> Scripting.prepare(t, os.getcwd(), VERSION, wafdir) File "/usr/local/bin/../lib/node/wafadmin/Scripting.py", line 145, in prepare prepare_impl(t, cwd, ver, wafdir) File "/usr/local/bin/../lib/node/wafadmin/Scripting.py", line 135, in prepare_impl main() File "/usr/local/bin/../lib/node/wafadmin/Scripting.py", line 188, in main fun(ctx) File "/usr/local/bin/../lib/node/wafadmin/Scripting.py", line 386, in build return build_impl(bld) File "/usr/local/bin/../lib/node/wafadmin/Scripting.py", line 399, in build_impl bld.add_subdirs([os.path.split(Utils.g_module.root_path)[0]]) File "/usr/local/bin/../lib/node/wafadmin/Build.py", line 981, in add_subdirs self.recurse(dirs, 'build') File "/usr/local/bin/../lib/node/wafadmin/Utils.py", line 634, in recurse f(self) File "/home/rizwan/GeoIP-1.4.7/node_modules/geoip/wscript", line 18, in build obj = bld.new_task_gen("cxx", "shlib", "node_addon") File "/usr/local/bin/../lib/node/wafadmin/Build.py", line 335, in new_task_gen ret = cls(*k, **kw) File "/usr/local/bin/../lib/node/wafadmin/Tools/ccroot.py", line 162, in __init__ TaskGen.task_gen.__init__(self, *k, **kw) File "/usr/local/bin/../lib/node/wafadmin/TaskGen.py", line 118, in __init__ self.env = self.bld.env.copy() AttributeError: 'NoneType' object has no attribute 'copy' npm ERR! error installing geoip@0.4.5 npm ERR! geoip@0.4.5 preinstall:node-waf clean || (exit 0); node-waf configure build npm ERR!sh "-c" "node-waf clean || (exit 0); node-waf configure build"failed with 1 npm ERR! npm ERR! Failed at the geoip@0.4.5 preinstall script. npm ERR! This is most likely a problem with the geoip package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! node-waf clean || (exit 0); node-waf configure build npm ERR! You can get their info via: npm ERR! npm owner ls geoip npm ERR! There is likely additional logging output above. npm ERR! npm ERR! System Linux 3.0.0-14-generic npm ERR! command "node" "/usr/local/bin/npm" "install" "geoip" npm ERR! cwd /home/rizwan/GeoIP-1.4.7 npm ERR! node -v v0.6.7 npm ERR! npm -v 1.1.0-beta-10 npm ERR! code ELIFECYCLE npm ERR! message geoip@0.4.5 preinstall:node-waf clean || (exit 0); node-waf configure build npm ERR! messagesh "-c" "node-waf clean || (exit 0); node-waf configure build"` failed with 1 npm ERR! Error: EACCES, permission denied 'npm-debug.log' npm ERR! Report this entire log at: npm ERR! http://github.com/isaacs/npm/issues npm ERR! or email it to: npm ERR! npm-@googlegroups.com npm ERR! npm ERR! System Linux 3.0.0-14-generic npm ERR! command "node" "/usr/local/bin/npm" "install" "geoip" npm ERR! cwd /home/rizwan/GeoIP-1.4.7 npm ERR! node -v v0.6.7 npm ERR! npm -v 1.1.0-beta-10 npm ERR! path npm-debug.log npm ERR! code EACCES npm ERR! message EACCES, permission denied 'npm-debug.log' npm ERR! npm ERR! Additional logging details can be found in: npm ERR! /home/rizwan/GeoIP-1.4.7/npm-debug.log npm not ok

Thanks in advance =)

kuno commented 12 years ago

@afaqi This issue is more likely related to waf rather than geoip. Try solution on this page

https://github.com/joyent/node/issues/1716