Accidentally broke Ubuntu 16.04 by removing python 3 :( Apache2 and LetsEncrypt broken - how can I fix?
I was trying to install Octoprint on Ubuntu 16.04 for my 3D printer, but I was having problems with the installation as it needed Python 3.6 and I only had Python 3.5
I searched how to install Python 3.6 on Ubuntu 16.04 and after various methods I managed to do install it and also managed to install Octoprint, although Octoprint would not run due to some errors.
Then I found that terminal in Ubuntu desktop would not work and after searching I found a website explaining how to fix it, using the following commands...
cd /usr/bin
sudo apt-get purge python3
sudo rm python3
sudo ln -s python3.5 python3Source:
The worry started when I could see it deleting lots of things which took around 5 minutes and when I opened Ubuntu desktop half of the icons were missing.
I managed to sort of fix it by running:
sudo apt-get install python3-allI am now considering a fresh install this time using Ubuntu 20.04, as well as fitting larger HDD's in my server (Dell Poweredge T30) using RAID5.
However, I run Nextcloud on the server and dont want to loose the data stored in Nextcloud, but I cant access Nextcloud because Apache2 doesnt work anymore. Somehow the live folder of LetsEncrypt seems to have been deleted since removing Python3.
If I run...
systemctl status apache2.serviceI get the following error...
apache2.service - LSB: Apache2 web server Loaded: loaded (/etc/init.d/apache2; bad; vendor preset: enabled) Drop-In: /lib/systemd/system/apache2.service.d └─apache2-systemd.conf Active: failed (Result: exit-code) since Thu 2021-01-14 20:25:00 GMT; 11s ago Docs: man:systemd-sysv-generator(8) Process: 1140 ExecStart=/etc/init.d/apache2 start (code=exited, status=1/FAILURE)
Jan 14 20:25:00 HomeServer apache2[1140]: Output of config test was:
Jan 14 20:25:00 HomeServer apache2[1140]: [Thu Jan 14 20:25:00.379373 2021] [so:warn] [pid 1151] AH01574: module dav_module is already loaded, skipping
Jan 14 20:25:00 HomeServer apache2[1140]: AH00526: Syntax error on line 41 of /etc/apache2/sites-enabled/freeflyer.conf:
Jan 14 20:25:00 HomeServer apache2[1140]: SSLCertificateFile: file '/etc/letsencrypt/live/ does not exist or is empty
Jan 14 20:25:00 HomeServer apache2[1140]: Action 'configtest' failed.
Jan 14 20:25:00 HomeServer apache2[1140]: The Apache error log may have more information.
Jan 14 20:25:00 HomeServer systemd[1]: apache2.service: Control process exited, code=exited status=1
Jan 14 20:25:00 HomeServer systemd[1]: Failed to start LSB: Apache2 web server.
Jan 14 20:25:00 HomeServer systemd[1]: apache2.service: Unit entered failed state.
Jan 14 20:25:00 HomeServer systemd[1]: apache2.service: Failed with result 'exit-code'.I used the Ubuntu desktop backup tool (weekly), but it always gave warnings about not being able to backup a long list of files, presumably due to access rights and files being in use etc
When I try to restore the backup of /etc/letsencrypt there is still no live folder, the only folders are:
- csr
- renewal
- renewl-hooks
How can I get Apache2 working so I can get Nextcloud back online ?
The backup tool is configured to backup the entire root folder, I did try to restore the root folder from a previous backup but it crashed and I had to power cycle the server.
In future I need to fix this backup issue because it has let me down in this instance.
7 Reset to defaultKnow someone who can answer? Share a link to this question via email, Twitter, or Facebook.
More in general
"Zoraya ter Beek, age 29, just died by assisted suicide in the Netherlands. She was physically healthy, but psychologically depressed. It's an abomination that an entire society would actively facilitate, even encourage, someone ending their own life because they had no hope. Th…"