0

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 python3

Source: https://medium.com/@aaditya.chhabra/not-able-to-launch-terminal-ubuntu-16-04-84de95ecdaa

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-all

Source: I deleted package 'python3' on Ubuntu and I have lost dashboard, terminal and Unity. Help me to restore my data please

I 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.service

I 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/freeflyer.dynu.net/cert.pem' 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
  • Since 16.04 ends in April I would start by upgrading to 18.04 or 20.04 and see if you still have same issue. – David Jan 15 at 8:30
  • Thanks David, I have resisted upgrading as I thought it might break things. I have never upgraded Ubuntu before, does the update tend to go well or does it usually break things ? – John Jan 15 at 18:33
  • Before you do anything, make sure that you have a "live USB" device loaded with the target OS version, and verify that you can indeed boot from it, and navigate around with the "Try Ubuntu without installing" feature. If that works, then you are "insured", that even if the upgrade doesn't go smooth, you can easily decide for a complete clean install. Saving everything important into backups is also essential. – Levente Jan 16 at 1:15
  • The live USB device may also come useful to access some features of a crippled OS instance through the "chroot" method: one mounts the crippled OS's disk in the live session, and uses the features of the intact live OS to carry out procedures on the disk of the crippled one. This site has some threads / examples about it. – Levente Jan 16 at 1:20
  • Thanks Levente, I will look into upgrading the OS, its useful to know about trying ubuntu without installing so I aim to do that. – John Jan 16 at 12:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.