I have been following this tutorial to install WP CLI and now I get a “Problem loading website” error whenever I try to access any website on my droplet, using a browser. I can still SSH or SFTP on the server without issues.
I suspect the error was caused by apt-get update from which I got the error:
E: Some index files failed to download. They have been ignored, or old ones used instead.
E: dpkg was interrupted, you must manually run 'sudo dpkg --configure -a' to correct the problem.
I tried to run sudo dpkg --configure -a but nothing happened (looks like it froze) and I then ^C it:
sudo dpkg --configure -a
Setting up openssh-server (1:6.6p1-2ubuntu2) ...
^Cdpkg: error processing package openssh-server (--configure):
subprocess installed post-installation script was interrupted
Errors were encountered while processing:
openssh-server
I did managed to finish the installation of WP CLI without any issue and it works.
Any tips on how to get access the websites again? Thanks!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
I managed to fix the issue. Aparently, apache2 was down and couldn’t be started. I deleted the file called apache2 and created a directory with the same name. Restarted and the issue was fixed.
Thanks for your reply.
Here’s my dpkg.log:
I can still access the server via SSH, and yes, I did a manual CTRL+C to cancel the operation because it got stuck on the following message for more than 5 minutes:
I did not find the /var/log/apache2/error.log file. If it might help, my /etc/apache2/apache2.conf contains this line:
My result after a ls -l in the /var/log directory returned:
Cheers
Not really an answer, but the first step I would go to would be /var/log/dpkg.log which should have the details on why the configuration failed on openssh-server . The “^C” seems to suggest that you had manually canceled the operation by hitting ctrl+c? I should mention that DigitalOcean does offer console access, so if SSH is hosed for some reason, there is the console that can be used as a last ditch effort to access your server.
I should also mention, if you are not aware of it already, that openssh-server is separate from Apache itself, which I am assuming is what you are using to host your wordpress website . Usually Apache logs information the /var/log/apache2/error.log on an Ubuntu server, which is what seems to be what you are using. If you are using nginx or something else however, the log would still probably be under /var/log, but a different name. /var/log/nginx probably or something similar.