Problems installing Ghost in Debian v8

I’m trying install Ghost in local, I have problem as bellow:

ghostlab@Mongodb:/var/www/ghost$ ghost install

:heavy_check_mark: Checking system Node.js version
:heavy_check_mark: Checking logged in user
:heavy_check_mark: Checking current folder permissions
System checks failed with message: ‘Linux version is not Ubuntu 16, 18, or 20’
Some features of Ghost-CLI may not work without additional configuration.
For local installs we recommend using ghost install local instead.
? Continue anyway? Yes
System stack check skipped
:information_source: Checking system compatibility [skipped]
:heavy_check_mark: Checking for a MySQL installation
:heavy_check_mark: Checking memory availability
:heavy_check_mark: Checking free space
:heavy_check_mark: Checking for latest Ghost version
:heavy_check_mark: Setting up install directory
:heavy_check_mark: Downloading and installing Ghost v3.36.0
:heavy_check_mark: Finishing install process
? Enter your blog URL: http://localhost:2368
? Enter your MySQL hostname: localhost
? Enter your MySQL username: root
? Enter your MySQL password: [hidden]
? Enter your Ghost database name: ghost_prod
:heavy_check_mark: Configuring Ghost
:heavy_check_mark: Setting up instance

  • sudo chown -R ghost:ghost /var/www/ghost/content
    ? Sudo Password [hidden]
    :heavy_check_mark: Setting up “ghost” system user
    ? Do you wish to set up “ghost” mysql user? Yes
    :heavy_check_mark: Setting up “ghost” mysql user
    child_process.js:674
    throw err;
    ^

Error: Command failed: service --status-all 2> /dev/null
at checkExecSyncError (child_process.js:635:11)
at execSync (child_process.js:671:15)
at /usr/lib/node_modules/ghost-cli/node_modules/systeminformation/lib/processes.js:114:26
at processTicksAndRejections (internal/process/task_queues.js:79:11) {
status: 127,
signal: null,
output: [ null, Buffer(0) [Uint8Array] , Buffer(0) [Uint8Array] ],
pid: 3009,
stdout: Buffer(0) [Uint8Array] ,
stderr: Buffer(0) [Uint8Array]
}

Ghost doctor said that:

ghostlab@Mongodb:/var/www/ghost$ ghost doctor
:heavy_check_mark: Checking system Node.js version
:heavy_check_mark: Checking logged in user
:heavy_check_mark: Ensuring user is not logged in as ghost user
:heavy_check_mark: Checking if logged in user is directory owner
:heavy_check_mark: Checking current folder permissions
System checks failed with message: ‘Linux version is not Ubuntu 16, 18, or 20’
Some features of Ghost-CLI may not work without additional configuration.
For local installs we recommend using ghost install local instead.
? Continue anyway? Yes
System stack check skipped
:information_source: Checking system compatibility [skipped]
:heavy_check_mark: Checking for a MySQL installation

  • sudo systemctl is-active ghost_localhost
    :heavy_multiplication_x: Validating config
    :heavy_check_mark: Checking folder permissions
    :heavy_check_mark: Checking file permissions
    :heavy_check_mark: Checking content folder ownership
    :heavy_check_mark: Checking memory availability
    :heavy_check_mark: Checking binary dependencies
    :heavy_check_mark: Checking free space
    One or more errors occurred.
  1. ProcessError

Message: Command failed: /bin/sh -c sudo -S -p ‘#node-sudo-passwd#’ systemctl is-active ghost_localhost

unknown

Exit code: 3

Debug Information:
OS: Debian GNU/Linux, v8
Node Version: v12.19.0
Ghost Version: 3.36.0
Ghost-CLI Version: 1.15.0
Environment: production
Command: ‘ghost doctor’

Additional log info available in: /home/ghostlab/.ghost/logs/ghost-cli-debug-2020-10-22T02_28_46_816Z.log

Try running ghost doctor to check your system for known issues.

You can always refer to Ghost-CLI - A fully loaded tool for installation and configuration for troubleshooting.

I see that ghost service doesn’t exist in system

ghostlab@Mongodb:/var/www/ghost$ ls /lib/systemd/system/ghost
ls: cannot access /lib/systemd/system/ghost: No such file or directory

How can I fix this problem?

I’m having the same issue - install process fails with Command failed: service --status-all 2> /dev/null.

Any help would be appreciated.

Was scratching my head for a bit trying to figure out what was causing this, and I think I found the reason.

The command being run, service, is located in the /usr/sbin directory. On Ubuntu (which Ghost-CLI is built for/thoroughly tested on) the /usr/sbin directory is automatically part of the $PATH variable for new users (and thus can be discovered automatically when the command is run). However, for Debian it appears that isn’t the case - hence why the service command (run by the systeminformation package we use for a number of things) is throwing that error.

I think if you update your $PATH variable to include /usr/sbin it should work, but I haven’t tested that.

PATH="$PATH:/usr/sbin" ghost install
1 Like

Man, I’ve been having a very stressful day and just checked this. It worked. Thank you, I’m so much happier right now :smiley: