sudo apt-get install mysql-server
fail
it blocks at this point
var/lib/dpkg/info/mysql-server-5.7.postinst: line 143: /usr/share/mysql-common/configure-symlinks: No such file or directory
which I found the solution to this bug is comment the line 143 in the /var/lib/dpkg/info/mysql-server-5.7.postinst file.
but my problem is I cannot find the /var/lib/dpkg/info/mysql-server-5.7.postinst file .. not to say comment one line in it .
so how to do to get rid of stuck situation
ps: I have installed mariadb and uninstall it by the steps I googled
update:
I have followed the steps given by the first answer, and it still prompted that error before
surprisingly, this time I can sudo vim /var/lib/dpkg/info/mysql-server-5.7.postinst file
and I comment the line 143 , however.. it report another error
ERROR: Unable to start MySQL server:
2017-11-26T08:51:57.033255Z 0 [Note] mysqld (mysqld 5.7.20-0ubuntu0.16.04.1-log) starting as process 22612 ...
2017-11-26T08:51:57.034651Z 0 [ERROR] You have enabled the binary log, but you haven't provided the mandatory server-id. Please refer to the proper server start-up parameters documentation
2017-11-26T08:51:57.035603Z 0 [ERROR] Aborting