Hello everybody,
This week I’ve been trying to download and install Ghost on my VPS. I just can’t get it to work and I don’t understand what’s going wrong and why I can’t find anything resembling my issue online.
After following the installation guide to the letter, I get a vague error. I tried installing or updating packages that were not mentioned in the guide, bug are generating errors, like Yarn.
...
node-pre-gyp info ok
[sqlite3] Success: "/var/www/ghost/versions/4.11.0/node_modules/sqlite3/lib/binding/napi-v3-linux-x64/node_sqlite3.node" is installed via remote
--------------- stderr ---------------
warning ghost@4.11.0: The engine "cli" appears to be invalid.
warning Resolution field "moment-timezone@0.5.23" is incompatible with requested version "moment-timezone@^0.5.33"
warning Resolution field "moment@2.24.0" is incompatible with requested version "moment@^2.29.1"
warning Resolution field "moment@2.24.0" is incompatible with requested version "moment@2.27.0"
warning Resolution field "moment@2.24.0" is incompatible with requested version "moment@^2.27.0"
warning Resolution field "moment-timezone@0.5.23" is incompatible with requested version "moment-timezone@^0.5.31"
warning Resolution field "moment@2.24.0" is incompatible with requested version "moment@^2.29.1"
warning Resolution field "moment@2.24.0" is incompatible with requested version "moment@2.27.0"
warning " > bookshelf@0.15.2" has incorrect peer dependency "knex@>=0.13.0 <0.18.0".
warning Error running install script for optional dependency: "/var/www/ghost/versions/4.11.0/node_modules/dtrace-provider: Command failed.
Exit code: 2
Command: node-gyp rebuild || node suppress-error.js
Arguments:
Directory: /var/www/ghost/versions/4.11.0/node_modules/dtrace-provider
Output:
/bin/sh: 1: Cannot fork"
warning Error running install script for optional dependency: "/var/www/ghost/versions/4.11.0/node_modules/sharp: Command failed.
Exit code: 1
Command: (node install/libvips && node install/dll-copy && prebuild-install) || (node install/can-compile && node-gyp rebuild && node install/dll-copy)
Arguments:
Directory: /var/www/ghost/versions/4.11.0/node_modules/sharp
Output:
sharp: Downloading https://github.com/lovell/sharp-libvips/releases/download/v8.10.6/libvips-8.10.6-linux-x64.tar.br
Aborted"
error /var/www/ghost/versions/4.11.0/node_modules/re2: Command failed.
Exit code: 245
Command: install-from-cache --artifact build/Release/re2.node --host-var RE2_DOWNLOAD_MIRROR || npm run rebuild
Arguments:
Directory: /var/www/ghost/versions/4.11.0/node_modules/re2
Output:
Aborted
npm WARN lifecycle The node binary used for scripts is /tmp/yarn--1628194206798-0.4454434994025851/node but npm is using /usr/bin/node itself. Use the `--scripts-prepend-node-path` option to include the path for the node binary npm was executed with.
npm ERR! code ELIFECYCLE
npm ERR! syscall spawn sh
npm ERR! file sh
npm ERR! path sh
npm ERR! errno -11
npm ERR! re2@1.16.0 rebuild: `node-gyp rebuild`
npm ERR! spawn sh EAGAIN
npm ERR!
npm ERR! Failed at the re2@1.16.0 rebuild script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/ghostuser/.npm/_logs/2021-08-05T20_10_09_157Z-debug.log
> re2@1.16.0 rebuild /var/www/ghost/versions/4.11.0/node_modules/re2
> node-gyp rebuild
**Debug Information:**
** OS: Ubuntu, v18.04.5 LTS**
** Node Version: v14.17.4**
** Ghost-CLI Version: 1.17.3**
** Environment: production**
** Command: 'ghost install --verbose'**
Additional log info available in: /home/ghostuser/.ghost/logs/ghost-cli-debug-2021-08-05T20_10_16_617Z.log
Try running ghost doctor to check your system for known issues.
You can always refer to https://ghost.org/docs/ghost-cli/ for troubleshooting.
**ghostuser@h2946241:/var/www/ghost$** ghost doctor
Working directory is not a recognisable Ghost installation.
Run `ghost doctor` again within a folder where Ghost was installed with Ghost-CLI.
Here are the top lines of “/home/ghostuser/.ghost/logs/ghost-cli-debug-2021-08-05T20_10_16_617Z.log”:
` Debug Information:
OS: Ubuntu, v18.04.5 LTS
Node Version: v14.17.4
Ghost-CLI Version: 1.17.3
Environment: production
Command: 'ghost install --verbose'
Message: Command failed: yarn install --no-emoji --no-progress --verbose
warning ghost@4.11.0: The engine "cli" appears to be invalid.
warning Resolution field "moment-timezone@0.5.23" is incompatible with requeste$
warning Resolution field "moment@2.24.0" is incompatible with requested version$
warning Resolution field "moment@2.24.0" is incompatible with requested version$
warning Resolution field "moment@2.24.0" is incompatible with requested version$
warning Resolution field "moment-timezone@0.5.23" is incompatible with requeste$
warning Resolution field "moment@2.24.0" is incompatible with requested version$
warning Resolution field "moment@2.24.0" is incompatible with requested version$
warning " > bookshelf@0.15.2" has incorrect peer dependency "knex@>=0.13.0 <0.1$
warning Error running install script for optional dependency: "/var/www/ghost/v$
Exit code: 2
Command: node-gyp rebuild || node suppress-error.js
Arguments:
Directory: /var/www/ghost/versions/4.11.0/node_modules/dtrace-provider
Output:
/bin/sh: 1: Cannot fork"
warning Error running install script for optional dependency: "/var/www/ghost/v$
Exit code: 1
Command: (node install/libvips && node install/dll-copy && prebuild-install) ||$
Arguments:
Directory: /var/www/ghost/versions/4.11.0/node_modules/sharp
Output:
sharp: Downloading https://github.com/lovell/sharp-libvips/releases/download/v8$
Aborted"
error /var/www/ghost/versions/4.11.0/node_modules/re2: Command failed
Exit code: 24
Command: install-from-cache --artifact build/Release/re2.node --host-var RE2_DO$
Arguments:
Directory: /var/www/ghost/versions/4.11.0/node_modules/re2
Output:
Aborted
npm WARN lifecycle The node binary used for scripts is /tmp/yarn--1628194206798$
npm ERR! code ELIFECYCLE
npm ERR! syscall spawn sh
npm ERR! file sh
npm ERR! path sh
npm ERR! errno -11
npm ERR! re2@1.16.0 rebuild: `node-gyp rebuild`
npm ERR! spawn sh EAGAIN
npm ERR!
npm ERR! Failed at the re2@1.16.0 rebuild script.
npm ERR! This is probably not a problem with npm. There is likely additional lo$
npm ERR! A complete log of this run can be found in:
npm ERR! /home/ghostuser/.npm/_logs/2021-08-05T20_10_09_157Z-debug.log
> re2@1.16.0 rebuild /var/www/ghost/versions/4.11.0/node_modules/re2
> node-gyp rebuild
yarn install v1.22.10
verbose 0.303450627 Checking for configuration file "/var/www/ghost/versions/4.$
verbose 0.304538573 Checking for configuration file "/home/ghostuser/.npmrc".
verbose 0.305292228 Checking for configuration file "/usr/etc/npmrc".
verbose 0.305892082 Checking for configuration file "/var/www/ghost/versions/4.$
verbose 0.306451904 Checking for configuration file "/var/www/ghost/versions/.n$
verbose 0.307008825 Checking for configuration file "/var/www/ghost/.npmrc".
verbose 0.307571155 Checking for configuration file "/var/www/.npmrc".
verbose 0.308192867 Checking for configuration file "/var/.npmrc".`
Can anyone tell me what I am doing wrong? If you need any more information, please ask! Thank you for your time.