Submitted by mgreene20 on Sun, 04/06/2014 - 09:47
Using the Ghost 0.4.2 install script, installation of Ghost fails prematurely with the following error:
Downloading http://ghost.org/dist/v0.4.2/node-v0.10.25-linux-x86.tar.gz .. Found http://scripts.virtualmin.com:80/node-v0.10.25-linux-x86.tar.gz in cache .. Found https://ghost.org:443/zip/ghost-0.4.2.zip in cache ..
Now installing Ghost version 0.4.2 .. NPM install of Ghost failed More information on using this script can be found at http://ghost.org/.
.. installation was only partially complete.
Going to ghost.org for information, as advised by the script has resulted in no resolution.
Status:
Active
Comments
Submitted by JamieCameron on Sun, 04/06/2014 - 13:18 Comment #1
If you SSH into the system as the domain owner,
cd
to the directory that you were trying to install Ghost into and run :\`pwd\`/bin/npm install --production
what does it output?
Submitted by mgreene20 on Sun, 04/06/2014 - 13:35 Comment #2
After some digging around, I discovered that Ghost 0.4.2 requires nodejs 0.10+, so I did this:
sudo add-apt-repository ppa:chris-lea/node.js sudo apt-get update sudo apt-get install nodejs
Now node -v shows 0.10.26 and npm -v shows 1.4.3.
The Virtualmin install script still shows NPM install of Ghost failed, but if I manually run npm install --production it does in fact build.
npm http GET https://registry.npmjs.org/bookshelf/0.6.1 npm http GET https://registry.npmjs.org/busboy/0.0.12 npm http GET https://registry.npmjs.org/express/3.4.6 npm http GET https://registry.npmjs.org/colors/0.6.2 npm http GET https://registry.npmjs.org/express-hbs/0.7.9 npm http GET https://registry.npmjs.org/connect-slashes/1.2.0 npm http GET https://registry.npmjs.org/fs-extra/0.8.1 npm http GET https://registry.npmjs.org/downsize/0.0.5 npm http GET https://registry.npmjs.org/knex/0.5.8 npm http GET https://registry.npmjs.org/lodash/2.4.1 npm http GET https://registry.npmjs.org/moment/2.4.0 npm http GET https://registry.npmjs.org/node-polyglot/0.3.0 npm http GET https://registry.npmjs.org/node-uuid/1.4.1 npm http GET https://registry.npmjs.org/nodemailer/0.5.13 npm http GET https://registry.npmjs.org/semver/2.2.1 npm http GET https://registry.npmjs.org/rss/0.2.1 npm http GET https://registry.npmjs.org/sqlite3/2.2.0 npm http GET https://registry.npmjs.org/unidecode/0.1.3 npm http GET https://registry.npmjs.org/validator/3.4.0 npm http GET https://registry.npmjs.org/when/2.7.0 npm http GET https://registry.npmjs.org/xml/0.0.12 npm http GET https://registry.npmjs.org/mysql/2.1.1 npm http GET https://registry.npmjs.org/bcryptjs/0.7.10 npm http GET https://github.com/ErisDS/showdown/archive/v0.3.2-ghost.tar.gz npm http 304 https://registry.npmjs.org/colors/0.6.2 npm http 304 https://registry.npmjs.org/bookshelf/0.6.1 npm http 304 https://registry.npmjs.org/express/3.4.6 npm http 200 https://github.com/ErisDS/showdown/archive/v0.3.2-ghost.tar.gz npm http 304 https://registry.npmjs.org/express-hbs/0.7.9 npm http 304 https://registry.npmjs.org/busboy/0.0.12 npm http 304 https://registry.npmjs.org/fs-extra/0.8.1 npm http 304 https://registry.npmjs.org/knex/0.5.8 npm http 304 https://registry.npmjs.org/moment/2.4.0 npm http 304 https://registry.npmjs.org/node-polyglot/0.3.0 npm http 304 https://registry.npmjs.org/node-uuid/1.4.1 npm http 304 https://registry.npmjs.org/downsize/0.0.5 npm http 304 https://registry.npmjs.org/lodash/2.4.1 npm http 304 https://registry.npmjs.org/sqlite3/2.2.0 npm http 304 https://registry.npmjs.org/unidecode/0.1.3 npm http 304 https://registry.npmjs.org/nodemailer/0.5.13 npm http 304 https://registry.npmjs.org/semver/2.2.1 npm http 304 https://registry.npmjs.org/validator/3.4.0 npm http 304 https://registry.npmjs.org/rss/0.2.1 npm http 304 https://registry.npmjs.org/xml/0.0.12 npm http 304 https://registry.npmjs.org/connect-slashes/1.2.0 npm http 304 https://registry.npmjs.org/mysql/2.1.1 npm http 304 https://registry.npmjs.org/when/2.7.0 npm http 304 https://registry.npmjs.org/bcryptjs/0.7.10 npm http GET https://registry.npmjs.org/xregexp/2.0.0 npm http GET https://registry.npmjs.org/ncp npm http GET https://registry.npmjs.org/mkdirp npm http GET https://registry.npmjs.org/jsonfile npm http GET https://registry.npmjs.org/rimraf npm http 304 https://registry.npmjs.org/mkdirp npm http 304 https://registry.npmjs.org/xregexp/2.0.0 npm http 304 https://registry.npmjs.org/ncp npm http 304 https://registry.npmjs.org/jsonfile npm http GET https://registry.npmjs.org/mime npm http 304 https://registry.npmjs.org/mime npm http 304 https://registry.npmjs.org/rimraf npm http GET https://registry.npmjs.org/range-parser/0.0.4 npm http GET https://registry.npmjs.org/mkdirp/0.3.5 npm http GET https://registry.npmjs.org/buffer-crc32/0.2.1 npm http GET https://registry.npmjs.org/cookie/0.1.0 npm http GET https://registry.npmjs.org/fresh/0.2.0 npm http GET https://registry.npmjs.org/methods/0.1.0 npm http GET https://registry.npmjs.org/send/0.1.4 npm http GET https://registry.npmjs.org/cookie-signature/1.0.1 npm http GET https://registry.npmjs.org/debug npm http GET https://registry.npmjs.org/connect/2.11.2 npm http GET https://registry.npmjs.org/commander/1.3.2 npm http 304 https://registry.npmjs.org/range-parser/0.0.4 npm http 304 https://registry.npmjs.org/cookie/0.1.0 npm http 304 https://registry.npmjs.org/methods/0.1.0 npm http 304 https://registry.npmjs.org/cookie-signature/1.0.1 npm http 304 https://registry.npmjs.org/debug npm http 304 https://registry.npmjs.org/send/0.1.4 npm http 304 https://registry.npmjs.org/connect/2.11.2 npm http 304 https://registry.npmjs.org/mkdirp/0.3.5 npm http 304 https://registry.npmjs.org/buffer-crc32/0.2.1 npm http GET https://registry.npmjs.org/mailcomposer npm http GET https://registry.npmjs.org/simplesmtp npm http GET https://registry.npmjs.org/readable-stream npm http GET https://registry.npmjs.org/directmail npm http GET https://registry.npmjs.org/he npm http 304 https://registry.npmjs.org/readable-stream npm http 304 https://registry.npmjs.org/commander/1.3.2 npm http 304 https://registry.npmjs.org/directmail npm http 304 https://registry.npmjs.org/he npm http GET https://registry.npmjs.org/js-beautify npm http GET https://registry.npmjs.org/handlebars npm http GET https://registry.npmjs.org/readdirp npm http 304 https://registry.npmjs.org/simplesmtp npm http 304 https://registry.npmjs.org/handlebars npm http GET https://registry.npmjs.org/require-all/0.0.3 npm http GET https://registry.npmjs.org/bignumber.js/1.0.1 npm http 304 https://registry.npmjs.org/js-beautify npm http 304 https://registry.npmjs.org/mailcomposer npm http 304 https://registry.npmjs.org/bignumber.js/1.0.1 npm http 304 https://registry.npmjs.org/require-all/0.0.3 npm http 304 https://registry.npmjs.org/readdirp npm http GET https://registry.npmjs.org/trigger-then npm http GET https://registry.npmjs.org/bluebird npm http GET https://registry.npmjs.org/lodash npm http GET https://registry.npmjs.org/backbone npm http GET https://registry.npmjs.org/inflection npm http 304 https://registry.npmjs.org/lodash npm http 304 https://registry.npmjs.org/backbone npm http 304 https://registry.npmjs.org/bluebird npm http 304 https://registry.npmjs.org/trigger-then npm http GET https://registry.npmjs.org/core-util-is npm http GET https://registry.npmjs.org/isarray/0.0.1 npm http GET https://registry.npmjs.org/inherits npm http GET https://registry.npmjs.org/string_decoder npm http 304 https://registry.npmjs.org/core-util-is npm http 304 https://registry.npmjs.org/string_decoder npm http 304 https://registry.npmjs.org/isarray/0.0.1 npm http 304 https://registry.npmjs.org/inflection npm http 304 https://registry.npmjs.org/fresh/0.2.0 npm http 304 https://registry.npmjs.org/inherits npm http GET https://registry.npmjs.org/generic-pool-redux npm http GET https://registry.npmjs.org/optimist npm http 304 https://registry.npmjs.org/optimist npm http GET https://registry.npmjs.org/graceful-fs npm http GET https://registry.npmjs.org/minimatch npm http 304 https://registry.npmjs.org/minimatch npm http 304 https://registry.npmjs.org/graceful-fs npm http 304 https://registry.npmjs.org/generic-pool-redux npm http GET https://registry.npmjs.org/keypress npm http GET https://registry.npmjs.org/rai npm http GET https://registry.npmjs.org/xoauth2 npm http GET https://registry.npmjs.org/dkim-signer npm http GET https://registry.npmjs.org/mimelib npm http GET https://registry.npmjs.org/mime/1.2.9 npm http GET https://registry.npmjs.org/punycode npm http GET https://registry.npmjs.org/follow-redirects/0.0.3 npm http 304 https://registry.npmjs.org/mimelib npm http 304 https://registry.npmjs.org/dkim-signer npm http 304 https://registry.npmjs.org/mime/1.2.9 npm http 304 https://registry.npmjs.org/xoauth2 npm http 304 https://registry.npmjs.org/punycode npm http 304 https://registry.npmjs.org/rai npm http 304 https://registry.npmjs.org/keypress npm http 304 https://registry.npmjs.org/follow-redirects/0.0.3 npm http GET https://registry.npmjs.org/dicer/0.1.5 npm http 304 https://registry.npmjs.org/dicer/0.1.5 npm http GET https://registry.npmjs.org/lru-cache npm http GET https://registry.npmjs.org/sigmund npm http 304 https://registry.npmjs.org/lru-cache npm http 304 https://registry.npmjs.org/sigmund npm http GET https://registry.npmjs.org/underscore npm http 304 https://registry.npmjs.org/underscore npm http GET https://registry.npmjs.org/underscore npm http 304 https://registry.npmjs.org/underscore npm http GET https://registry.npmjs.org/encoding npm http GET https://registry.npmjs.org/addressparser npm http 304 https://registry.npmjs.org/encoding npm http GET https://registry.npmjs.org/minimist npm http GET https://registry.npmjs.org/wordwrap npm http 304 https://registry.npmjs.org/wordwrap npm http GET https://registry.npmjs.org/config-chain npm http GET https://registry.npmjs.org/nopt npm http 304 https://registry.npmjs.org/nopt npm http 304 https://registry.npmjs.org/config-chain npm http 304 https://registry.npmjs.org/minimist npm http GET https://registry.npmjs.org/abbrev npm http GET https://registry.npmjs.org/streamsearch/0.1.2 npm http GET https://registry.npmjs.org/ini npm http GET https://registry.npmjs.org/proto-list npm http 304 https://registry.npmjs.org/ini npm http 304 https://registry.npmjs.org/proto-list npm http 304 https://registry.npmjs.org/abbrev npm http 304 https://registry.npmjs.org/addressparser npm http GET https://registry.npmjs.org/iconv-lite npm http 304 https://registry.npmjs.org/iconv-lite npm http GET https://registry.npmjs.org/pause/0.0.1 npm http GET https://registry.npmjs.org/uid2/0.0.3 npm http GET https://registry.npmjs.org/raw-body/1.1.2 npm http GET https://registry.npmjs.org/negotiator/0.3.0 npm http GET https://registry.npmjs.org/multiparty/2.2.0 npm http GET https://registry.npmjs.org/qs/0.6.5 npm http GET https://registry.npmjs.org/bytes/0.2.1 npm http 304 https://registry.npmjs.org/pause/0.0.1 npm http 304 https://registry.npmjs.org/raw-body/1.1.2 npm http 304 https://registry.npmjs.org/negotiator/0.3.0 npm http 304 https://registry.npmjs.org/multiparty/2.2.0 npm http 304 https://registry.npmjs.org/bytes/0.2.1 npm http 304 https://registry.npmjs.org/uid2/0.0.3 npm http GET https://registry.npmjs.org/uglify-js npm http 304 https://registry.npmjs.org/streamsearch/0.1.2 npm http 304 https://registry.npmjs.org/uglify-js npm http 304 https://registry.npmjs.org/qs/0.6.5 npm http GET https://registry.npmjs.org/async npm http GET https://registry.npmjs.org/source-map npm http 304 https://registry.npmjs.org/async npm http 304 https://registry.npmjs.org/source-map npm http GET https://registry.npmjs.org/node-pre-gyp npm http 304 https://registry.npmjs.org/node-pre-gyp npm http GET https://registry.npmjs.org/npmlog npm http GET https://registry.npmjs.org/semver npm http GET https://registry.npmjs.org/request npm http GET https://registry.npmjs.org/tar npm http GET https://registry.npmjs.org/tar-pack npm http GET https://registry.npmjs.org/aws-sdk npm http GET https://registry.npmjs.org/rc npm http 304 https://registry.npmjs.org/npmlog npm http 304 https://registry.npmjs.org/request npm http 304 https://registry.npmjs.org/semver npm http GET https://registry.npmjs.org/amdefine npm http 304 https://registry.npmjs.org/tar-pack npm http 304 https://registry.npmjs.org/tar npm http 304 https://registry.npmjs.org/aws-sdk npm http 304 https://registry.npmjs.org/amdefine npm http 304 https://registry.npmjs.org/rc npm http GET https://registry.npmjs.org/ansi npm http GET https://registry.npmjs.org/deep-extend npm http GET https://registry.npmjs.org/fstream npm http GET https://registry.npmjs.org/fstream-ignore/0.0.7 npm http GET https://registry.npmjs.org/uid-number/0.0.3 npm http GET https://registry.npmjs.org/once npm http 304 https://registry.npmjs.org/fstream npm http 304 https://registry.npmjs.org/ansi npm http 304 https://registry.npmjs.org/fstream-ignore/0.0.7 npm http 304 https://registry.npmjs.org/deep-extend npm http GET https://registry.npmjs.org/qs npm http GET https://registry.npmjs.org/json-stringify-safe npm http GET https://registry.npmjs.org/forever-agent npm http GET https://registry.npmjs.org/tough-cookie npm http GET https://registry.npmjs.org/form-data npm http 304 https://registry.npmjs.org/once npm http GET https://registry.npmjs.org/tunnel-agent npm http GET https://registry.npmjs.org/http-signature npm http GET https://registry.npmjs.org/oauth-sign npm http GET https://registry.npmjs.org/hawk npm http GET https://registry.npmjs.org/aws-sign2 npm http 304 https://registry.npmjs.org/json-stringify-safe npm http 304 https://registry.npmjs.org/tough-cookie npm http 304 https://registry.npmjs.org/qs npm http 304 https://registry.npmjs.org/tunnel-agent npm http 304 https://registry.npmjs.org/oauth-sign npm http 304 https://registry.npmjs.org/http-signature npm http 304 https://registry.npmjs.org/hawk npm http 304 https://registry.npmjs.org/form-data npm http 304 https://registry.npmjs.org/forever-agent npm http 304 https://registry.npmjs.org/uid-number/0.0.3 npm http GET https://registry.npmjs.org/block-stream npm http 304 https://registry.npmjs.org/block-stream npm http 304 https://registry.npmjs.org/aws-sign2 npm http GET https://registry.npmjs.org/combined-stream npm http GET https://registry.npmjs.org/assert-plus/0.1.2 npm http GET https://registry.npmjs.org/ctype/0.5.2 npm http GET https://registry.npmjs.org/asn1/0.1.11 npm http 304 https://registry.npmjs.org/ctype/0.5.2 npm http 304 https://registry.npmjs.org/assert-plus/0.1.2 npm http 304 https://registry.npmjs.org/combined-stream npm http 304 https://registry.npmjs.org/asn1/0.1.11 npm http GET https://registry.npmjs.org/delayed-stream/0.0.5 npm http 304 https://registry.npmjs.org/delayed-stream/0.0.5 npm http GET https://registry.npmjs.org/cryptiles npm http GET https://registry.npmjs.org/sntp npm http GET https://registry.npmjs.org/hoek npm http GET https://registry.npmjs.org/boom npm http 304 https://registry.npmjs.org/cryptiles npm http 304 https://registry.npmjs.org/hoek npm http 304 https://registry.npmjs.org/boom npm http 304 https://registry.npmjs.org/sntp npm http GET https://registry.npmjs.org/readable-stream npm http GET https://registry.npmjs.org/stream-counter npm http 304 https://registry.npmjs.org/readable-stream npm http 304 https://registry.npmjs.org/stream-counter npm http GET https://registry.npmjs.org/xml2js/0.2.4 npm http GET https://registry.npmjs.org/xmlbuilder/0.4.2 npm http 304 https://registry.npmjs.org/xml2js/0.2.4 npm http 304 https://registry.npmjs.org/xmlbuilder/0.4.2 npm http GET https://registry.npmjs.org/sax npm http 304 https://registry.npmjs.org/sax
node-pre-gyp http GET http://node-sqlite3.s3.amazonaws.com/Release/node_sqlite3-v2.2.0-node-v1... node-pre-gyp http 200 http://node-sqlite3.s3.amazonaws.com/Release/node_sqlite3-v2.2.0-node-v1... [sqlite3] Success: "lib/node_sqlite3.node" is installed connect-slashes@1.2.0 node_modules/connect-slashes
colors@0.6.2 node_modules/colors
xml@0.0.12 node_modules/xml
node-uuid@1.4.1 node_modules/node-uuid
validator@3.4.0 node_modules/validator
node-polyglot@0.3.0 node_modules/node-polyglot
showdown@0.3.2-ghost node_modules/showdown
semver@2.2.1 node_modules/semver
bcryptjs@0.7.10 node_modules/bcryptjs
when@2.7.0 node_modules/when
rss@0.2.1 node_modules/rss └── mime@1.2.11
fs-extra@0.8.1 node_modules/fs-extra ├── jsonfile@1.1.1 ├── rimraf@2.2.6 ├── ncp@0.4.2 └── mkdirp@0.3.5
downsize@0.0.5 node_modules/downsize └── xregexp@2.0.0
lodash@2.4.1 node_modules/lodash
unidecode@0.1.3 node_modules/unidecode
busboy@0.0.12 node_modules/busboy ├── readable-stream@1.1.12 (isarray@0.0.1, inherits@2.0.1, string_decoder@0.10.25-1, core-util-is@1.0.1) └── dicer@0.1.5 (streamsearch@0.1.2)
knex@0.5.8 node_modules/knex ├── generic-pool-redux@0.1.0 ├── mkdirp@0.3.5 ├── optimist@0.6.1 (wordwrap@0.0.2, minimist@0.0.8) └── bluebird@1.0.8
bookshelf@0.6.1 node_modules/bookshelf ├── trigger-then@0.1.1 ├── inflection@1.2.7 ├── backbone@1.1.2 (underscore@1.6.0) ├── bluebird@0.10.14-0 └── lodash@2.3.0
nodemailer@0.5.13 node_modules/nodemailer ├── directmail@0.1.6 ├── he@0.3.6 ├── readable-stream@1.0.26-4 (isarray@0.0.1, inherits@2.0.1, string_decoder@0.10.25-1, core-util-is@1.0.1) ├── simplesmtp@0.3.24 (xoauth2@0.1.8, rai@0.1.9) └── mailcomposer@0.2.8 (dkim-signer@0.1.0, punycode@1.2.4, mime@1.2.9, follow-redirects@0.0.3, mimelib@0.2.14)
moment@2.4.0 node_modules/moment
express-hbs@0.7.9 node_modules/express-hbs ├── readdirp@0.3.3 (graceful-fs@2.0.3, minimatch@0.2.14) ├── js-beautify@1.4.2 (mkdirp@0.3.5, nopt@2.1.2, config-chain@1.1.8) └── handlebars@1.3.0 (optimist@0.3.7, uglify-js@2.3.6)
mysql@2.1.1 node_modules/mysql ├── require-all@0.0.3 ├── readable-stream@1.1.12 (isarray@0.0.1, inherits@2.0.1, string_decoder@0.10.25-1, core-util-is@1.0.1) └── bignumber.js@1.0.1
express@3.4.6 node_modules/express ├── methods@0.1.0 ├── debug@0.8.0 ├── range-parser@0.0.4 ├── cookie-signature@1.0.1 ├── fresh@0.2.0 ├── buffer-crc32@0.2.1 ├── cookie@0.1.0 ├── mkdirp@0.3.5 ├── send@0.1.4 (mime@1.2.11) ├── commander@1.3.2 (keypress@0.1.0) └── connect@2.11.2 (uid2@0.0.3, pause@0.0.1, qs@0.6.5, bytes@0.2.1, raw-body@1.1.2, negotiator@0.3.0, multiparty@2.2.0)
sqlite3@2.2.0 node_modules/sqlite3 └── node-pre-gyp@0.2.6 (rimraf@2.2.6, mkdirp@0.3.5, nopt@2.1.2, semver@2.1.0, npmlog@0.0.6, rc@0.3.4, tar-pack@2.0.0, tar@0.1.19, request@2.34.0, aws-sdk@2.0.0-rc9)
That said, I have disabled individual account from having SSH/Webmin access, so I ran this as root. I'll enable SSH for that user and try it as that user and see if I have a different outcome. I guess I expected that the "install script" for Virtualmin would make this install more turnkey, but if I have to manually SSH to complete steps of the process then I'll just cancel the Virtualmin Pro license and do it manually.
Submitted by mgreene20 on Sun, 04/06/2014 - 13:39 Comment #3
Update:
If I SSH in as the domain owner account, I get this.
$
pwd
/bin/npm install --production /home/USERNAME/public_html/bin/npm: 2: exec: /home/USERNAME/public_html/bin/node: not foundSubmitted by mgreene20 on Sun, 04/06/2014 - 13:48 Comment #4
On a fresh virtual server with nothing done to it. I tried running the Ghost installer, got the same NPM install of Ghost failed partial installation error. Then ran the command you requested as the domain owner, and got this:
$
pwd
/bin/npm install --production -sh: 1: /home/USERNAME/bin/npm: not found $Submitted by JamieCameron on Sun, 04/06/2014 - 13:50 Comment #5
Did you
cd
to thepublic_html
directory first? Or whatever subdirectory of it you chose to install Ghost into?Submitted by mgreene20 on Sun, 04/06/2014 - 14:01 Comment #6
Yes. Ghost script ran to the public_html directory. Running the command from there shows npm not found, though interestingly enough, there is a /home/USERNAME/public_html/bin/npm... though trying to run it, navigate into it, or edit it, I get /usr/bin/npm: No such file or directory. I'm assuming you're just aliasing to /usr/bin/npm... and I have manually confirmed that there is no npm there.
Submitted by JamieCameron on Sun, 04/06/2014 - 14:19 Comment #7
Actually, there should be a
bin
subdirectory under the selected install dir that contains thenpm
andnode
commands. Virtualmin installs its own copy of node as part of the Ghost install process, as the system-wide copy may not be usable for installing new apps like Ghost.Submitted by mgreene20 on Sun, 04/06/2014 - 14:37 Comment #8
Here's the contents of the public_html folder, where Ghost was told to install.
$ ls
awstats-icon ChangeLog Gruntfile.js lib share
awstatsicons config.example.js icon LICENSE
bin content include package.json
bower.json core index.js README.md
$ cd bin
$ ls
node npm
$ node
-sh: 17: node: not found
$ npm
-sh: 18: npm: not found
$ cd npm
-sh: 19: cd: can't cd to npm
$
This is logged in as the domain owner. If I switch to root and try to hit npm in that bin folder I get:
-bash: /usr/bin/npm: No such file or directory.
Submitted by JamieCameron on Sun, 04/06/2014 - 19:23 Comment #9
Ok, so the
node
andnpm
commands did get created.You should be able to run them, as long as you use a full path.
Submitted by mgreene20 on Mon, 04/07/2014 - 08:00 Comment #10
I don't think I'm following you, could you give me an example please?
Submitted by JamieCameron on Mon, 04/07/2014 - 18:45 Comment #11
What I mean is, you should be able to run :
cd /home/yourdomain/public_html
./bin/npm --install production
let me know what that outputs.
Submitted by mgreene20 on Mon, 04/07/2014 - 19:03 Comment #12
I restored my server back to fresh Virtualmin Pro to make sure I hadn't goofed anything else up. Patched all available Virtualmin updates, then created a fresh Virtual Server for this test.
Added Ghost per the install script and got the same "NPM install of Ghost failed" message.
SSH'd to the server as the account owning the virtual server:
$ cd /home/USERNAME/public_html
$ ./bin/npm --install production
./bin/npm: 2: exec: ./bin/node: not found
$
Then SSH'd to the server as root:
root@web:~# cd /home/USERNAME/public_html/
root@web:/home/USERNAME/public_html# ./bin/npm --install production
./bin/npm: 2: exec: ./bin/node: not found
root@web:/home/USERNAME/public_html#
Same result... node doesn't exist. There is a bin folder under public_html that contains "node" and "npm" but it's like they're aliases that don't go to anything.
Submitted by JamieCameron on Mon, 04/07/2014 - 20:13 Comment #13
Is the
bin/node
file a symlink, and if so to where?If not, how large is the file?
Submitted by mgreene20 on Mon, 04/07/2014 - 21:23 Comment #14
Looks like node is a file, and npm is a symlink.
Run as root:
root@web:/home/USERNAME/public_html/bin# ls -l
total 9308
-rwxr-xr-x 1 USERNAME USERNAME 9528535 Apr 7 19:37 node
lrwxrwxrwx 1 USERNAME USERNAME 38 Apr 7 19:37 npm -> ../lib/node_modules/npm/bin/npm-cli.js
root@web:/home/USERNAME/public_html/bin#
And ../lib/node_modules/npm/bin/npm-cli.js appears valid.
root@web:/home/USERNAME/public_html/bin# ls -l ../lib/node_modules/npm/bin/npm-cli.js
-rwxr-xr-x 1 USERNAME USERNAME 2290 Apr 7 19:37 ../lib/node_modules/npm/bin/npm-cli.js
root@web:/home/USERNAME/public_html/bin#
Submitted by JamieCameron on Mon, 04/07/2014 - 22:27 Comment #15
So you run (from the same directory)
./bin/node
, what does it output?If this also fails, it may be due to an architecture mismatch. What CPU type does your system have?
Submitted by mgreene20 on Tue, 04/08/2014 - 07:07 Comment #16
I think I'm confused again... I thought we established that /home/USERNAME/public_html/bin/node is not a directory, so I'm not sure how I'd even try to run it from there. I must be missing what you're asking.
root@web:/home/USERNAME/public_html/bin# cd node
-bash: cd: node: No such file or directory
root@web:/home/USERNAME/public_html# ./bin/npm --install production
./bin/npm: 2: exec: ./bin/node: not found
root@web:/home/USERNAME/public_html# cd bin
root@web:/home/USERNAME/public_html/bin# ./npm --install production
./npm: 2: exec: ./node: not found
root@web:/home/USERNAME/public_html/bin#
CPU information included below. I successfully ran a standalone Ghost install on the same server, before reverting to the base image and installing Virtualmin so I could easily host multiple Ghost instances on the one box, so I don't know how it'd be a CPU issue, unless it's something specific to Virtualmin.
lscpu
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Little Endian
CPU(s): 1
On-line CPU(s) list: 0
Thread(s) per core: 1
Core(s) per socket: 1
Socket(s): 1
NUMA node(s): 1
Vendor ID: GenuineIntel
CPU family: 6
Model: 2
Stepping: 3
CPU MHz: 1999.999
BogoMIPS: 3999.99
Virtualization: VT-x
Hypervisor vendor: KVM
Virtualization type: full
L1d cache: 32K
L1i cache: 32K
L2 cache: 4096K
NUMA node0 CPU(s): 0
Submitted by JamieCameron on Tue, 04/08/2014 - 11:35 Comment #17
Sorry, what I meant was to run the following :
cd /home/USERNAME/public_html/bin
./node
and let me know what that outputs.
Submitted by mgreene20 on Tue, 04/08/2014 - 12:05 Comment #18
As root:
root@web:/home/USERNAME/public_html/bin# ./node
-bash: ./node: No such file or directory
As domain owner:
$ ls
node npm
$ ./node
-sh: 14: ./node: not found
$
Submitted by JamieCameron on Tue, 04/08/2014 - 12:27 Comment #19
Wow ... so the "node" command exists, but can't be run!?
What output do you get if you run
file node
in thebin
directory?Submitted by mgreene20 on Tue, 04/08/2014 - 12:45 Comment #20
Odd isn't it... it's like it's there, but... not.
root@web:/home/USERNAME/public_html/bin# file node
node: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.9, not stripped
root@web:/home/USERNAME/public_html/bin#
Submitted by JamieCameron on Tue, 04/08/2014 - 13:36 Comment #21
That looks OK.
Do you have anything like SElinux or apparmor installed that could be blocking execution of some binaries?
Submitted by mgreene20 on Tue, 04/08/2014 - 14:41 Comment #22
So apparently apparmor was installed... it must be part of the default DigitalOcean image. I uninstalled it, rebooted the server, created a fresh virtual server, and now I still get the partial install error, but it actually says it's an issue with node.
Now installing Ghost version 0.4.2 ..
NPM install of Ghost failed : /home/USERNAME/public_html/bin/npm: 2: exec: /home/USERNAME/public_html/bin/node: not found
More information on using this script can be found at http://ghost.org/.
.. installation was only partially complete.
It just said "NPM install of Ghost failed" before, with no description of the error.
Submitted by JamieCameron on Tue, 04/08/2014 - 15:31 Comment #23
Does anything get logged to
/var/log/messages
when you try to manually run thenode
command?Submitted by mgreene20 on Tue, 04/08/2014 - 15:37 Comment #24
Nope, nothing in the log.
Wouldn't be something with permissions on that node file would it?
Submitted by JamieCameron on Tue, 04/08/2014 - 22:48 Comment #25
It is executable though, at least according to the
ls -l
output.Does anything get logged to
/var/log/secure
or/var/log/auth.log
when you try to run the./node
command?Submitted by mgreene20 on Tue, 04/08/2014 - 23:22 Comment #26
Nope, nothing in the log. I don't even have a /var/log/secure file.
Submitted by JamieCameron on Wed, 04/09/2014 - 11:38 Comment #27
What about
/var/log/authlog
orauth.log
?Submitted by mgreene20 on Wed, 04/09/2014 - 12:52 Comment #28
Nothing. So nodejs isn't installed on the server as a whole... you'd said that the ghost installer installs it's own. Should I try installing nodejs on the actual server though?
Submitted by JamieCameron on Wed, 04/09/2014 - 17:22 Comment #29
I just thought of one more thing - is the /home filesystem on your server mounted with the noexec option?
Submitted by mgreene20 on Wed, 04/09/2014 - 20:11 Comment #30
So this is the first time I've worked on a server with a single partition (since I switched to digitalocean). I actually don't see /home on the mount list...
Is there another easy way to check this, or would it simply inherit from /?
root@web:/home# mount
/dev/vda on / type ext4 (rw,noatime,grpquota,errors=remount-ro,usrquota)
proc on /proc type proc (rw,noexec,nosuid,nodev)
sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)
none on /sys/fs/fuse/connections type fusectl (rw)
none on /sys/kernel/debug type debugfs (rw)
none on /sys/kernel/security type securityfs (rw)
udev on /dev type devtmpfs (rw,mode=0755)
devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620)
tmpfs on /run type tmpfs (rw,noexec,nosuid,size=10%,mode=0755)
none on /run/lock type tmpfs (rw,noexec,nosuid,nodev,size=5242880)
none on /run/shm type tmpfs (rw,nosuid,nodev)
Submitted by JamieCameron on Wed, 04/09/2014 - 21:59 Comment #31
Nope, that looks fine.
So is this system a VM of some kind? And if so, what kind (OpenVZ, Xen, KVM, etc)?
Submitted by mgreene20 on Wed, 04/09/2014 - 23:54 Comment #32
I'm not sure if I can find out what the underlying architecture is. It's DigitalOcean.
Submitted by mgreene20 on Fri, 04/11/2014 - 16:04 Comment #33
Are we fresh out of ideas here?
Submitted by andreychek on Fri, 04/11/2014 - 16:09 Comment #34
It sounds like there's some sort of issue with running that node binary on the server architecture here, but we aren't sure why that's occurring.
Would it be possible for us to log into your system and take a look?
If so, could you either enable Remote Support using the Virtual Support module, or email root login details to eric@virtualmin.com?
Also, let us know what domain you were trying to install that into. Thanks!
Submitted by mgreene20 on Fri, 04/11/2014 - 16:41 Comment #35
Email on the way.
Submitted by andreychek on Fri, 04/11/2014 - 20:34 Comment #36
Okay, the "node" binary should be working properly now.
Could you try the Install Script again and see if it works as expected?
Submitted by mgreene20 on Sat, 04/12/2014 - 07:50 Comment #37
It seems like it may be working now. I'll put it through its paces a bit and see what happens. What did you end up needing to do?
Submitted by JamieCameron on Sat, 04/12/2014 - 11:21 Comment #38
It turns out there was a missing library that had to be installed to run the 32 bit version of node on a 64 bit system.