Why am I getting an error while installing?

Hello everyone, I’m using ghost on my 3 sites, I haven’t had any problems with the installation in any of them, but I made a new installation, I installed via vds, I get this error, I don’t understand why it gives such an error. As I said, I have installed 3 sites on my site, I have never encountered such a problem, I wonder why it does this.

Have you tried running ghost doctor or journalctl?

yes i tried but no results.

but tell me i saw something i added the screenshot below

sudo npm install ghost-cli@latest -g

When installing this process, does it do the event in the screenshot below?

Please avoid screenshots, and paste as pre-formatted text using the gear icon in the forum editor toolbar. I can’t see the images clearly on mobile devices.

We need the diagnostic information provided by running those commands. They aren’t going to fix your problem; they’re going to tell you (or us) how to fix your problem. Be sure to paste them in with the code </> tag, not as screenshots. :)

I’m sorry, okay, I’ll do that next time.

Installation is done without SSL certificate. But when it is installed with an ssl certificate, the installation does not happen.

Site: http://deletetusu.com

Glad to hear you got it working without ssl. That’s something, at least.

If you decide you want to fix your ssl, please provide enough information that we can help. A good start if this is an nginx problem would be to share your nginx configuration files (found in /etc/nginx/sites-enabled) and to check that the certificates referenced in those configuration files are ACTUALLY where the configuration file says they are.

It gives this warning during installation, is this a problem?

added 484 packages, and audited 485 packages in 43s

44 packages are looking for funding
  run `npm fund` for details

16 vulnerabilities (12 moderate, 4 high)

To address issues that do not require attention, run:
  npm audit fix

To address all issues (including breaking changes), run:
  npm audit fix --force

Run `npm audit` for details.
npm notice
npm notice New major version of npm available! 8.19.4 -> 9.7.2
npm notice Changelog: https://github.com/npm/cli/releases/tag/v9.7.2
npm notice Run npm install -g npm@9.7.2 to update!
npm notice
root@sunucu:~#

kurulum bittikten sonra bu hatayı veriyor

Starting Ghost
One or more errors occurred.

1) CliError

Message: Failed to restart Nginx.

Debug Information:
    OS: Ubuntu, v20.04.6 LTS
    Node Version: v16.20.1
    Ghost Version: 5.53.1
    Ghost-CLI Version: 1.24.0
    Environment: production
    Command: 'ghost install'

Additional log info available in: /home/deletetusu/.ghost/logs/ghost-cli-debug-2023-06-27T21_52_58_784Z.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.
deletetusu@sunucu:/var/www/deletetusu$

The top messages are probably not a problem. The bottom messages are. Please inspect the log file referenced here:

Additional log info available in: /home/deletetusu/.ghost/logs/ghost-cli-debug-2023-06-27T21_52_58_784Z.log

What does that tell you?

I looked there, there are no files there

That’s surprising. You’re looking in .ghost, not ghost, right?

sorry i couldn’t see it because it is hidden error message in log file

Debug Information:
    OS: Ubuntu, v20.04.6 LTS
    Node Version: v16.20.1
    Ghost Version: 5.53.1
    Ghost-CLI Version: 1.24.0
    Environment: production
    Command: 'ghost setup ssl'
Message: Failed to restart Nginx.
Stack: Error: Failed to restart Nginx.
    at NginxExtension.restartNginx (/usr/lib/node_modules/ghost-cli/extensions/nginx/index.js:262:19)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)

Original Error Message:
Message: Command failed: /bin/sh -c sudo -S -p '#node-sudo-passwd#'  nginx -s reload
nginx: [emerg] cannot load certificate "/etc/letsencrypt/deletetusu.com/fullchain.cer": BIO_new_file() failed (SSL: error:02001002:system library:fopen:No such file or directory:fopen('/etc/letsencrypt/deletetusu.com/fullchain.cer','r') error:2006D080:BIO routines:BIO_new_file:no such file)


Stack: Error: Command failed: /bin/sh -c sudo -S -p '#node-sudo-passwd#'  nginx -s reload
nginx: [emerg] cannot load certificate "/etc/letsencrypt/deletetusu.com/fullchain.cer": BIO_new_file() failed (SSL: error:02001002:system library:fopen:No such file or directory:fopen('/etc/letsencrypt/deletetusu.com/fullchain.cer','r') error:2006D080:BIO routines:BIO_new_file:no such file)


    at makeError (/usr/lib/node_modules/ghost-cli/node_modules/execa/index.js:174:9)
    at /usr/lib/node_modules/ghost-cli/node_modules/execa/index.js:278:16
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async NginxExtension.restartNginx (/usr/lib/node_modules/ghost-cli/extensions/nginx/index.js:260:13)

Well, there’s your problem! Your configuration is looking for certificates at "/etc/letsencrypt/deletetusu.com/fullchain.cer . Could you please do ls /etc/letsencrypt and ls /etc/letsencrypt/deleteusu.com ? I’m guessing that your certificate is not where your configuration file says it should be. If that’s the case, you’ll need to edit /etc/nginx/sites-enabled/whatever-your-site-is-named-ssl.conf to match the actual location.

When I looked at the file I gave here, he did it like this, he created a folder like /etc/letsencrypt/deletetsu.com_ecc/, I changed its name, I did the editing from the place you said didn’t work, and it still didn’t work.

Can you please try restarting nginx?

I note that you have two spellings for deletetusu and deleteusu. Make sure these are correct throughout, and then test the Nginx configuration: sudo nginx -t.

misspelled it Cathy_Sarisky otherwise they are correct

So, what’s the output from sudo nginx -t?

When I do sudo nginx -t it says below

nginx: [emerg] cannot load certificate "/etc/letsencrypt/deletetusu.com/fullchain.cer": BIO_new_file() failed (SSL: error:02001002:system library:fopen:No such file or directory:fopen('/etc/letsencrypt/deletetusu.com/fullchain.cer','r') error:2006D080:BIO routines:BIO_new_file:no such file)
nginx: configuration file /etc/nginx/nginx.conf test failed

So, the certificate isn’t present in the folder specified in you Nginx config file.

Therefore, double-check paths and filename etc. Exactly what @Cathy_Sarisky suggested.

If the certificates do not exist, that’s another matter, but please check the basics first.

1 Like