Ghost upgrade failing


#1

Hi,

I’m trying to upgrade Ghost to v2.x.x by using ghost update. First, it gave me an error that my cli wasn’t up to date, so I’ve run the nvm cli upgrade command which gives me as a result;

**gxxxx@ghost-rikroukens-com** : **/var/www/ghost** $ sudo npm install -g ghost-cli@latest

[sudo] password for ghostie: 

/usr/bin/ghost -> /usr/lib/node_modules/ghost-cli/bin/ghost

/usr/lib

└── ghost-cli@1.9.6

Trying to upgrade a second time using ghost update --force I am getting the following error;

**gxxx@ghost-rikroukens-com** : **/var/www/ghost** $ ghost update --force

You are running an outdated version of Ghost-CLI.

It is recommended that you upgrade before continuing.

Run `npm install -g ghost-cli@latest` to upgrade.

Running sudo command: systemctl is-active ghost_rikroukens-com

✔ Checking system Node.js version

✔ Ensuring user is not logged in as ghost user

✔ Checking if logged in user is directory owner

✔ Checking current folder permissions

✔ Checking folder permissions

✔ Checking file permissions

✔ Checking content folder ownership

✔ Checking memory availability

✔ Checking for available migrations

✔ Checking for latest Ghost version

✖ Downloading and updating Ghost to v2.2.4

A SystemError occurred.

Message: Ghost v2.2.4 is not compatible with this version of the CLI.

Debug Information:

OS: Ubuntu, v16.04

Node Version: v6.14.3

Ghost-CLI Version: 1.8.1

Environment: production

Command: 'ghost update --force'

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

Please refer to https://docs.ghost.org/v1/docs/troubleshooting#section-cli-errors for troubleshooting.

This makes me think that the cli upgrade doesn’t work. Next to that the download doesn’t seem to work.
Wondering if anybody has seen this before.

Thanks for the help.

Rik


#2

After some more digging around, it appears I’ve been able to solve my problem.

Here’s what I did, using this thread as the base;

First check where ghost is installed by running;
whereis ghost

gxxxx@xxxxxxxx:/var/www/ghost$ whereis ghost
ghost: /usr/bin/ghost /usr/local/bin/ghost

Then I checked the versions in both locations;

/usr/bin/ghost -v

gxxxx@xxxxxxxx:/var/www/ghost$ /usr/bin/ghost -v
Ghost-CLI version: 1.9.6
Ghost version: 1.25.3 (at /var/www/ghost)

/usr/local/bin/ghost -v

gxxxx@ghost-rikroukens-com:/var/www/ghost$ /usr/local/bin/ghost -v
Ghost-CLI version: 1.8.1
Ghost Version (at /var/www/ghost): 1.25.3

After that I had to run /usr/bin/ghost update --v1 which installed the latest version of Ghost v1 successfully

Then I ran /usr/bin/ghost update

gxxx@xxxxxxxx:/var/www/ghost$ /usr/bin/ghost update

  • sudo systemctl is-active ghost_rikroukens-com
    :heavy_check_mark: Checking system Node.js version
    :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
    :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 for available migrations
    :heavy_check_mark: Checking for latest Ghost version
    :heavy_check_mark: Downloading and updating Ghost to v2.3.0

Checking theme compatibility for Ghost 2.3.0

:heavy_check_mark: Your theme is compatible.

You can also check theme compatibility at https://gscan.ghost.org

? Are you sure you want to proceed with migrating to Ghost 2.3.0? Yes
:heavy_check_mark: Updating to a major version

  • sudo systemctl is-active xxxxxxxx
    ? Sudo Password [hidden]
  • sudo systemctl stop xxxxxxx
    :heavy_check_mark: Stopping Ghost
    :heavy_check_mark: Linking latest Ghost and recording versions
  • sudo systemctl is-active xxxxxxxxx
    ☱ Stopping Ghost✔ 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
  • sudo systemctl is-active xxxxxxxx
    :heavy_check_mark: Validating config
    :heavy_check_mark: Checking folder permissions
    :heavy_check_mark: Checking file permissions
    ☱ Restarting Ghost✔ Checking content folder ownership
  • sudo systemctl start xxxxxxxx
    :heavy_check_mark: Restarting Ghost
    :information_source: Removing old Ghost versions [skipped]

This appears to have been affective, I now have v2.3.0 installed on my server.

Finally, to avoid any further issues in the future I run;

mv /usr/local/bin/ghost /usr/local/bin/ghost2 && ln -s /usr/bin/ghost /usr/local/bin/ghost

So I won’t have this issue in the future.

Hope this helps others.


#3

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.