Several new errors when trying to install

Hi,
I’ve been trying to install ghost on the same stack I had some time ago for the same purpose. I’m using a VPS from Ionos, I have root access, I can select the O.S. that I want. I installed Ubuntu 22.04. There’s seemingly no reason for having issues with what I want to do.

I still face lots of problems. The first occurs when trying to install Nodejs. I get the following error :

Preparing to unpack …/nodejs_18.20.6-1nodesource1_amd64.deb …
Unpacking nodejs (18.20.6-1nodesource1) over (12.22.9~dfsg-1ubuntu3.6) …
dpkg: error processing archive /var/cache/apt/archives/nodejs_18.20.6-1nodesource1_amd64.deb (–unpack):
trying to overwrite ‘/usr/share/systemtap/tapset/node.stp’, which is also in package
libnode72:amd64 12.22.9~dfsg-1ubuntu3.6
Errors were encountered while processing:
/var/cache/apt/archives/nodejs_18.20.6-1nodesource1_amd64.deb
needrestart is being skipped since dpkg has failed
E: Sub-process /usr/bin/dpkg returned an error code (1)

Then, when trying to install ghost package, I get a message telling that npm is not installed so I install it. When it’s done, I try again to install Ghost but I get this error :

npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE package: ‘abbrev@3.0.0’,
npm WARN EBADENGINE required: { node: ‘^18.17.0 || >=20.5.0’ },
npm WARN EBADENGINE current: { node: ‘v12.22.9’, npm: ‘8.5.1’ }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE package: ‘fs-extra@11.1.1’,
npm WARN EBADENGINE required: { node: ‘>=14.14’ },
npm WARN EBADENGINE current: { node: ‘v12.22.9’, npm: ‘8.5.1’ }
npm WARN EBADENGINE }

It seems to be related to the previous error, as I understand. So the first time when I got this error, I tried a second time to install Nodejs but it still didn’t work and it had the curious effect of deleting npm. Or, at least, further use of npm after that returned an error indicating that npm wasn’t installed.

Finally, I tried to uninstall libnode with “sudo apt remove libnode72”. I was quite puzzled to see that doing so does in the same time launch an install of Nodejs and results with the same first error quoted before.

I’m quite lost, right now, with all that. I’ve never had such problems installing ghost. I’d really appreciate some help. Thank you really much if anyone can give me some advices.

You look to be installing node 18. That’s not going to work. The current Node recommendation is 20, with 22 being ‘supported’. HOWEVER, I know that support for 20 is going to be dropped later this summer, so if I were in your shoes, I’d just set up with 22 now. But definitely not 18. It isn’t supported, and it’s probably to blame for all those errors.

Indeed, the error message indicates that. But I simply typed the normal command for installing nodejs. This is what I typed :
sudo apt-get install nodejs -y

So you’ll want to follow the install directions. You’re off script. Do this, but with the version set to 22 (if you don’t want to upgrade in a month).

I’ve followed what is indicated on ghost’s official installation guide. That’s strange. The link you gave me shows what seems to be the exact thing I typed. I tried to update and upgrade apt-get. When I type apt-get ugrade, it again gives me the same error as when I ty to install Nodejs or to uninstall Libnode.

I’ll try to reset the server, start fresh and see what I get. Mybe there was something that I mistyped.

I think you did the third part, but not part 1 and/or part 2?

sudo apt-get update
sudo apt-get install -y ca-certificates curl gnupg
sudo mkdir -p /etc/apt/keyrings
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg

And then… (but I would personally change 20 to 22 here.)

NODE_MAJOR=20 # Use a supported version
echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | sudo tee /etc/apt/sources.list.d/nodesource.list

The commands above add a new repository to your apt, so that you can install the correct version of Node.

1 Like

Ah ! Ghost’s official installation guide says to select version 18. I’m just an amateur sysadmin so there are times when I do things without knowing much. Now that I take a second look at it, I can confirm that I had installed the wrong version. Ghost installation page says to type :

NODE_MAJOR=18 # Use a supported version
echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | sudo tee /etc/apt/sources.list.d/nodesource.list

I’ll keep going and I will tell you if I succeed. Thank you really much !

1 Like

Ahha. Thanks for that. I’ll flag it for the folks at Ghost who can fix it.

Come on back if/when you get stuck. :)

I completed the installation without any apparent error ! Thanks for that.

While I’m here, I have a last question. I’ve not fiddled with domain names for a long time. I’ve quite forgotten how to point my domain to the VPS. The friend I am helping got himself a web hosting plan and a domain on O2switch and I wasn’t satified with the web hosting part. We switched for a Ionos (1&1) VPS so the VPS and domain name are subscribed on different providers. I can’t remember how I used to do to link both, in this type of case. Do you happen to know how it should be done ? Thank you

Sure, I got you. You need to update the DNS. There are a couple bits to this:

1 - Who controls your nameservers? (Might be your domain registrar, might not be.)

2 - Update the A and CNAME records to point to your Ghost vps. (Do this with whoever controls your registrar.)

3 - Update Ghost to use its new name. See the ghost-cli documentation for how to have it configure nginx, ssl, etc.

Thanks you really much !

1 Like

Hey,
Is there a port that I have to open on my VPS firewall ? I can’t make it work. Or maybe it’s just taking a really long time…

Also, having multiple domain extensions and the main one being currently in transfer, I chose to use a secondary one to publish the site for the time being. I edited the url with ghost config url, then I set up nginx with ghost setup nginx, then I used ghost setup ssl and it returned an error. As follows :

Command failed: /bin/sh -c sudo -S -p ‘#node-sudo-passwd#’ /etc/letsencrypt/acme.sh --issue --home /etc/letsencrypt --server letsencrypt --domain MYDOMAIN.eu --webroot /var/www/MYDOMAIN.eu/system/nginx-root --reloadcmd “nginx -s reload” --accountemail myemail@protonmail.com --keylength 2048
[Sun Jul 6 19:58:35 UTC 2025] MYDOMAIN.eu: Invalid status. Verification error details: 2001:8d8:100f:f000::200: Invalid response from http://MYDOMAIN.eu/.well-known/acme-challenge/cL4BFegxHoFeiYOvdfYE5T6QymP2ogFE5Muajm_N7eE: 204
[Sun Jul 6 19:58:35 UTC 2025] Please add ‘–debug’ or ‘–log’ to see more information.
[Sun Jul 6 19:58:35 UTC 2025] See: How to debug acme.sh · acmesh-official/acme.sh Wiki · GitHub
[Sun Jul 6 19:58:30 UTC 2025] Using CA: https://acme-v02.api.letsencrypt.org/directory
[Sun Jul 6 19:58:30 UTC 2025] Creating domain key
[Sun Jul 6 19:58:30 UTC 2025] The domain key is here: /etc/letsencrypt/MYDOMAIN.eu/MYDOMAIN.eu.key
[Sun Jul 6 19:58:30 UTC 2025] Single domain=‘MYDOMAIN.eu’
[Sun Jul 6 19:58:32 UTC 2025] Getting webroot for domain=‘MYDOMAIN.eu’
[Sun Jul 6 19:58:32 UTC 2025] Verifying: MYDOMAIN.eu
[Sun Jul 6 19:58:33 UTC 2025] Pending. The CA is processing your order, please
wait. (1/30)

Do you have any idea about what it could be ?
Thanks