ac130nz
By:
ac130nz

Install Ghost on Ubuntu 16.04 (not working)

June 20, 2017 169 views
Ghost Nginx Ubuntu 16.04

Following this tutorial her for the millionth time on a fresh Ubuntu 16.04 install I'm keep coming to the same errors. When running sudo npm start --production

Console Error.

root@ubuntu-512mb-sgp1-01:/var/www/ghost# sudo npm start --production

> ghost@0.11.10 start /var/www/ghost
> node index

WARNING: Ghost is attempting to use a direct method to send email.
It is recommended that you explicitly configure an email service.
Help and documentation can be found at https://docs.ghost.org/v0.11.9/docs/mail-config.

Knex: run
$ npm install sqlite3 --save
Error: Cannot find module '/var/www/ghost/node_modules/sqlite3/lib/binding/node-v48-linux-ia32/node_sqlite3.node'
    at Function.Module._resolveFilename (module.js:469:15)
    at Function.Module._load (module.js:417:25)
    at Module.require (module.js:497:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/var/www/ghost/node_modules/sqlite3/lib/sqlite3.js:4:15)
    at Module._compile (module.js:570:32)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3)
    at Module.require (module.js:497:17)
    at require (internal/module.js:20:19)
    at Client_SQLite3._driver (/var/www/ghost/node_modules/knex/lib/dialects/sqlite3/index.js:75:12)
    at Client_SQLite3.initializeDriver (/var/www/ghost/node_modules/knex/lib/client.js:219:26)
    at Client_SQLite3.Client (/var/www/ghost/node_modules/knex/lib/client.js:113:10)
    at new Client_SQLite3 (/var/www/ghost/node_modules/knex/lib/dialects/sqlite3/index.js:58:20)
    at Knex (/var/www/ghost/node_modules/knex/lib/index.js:60:34)
    at Object.<anonymous> (/var/www/ghost/core/server/data/db/connection.js:55:20)
    at Module._compile (module.js:570:32)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)

npm ERR! Linux 4.4.0-79-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "start" "--production"
npm ERR! node v6.11.0
npm ERR! npm  v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! ghost@0.11.10 start: `node index`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the ghost@0.11.10 start script 'node index'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the ghost package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node index
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs ghost
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls ghost
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /var/www/ghost/npm-debug.log

/var/www/ghost/npm-debug.log

0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/nodejs', '/usr/bin/npm', 'start', '--production' ]
2 info using npm@3.10.10
3 info using node@v6.11.0
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle ghost@0.11.10~prestart: ghost@0.11.10
6 silly lifecycle ghost@0.11.10~prestart: no script for prestart, continuing
7 info lifecycle ghost@0.11.10~start: ghost@0.11.10
8 verbose lifecycle ghost@0.11.10~start: unsafe-perm in lifecycle true
9 verbose lifecycle ghost@0.11.10~start: PATH: /usr/lib/node_modules/npm/bin/no$
10 verbose lifecycle ghost@0.11.10~start: CWD: /var/www/ghost
11 silly lifecycle ghost@0.11.10~start: Args: [ '-c', 'node index' ]
12 silly lifecycle ghost@0.11.10~start: Returned: code: 1  signal: null
13 info lifecycle ghost@0.11.10~start: Failed to exec start script
14 verbose stack Error: ghost@0.11.10 start: `node index`
14 verbose stack Exit status 1
14 verbose stack     at EventEmitter.<anonymous> (/usr/lib/node_modules/npm/lib$
14 verbose stack     at emitTwo (events.js:106:13)
14 verbose stack     at EventEmitter.emit (events.js:191:7)
14 verbose stack     at ChildProcess.<anonymous> (/usr/lib/node_modules/npm/lib$
14 verbose stack     at emitTwo (events.js:106:13)
14 verbose stack     at ChildProcess.emit (events.js:191:7)
14 verbose stack     at maybeClose (internal/child_process.js:891:16)
14 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_pro$
15 verbose pkgid ghost@0.11.10
16 verbose cwd /var/www/ghost
17 error Linux 4.4.0-79-generic
18 error argv "/usr/bin/nodejs" "/usr/bin/npm" "start" "--production"
19 error node v6.11.0
20 error npm  v3.10.10
21 error code ELIFECYCLE
22 error ghost@0.11.10 start: `node index`
22 error Exit status 1
23 error Failed at the ghost@0.11.10 start script 'node index'.
23 error Make sure you have the latest version of node.js and npm installed.
23 error If you do, this is most likely a problem with the ghost package,
23 error not with npm itself.
23 error Tell the author that this fails on your system:
23 error     node index
23 error You can get information on how to open an issue for this project with:
23 error     npm bugs ghost
23 error Or if that isn't available, you can get their info via:
23 error     npm owner ls ghost
23 error There is likely additional logging output above.
Be the first one to answer this question.