I can't seem to get x509 to install.
I've tried installing the sudo npm install -g node-gyp
as well as npm install x509
.
When I tried to install via node-gyp it seems to install correctly, but when I require('x509');
it says x509 doesn't exist.
0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/node', '/usr/bin/npm', 'install', 'x509' ]
2 info using [email protected]
3 info using [email protected]
4 warn package.json [email protected] No repository field.
5 warn package.json [email protected] No README data
6 warn package.json [email protected] No repository field.
7 warn package.json [email protected] crypto is also the name of a node core module.
8 verbose readDependencies using package.json deps
9 verbose cache add [ 'x509', null ]
10 verbose cache add name=undefined spec="x509" args=["x509",null]
11 verbose parsed url { protocol: null,
11 verbose parsed url slashes: null,
11 verbose parsed url auth: null,
11 verbose parsed url host: null,
11 verbose parsed url port: null,
11 verbose parsed url hostname: null,
11 verbose parsed url hash: null,
11 verbose parsed url search: null,
11 verbose parsed url query: null,
11 verbose parsed url pathname: 'x509',
11 verbose parsed url path: 'x509',
11 verbose parsed url href: 'x509' }
12 silly makeCacheDir cache dir uid, gid [ 0, 0 ]
13 silly lockFile 0b48d5df-x509 x509
14 verbose lock x509 /root/.npm/0b48d5df-x509.lock
15 silly lockFile 0b48d5df-x509 x509
16 silly lockFile 0b48d5df-x509 x509
17 verbose addNamed [ 'x509', '' ]
18 verbose addNamed [ null, '*' ]
19 silly lockFile a632de90-x509 x509@
20 verbose lock x509@ /root/.npm/a632de90-x509.lock
21 silly addNameRange { name: 'x509', range: '*', hasData: false }
22 verbose url raw x509
23 verbose url resolving [ 'https://registry.npmjs.org/', './x509' ]
24 verbose url resolved https://registry.npmjs.org/x509
25 info trying registry request attempt 1 at 03:18:46
26 http GET https://registry.npmjs.org/x509
27 http 200 https://registry.npmjs.org/x509
28 silly registry.get cb [ 200,
28 silly registry.get { date: 'Wed, 19 Feb 2014 08:18:48 GMT',
28 silly registry.get server: 'CouchDB/1.5.0 (Erlang OTP/R16B)',
28 silly registry.get etag: '"DCX5XAL042KFKV85HREOX050B"',
28 silly registry.get 'content-type': 'application/json',
28 silly registry.get via: '1.1 varnish',
28 silly registry.get 'cache-control': 'max-age=1',
28 silly registry.get 'content-length': '41425',
28 silly registry.get 'accept-ranges': 'bytes',
28 silly registry.get age: '0',
28 silly registry.get 'x-served-by': 'cache-v43-ASH, cache-at52-ATL',
28 silly registry.get 'x-cache': 'MISS, MISS',
28 silly registry.get 'x-cache-hits': '0, 0',
28 silly registry.get 'x-timer': 'S1392797927.960889816,VS0,VS5,VE348,VE357',
28 silly registry.get vary: 'Accept',
28 silly registry.get 'keep-alive': 'timeout=10, max=50',
28 silly registry.get connection: 'Keep-Alive' } ]
29 silly addNameRange number 2 { name: 'x509', range: '*', hasData: true }
30 silly addNameRange versions [ 'x509',
30 silly addNameRange [ '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0.0.6', '0.0.7' ] ]
31 verbose addNamed [ 'x509', '0.0.7' ]
32 verbose addNamed [ '0.0.7', '0.0.7' ]
33 silly lockFile 6b107ce7-x509-0-0-7 [email protected]
34 verbose lock [email protected] /root/.npm/6b107ce7-x509-0-0-7.lock
35 silly lockFile 5ada6c56-ry-npmjs-org-x509-x509-0-0-7-tgz https://registry.npmjs.org/x509/-/x509-0.0.7.tgz
36 verbose lock https://registry.npmjs.org/x509/-/x509-0.0.7.tgz /root/.npm/5ada6c56-ry-npmjs-org-x509-x509-0-0-7-tgz.lock
37 verbose addRemoteTarball [ 'https://registry.npmjs.org/x509/-/x509-0.0.7.tgz',
37 verbose addRemoteTarball '198a57a9691649b030a383e0e5f89e635d6e99e7' ]
38 info retry fetch attempt 1 at 03:18:48
39 verbose fetch to= /root/tmp/npm-29085-x3WzvcaD/1392797928397-0.03312862361781299/tmp.tgz
40 http GET https://registry.npmjs.org/x509/-/x509-0.0.7.tgz
41 http 200 https://registry.npmjs.org/x509/-/x509-0.0.7.tgz
42 verbose tar unpack /root/tmp/npm-29085-x3WzvcaD/1392797928397-0.03312862361781299/tmp.tgz
43 silly lockFile e04e7ac0-8397-0-03312862361781299-package tar:///root/tmp/npm-29085-x3WzvcaD/1392797928397-0.03312862361781299/package
44 verbose lock tar:///root/tmp/npm-29085-x3WzvcaD/1392797928397-0.03312862361781299/package /root/.npm/e04e7ac0-8397-0-03312862361781299-package.lock
45 silly lockFile d0b30ba7-8397-0-03312862361781299-tmp-tgz tar:///root/tmp/npm-29085-x3WzvcaD/1392797928397-0.03312862361781299/tmp.tgz
46 verbose lock tar:///root/tmp/npm-29085-x3WzvcaD/1392797928397-0.03312862361781299/tmp.tgz /root/.npm/d0b30ba7-8397-0-03312862361781299-tmp-tgz.lock
47 silly gunzTarPerm modes [ '755', '644' ]
48 silly gunzTarPerm extractEntry package.json
49 silly gunzTarPerm extractEntry .npmignore
50 silly gunzTarPerm extractEntry README.md
51 silly gunzTarPerm extractEntry .travis.yml
52 silly gunzTarPerm extractEntry binding.gyp
53 silly gunzTarPerm extractEntry build/Makefile
54 silly gunzTarPerm extractEntry build/Release/.deps/Release/obj.target/x509/src/addon.o.d
55 silly gunzTarPerm extractEntry build/Release/.deps/Release/obj.target/x509/src/x509.o.d
56 silly gunzTarPerm extractEntry build/Release/.deps/Release/x509.node.d
57 silly gunzTarPerm extractEntry build/Release/linker.lock
58 silly gunzTarPerm extractEntry build/Release/obj.target/x509/src/addon.o
59 silly gunzTarPerm extractEntry build/Release/obj.target/x509/src/x509.o
60 silly gunzTarPerm extractEntry build/Release/x509.node
61 silly gunzTarPerm extractEntry build/binding.Makefile
62 silly gunzTarPerm extractEntry build/config.gypi
63 silly gunzTarPerm extractEntry build/gyp-mac-tool
64 silly gunzTarPerm extractEntry build/x509.target.mk
65 silly gunzTarPerm extractEntry include/addon.h
66 silly gunzTarPerm extractEntry include/x509.h
67 silly gunzTarPerm extractEntry src/addon.cc
68 silly gunzTarPerm extractEntry src/x509.cc
69 silly lockFile e04e7ac0-8397-0-03312862361781299-package tar:///root/tmp/npm-29085-x3WzvcaD/1392797928397-0.03312862361781299/package
70 silly lockFile e04e7ac0-8397-0-03312862361781299-package tar:///root/tmp/npm-29085-x3WzvcaD/1392797928397-0.03312862361781299/package
71 silly lockFile d0b30ba7-8397-0-03312862361781299-tmp-tgz tar:///root/tmp/npm-29085-x3WzvcaD/1392797928397-0.03312862361781299/tmp.tgz
72 silly lockFile d0b30ba7-8397-0-03312862361781299-tmp-tgz tar:///root/tmp/npm-29085-x3WzvcaD/1392797928397-0.03312862361781299/tmp.tgz
73 verbose tar pack [ '/root/.npm/x509/0.0.7/package.tgz',
73 verbose tar pack '/root/tmp/npm-29085-x3WzvcaD/1392797928397-0.03312862361781299/package' ]
74 verbose tarball /root/.npm/x509/0.0.7/package.tgz
75 verbose folder /root/tmp/npm-29085-x3WzvcaD/1392797928397-0.03312862361781299/package
76 silly lockFile e04e7ac0-8397-0-03312862361781299-package tar:///root/tmp/npm-29085-x3WzvcaD/1392797928397-0.03312862361781299/package
77 verbose lock tar:///root/tmp/npm-29085-x3WzvcaD/1392797928397-0.03312862361781299/package /root/.npm/e04e7ac0-8397-0-03312862361781299-package.lock
78 silly lockFile 9ba0da1a--root-npm-x509-0-0-7-package-tgz tar:///root/.npm/x509/0.0.7/package.tgz
79 verbose lock tar:///root/.npm/x509/0.0.7/package.tgz /root/.npm/9ba0da1a--root-npm-x509-0-0-7-package-tgz.lock
80 silly lockFile e04e7ac0-8397-0-03312862361781299-package tar:///root/tmp/npm-29085-x3WzvcaD/1392797928397-0.03312862361781299/package
81 silly lockFile e04e7ac0-8397-0-03312862361781299-package tar:///root/tmp/npm-29085-x3WzvcaD/1392797928397-0.03312862361781299/package
82 silly lockFile 9ba0da1a--root-npm-x509-0-0-7-package-tgz tar:///root/.npm/x509/0.0.7/package.tgz
83 silly lockFile 9ba0da1a--root-npm-x509-0-0-7-package-tgz tar:///root/.npm/x509/0.0.7/package.tgz
84 silly lockFile c583609c-root-npm-x509-0-0-7-package /root/.npm/x509/0.0.7/package
85 verbose lock /root/.npm/x509/0.0.7/package /root/.npm/c583609c-root-npm-x509-0-0-7-package.lock
86 silly lockFile c583609c-root-npm-x509-0-0-7-package /root/.npm/x509/0.0.7/package
87 silly lockFile c583609c-root-npm-x509-0-0-7-package /root/.npm/x509/0.0.7/package
88 verbose tar unpack /root/.npm/x509/0.0.7/package.tgz
89 silly lockFile 44586890-tar-root-npm-x509-0-0-7-package tar:///root/.npm/x509/0.0.7/package
90 verbose lock tar:///root/.npm/x509/0.0.7/package /root/.npm/44586890-tar-root-npm-x509-0-0-7-package.lock
91 silly lockFile 9ba0da1a--root-npm-x509-0-0-7-package-tgz tar:///root/.npm/x509/0.0.7/package.tgz
92 verbose lock tar:///root/.npm/x509/0.0.7/package.tgz /root/.npm/9ba0da1a--root-npm-x509-0-0-7-package-tgz.lock
93 silly gunzTarPerm modes [ '755', '644' ]
94 silly gunzTarPerm extractEntry package.json
95 silly gunzTarPerm extractEntry .npmignore
96 silly gunzTarPerm extractEntry README.md
97 silly gunzTarPerm extractEntry .travis.yml
98 silly gunzTarPerm extractEntry binding.gyp
99 silly gunzTarPerm extractEntry build/Makefile
100 silly gunzTarPerm extractEntry build/Release/.deps/Release/obj.target/x509/src/addon.o.d
101 silly gunzTarPerm extractEntry build/Release/.deps/Release/obj.target/x509/src/x509.o.d
102 silly gunzTarPerm extractEntry build/Release/.deps/Release/x509.node.d
103 silly gunzTarPerm extractEntry build/Release/linker.lock
104 silly gunzTarPerm extractEntry build/Release/obj.target/x509/src/addon.o
105 silly gunzTarPerm extractEntry build/Release/obj.target/x509/src/x509.o
106 silly gunzTarPerm extractEntry build/Release/x509.node
107 silly gunzTarPerm extractEntry build/binding.Makefile
108 silly gunzTarPerm extractEntry build/config.gypi
109 silly gunzTarPerm extractEntry build/gyp-mac-tool
110 silly gunzTarPerm extractEntry build/x509.target.mk
111 silly gunzTarPerm extractEntry include/addon.h
112 silly gunzTarPerm extractEntry include/x509.h
113 silly gunzTarPerm extractEntry src/addon.cc
114 silly gunzTarPerm extractEntry src/x509.cc
115 silly lockFile 44586890-tar-root-npm-x509-0-0-7-package tar:///root/.npm/x509/0.0.7/package
116 silly lockFile 44586890-tar-root-npm-x509-0-0-7-package tar:///root/.npm/x509/0.0.7/package
117 silly lockFile 9ba0da1a--root-npm-x509-0-0-7-package-tgz tar:///root/.npm/x509/0.0.7/package.tgz
118 silly lockFile 9ba0da1a--root-npm-x509-0-0-7-package-tgz tar:///root/.npm/x509/0.0.7/package.tgz
119 verbose chmod /root/.npm/x509/0.0.7/package.tgz 644
120 verbose chown /root/.npm/x509/0.0.7/package.tgz [ 0, 0 ]
121 silly lockFile 5ada6c56-ry-npmjs-org-x509-x509-0-0-7-tgz https://registry.npmjs.org/x509/-/x509-0.0.7.tgz
122 silly lockFile 5ada6c56-ry-npmjs-org-x509-x509-0-0-7-tgz https://registry.npmjs.org/x509/-/x509-0.0.7.tgz
123 silly lockFile 6b107ce7-x509-0-0-7 [email protected]
124 silly lockFile 6b107ce7-x509-0-0-7 [email protected]
125 silly lockFile a632de90-x509 x509@
126 silly lockFile a632de90-x509 x509@
127 silly resolved [ { name: 'x509',
127 silly resolved version: '0.0.7',
127 silly resolved description: 'Simple X509 certificate parser.',
127 silly resolved author: { name: 'Colton Baker' },
127 silly resolved main: './build/Release/x509',
127 silly resolved repository: { type: 'git', url: 'http://github.com/Southern/node-x509' },
127 silly resolved scripts: { test: 'node test/test', install: 'node-gyp rebuild' },
127 silly resolved license: 'MIT',
127 silly resolved gypfile: true,
127 silly resolved readme: 'node-x509\n=========\n\n[![Build Status](https://secure.travis-ci.org/Southern/node-x509.png?branch=master)](http://travis-ci.org/Southern/node-x509)\n[![NPM version](https://badge.fury.io/js/x509.png)](http://badge.fury.io/js/x509)\n\nSimple X509 certificate parser.\n\n## Installation\n\nFrom NPM *(recommended)*: `npm install x509`\n\nBuilding and testing from source:\n```\nsudo npm install -g node-gyp\nnpm install\nnpm test\n```\n\n## Usage\nReading from a file:\n```js\nvar x509 = require(\'x509\');\n\nvar issuer = x509.getIssuer(__dirname + \'/certs/your.crt\');\n```\n\nReading from a string:\n```js\nvar fs = require(\'fs\'),\n x509 = require(\'x509\');\n\nvar issuer = x509.getIssuer(fs.readFileSync(\'./certs/your.crt\').toString());\n```\n\n## Methods\n**Notes:**\n- `cert` may be a filename or a raw base64 encoded PEM string in any of these methods.\n\n\n#### x509.getAltNames(`cert`)\nParse certificate with `x509.parseCert` and return the alternate names.\n\n```js\nvar x509 = require(\'x509\');\n\nvar altNames = x509.getAltNames(__dirname + \'/certs/nodejitsu.com.crt\');\n/*\naltNames = [ \'*.nodejitsu.com\', \'nodejitsu.com\' ]\n*/\n```\n\n#### x509.getIssuer(`cert`)\nParse certificate with `x509.parseCert` and return the issuer.\n\n```js\nvar x509 = require(\'x509\');\n\nvar issuer = x509.getIssuer(__dirname + \'/certs/nodejitsu.com.crt\');\n/*\nissuer = { countryName: \'GB\',\n stateOrProvinceName: \'Greater Manchester\',\n localityName: \'Salford\',\n organizationName: \'COMODO CA Limited\',\n commonName: \'COMODO High-Assurance Secure Server CA\' }\n*/\n```\n\n#### x509.getSubject(`cert`)\nParse certificate with `x509.parseCert` and return the subject.\n\n```js\nvar x509 = require(\'x509\');\n\nvar subject = x509.getSubject(__dirname + \'/certs/nodejitsu.com.crt\');\n/*\nsubject = { countryName: \'US\',\n postalCode: \'10010\',\n stateOrProvinceName: \'NY\',\n localityName: \'New York\',\n streetAddress: \'902 Broadway, 4th Floor\',\n organizationName: \'Nodejitsu\',\n organizationalUnitName: \'PremiumSSL Wildcard\',\n commonName: \'*.nodejitsu.com\' }\n*/\n```\n\n#### x509.parseCert(`cert`)\nParse subject, issuer, valid before and after date, and alternate names from certificate.\n\n```js\nvar x509 = require(\'x509\');\n\nvar cert = x509.parseCert(__dirname + \'/certs/nodejitsu.com.crt\');\n/*\ncert = { subject: \n { countryName: \'US\',\n postalCode: \'10010\',\n stateOrProvinceName: \'NY\',\n localityName: \'New York\',\n streetAddress: \'902 Broadway, 4th Floor\',\n organizationName: \'Nodejitsu\',\n organizationalUnitName: \'PremiumSSL Wildcard\',\n commonName: \'*.nodejitsu.com\' },\n issuer: \n { countryName: \'GB\',\n stateOrProvinceName: \'Greater Manchester\',\n localityName: \'Salford\',\n organizationName: \'COMODO CA Limited\',\n commonName: \'COMODO High-Assurance Secure Server CA\' },\n notBefore: Sun Oct 28 2012 20:00:00 GMT-0400 (EDT),\n notAfter: Wed Nov 26 2014 18:59:59 GMT-0500 (EST),\n altNames: [ \'*.nodejitsu.com\', \'nodejitsu.com\' ] }\n*/\n```\n\n## Examples\nChecking the date to make sure the certificate is active:\n```js\nvar x509 = require(\'x509\'),\n cert = x509.parseCert(\'yourcert.crt\'),\n date = new Date();\n\nif (cert.notBefore > date) {\n // Certificate isn\'t active yet.\n}\nif (cert.notAfter < date) {\n // Certificate has expired.\n}\n```\n\n## License\nCopyright (c) 2013 Colton Baker\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the "Software"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n',
127 silly resolved readmeFilename: 'README.md',
127 silly resolved bugs: { url: 'https://github.com/Southern/node-x509/issues' },
127 silly resolved homepage: 'https://github.com/Southern/node-x509',
127 silly resolved _id: '[email protected]',
127 silly resolved dist: { shasum: '94881b553707582d9ba2b9dd919b0102d2c1bfde' },
127 silly resolved _from: 'x509@',
127 silly resolved _resolved: 'https://registry.npmjs.org/x509/-/x509-0.0.7.tgz' } ]
128 info install [email protected] into /home/mysite/node
129 info installOne [email protected]
130 info /home/mysite/node/node_modules/x509 unbuild
131 verbose tar unpack /root/.npm/x509/0.0.7/package.tgz
132 silly lockFile c914740c--includes-node-node-modules-x509 tar:///home/mysite/node/node_modules/x509
133 verbose lock tar:///home/mysite/node/node_modules/x509 /root/.npm/c914740c--includes-node-node-modules-x509.lock
134 silly lockFile 9ba0da1a--root-npm-x509-0-0-7-package-tgz tar:///root/.npm/x509/0.0.7/package.tgz
135 verbose lock tar:///root/.npm/x509/0.0.7/package.tgz /root/.npm/9ba0da1a--root-npm-x509-0-0-7-package-tgz.lock
136 silly gunzTarPerm modes [ '755', '644' ]
137 silly gunzTarPerm extractEntry package.json
138 silly gunzTarPerm extractEntry .npmignore
139 silly gunzTarPerm extractEntry README.md
140 silly gunzTarPerm extractEntry .travis.yml
141 silly gunzTarPerm extractEntry binding.gyp
142 silly gunzTarPerm extractEntry build/Makefile
143 silly gunzTarPerm extractEntry build/Release/.deps/Release/obj.target/x509/src/addon.o.d
144 silly gunzTarPerm extractEntry build/Release/.deps/Release/obj.target/x509/src/x509.o.d
145 silly gunzTarPerm extractEntry build/Release/.deps/Release/x509.node.d
146 silly gunzTarPerm extractEntry build/Release/linker.lock
147 silly gunzTarPerm extractEntry build/Release/obj.target/x509/src/addon.o
148 silly gunzTarPerm extractEntry build/Release/obj.target/x509/src/x509.o
149 silly gunzTarPerm extractEntry build/Release/x509.node
150 silly gunzTarPerm extractEntry build/binding.Makefile
151 silly gunzTarPerm extractEntry build/config.gypi
152 silly gunzTarPerm extractEntry build/gyp-mac-tool
153 silly gunzTarPerm extractEntry build/x509.target.mk
154 silly gunzTarPerm extractEntry include/addon.h
155 silly gunzTarPerm extractEntry include/x509.h
156 silly gunzTarPerm extractEntry src/addon.cc
157 silly gunzTarPerm extractEntry src/x509.cc
158 silly lockFile c914740c--includes-node-node-modules-x509 tar:///home/mysite/node/node_modules/x509
159 silly lockFile c914740c--includes-node-node-modules-x509 tar:///home/mysite/node/node_modules/x509
160 silly lockFile 9ba0da1a--root-npm-x509-0-0-7-package-tgz tar:///root/.npm/x509/0.0.7/package.tgz
161 silly lockFile 9ba0da1a--root-npm-x509-0-0-7-package-tgz tar:///root/.npm/x509/0.0.7/package.tgz
162 info preinstall [email protected]
163 verbose readDependencies using package.json deps
164 verbose readDependencies using package.json deps
165 silly resolved []
166 verbose about to build /home/mysite/node/node_modules/x509
167 info build /home/mysite/node/node_modules/x509
168 verbose linkStuff [ false,
168 verbose linkStuff false,
168 verbose linkStuff false,
168 verbose linkStuff '/home/mysite/node/node_modules' ]
169 info linkStuff [email protected]
170 verbose linkBins [email protected]
171 verbose linkMans [email protected]
172 verbose rebuildBundles [email protected]
173 info install [email protected]
174 verbose unsafe-perm in lifecycle false
175 info [email protected] Failed to exec install script
176 info /home/mysite/node/node_modules/x509 unbuild
177 info preuninstall [email protected]
178 info uninstall [email protected]
179 verbose true,/home/mysite/node/node_modules,/home/mysite/node/node_modules unbuild [email protected]
180 info postuninstall [email protected]
181 error [email protected] install: `node-gyp rebuild`
181 error Exit status 1
182 error Failed at the [email protected] install script.
182 error This is most likely a problem with the x509 package,
182 error not with npm itself.
182 error Tell the author that this fails on your system:
182 error node-gyp rebuild
182 error You can get their info via:
182 error npm owner ls x509
182 error There is likely additional logging output above.
183 error System Linux 2.6.32-431.3.1.el6.x86_64
184 error command "/usr/bin/node" "/usr/bin/npm" "install" "x509"
185 error cwd /home/mysite/node
186 error node -v v0.10.26
187 error npm -v 1.4.3
188 error code ELIFECYCLE
189 verbose exit [ 1, true ]