I have ubuntu 17.10, and am trying to do the perfect setup. I got to the mysql_secure_installation and ran into problems. Now I get this: When I try to reinstall mariadb, I get the following
That server is in inconsistent state. Maybe boot it to single user mode, raise network and then apt-get --fix-broken install. I beleive you can test starting and stopping mysql while still in single user mode. Check that apt is fully happy with the situation before proceeding with other stuff.
Shut down the server (shutdown -h now). When computer boots, hold *both* Shift keys down. With luck this gives you GRUB menu where you can choose Rescue mode (I beleive it is called that in Ubuntu). https://wiki.ubuntu.com/RecoveryMode
If you are new, I would suggest that you start building your perfect server using Ubuntu 16.04 instead of 17.10 as the later has a very limited time support.