Попытка установить MySQL на Ubuntu 17.10 после удаления предыдущей установки MariaDB.
Чтобы все очистить, я запустил следующее:
sudo apt-get remove --purge *mysql*
sudo rm -rf /etc/mysql /var/lib/mysql
sudo apt-get remove --purge *mariadb*
sudo apt-get autoremove
sudo apt-get autoclean
Проверено, что MySQL и MariaDB были удалены:
dpkg -l | grep mariadb
dpkg -l | grep mysql
Теперь, когда я пытаюсь переустановить MySQL
sudo apt update
sudo apt install mysql-server
Выход:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
libaio1 libevent-core-2.1-6 mysql-client-5.7 mysql-client-core-5.7
mysql-common mysql-server-5.7 mysql-server-core-5.7
Suggested packages:
tinyca
The following NEW packages will be installed:
libaio1 libevent-core-2.1-6 mysql-client-5.7 mysql-client-core-5.7
mysql-common mysql-server mysql-server-5.7 mysql-server-core-5.7
0 upgraded, 8 newly installed, 0 to remove and 3 not upgraded.
Need to get 0 B/20.4 MB of archives.
After this operation, 160 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Preconfiguring packages ...
Selecting previously unselected package mysql-common.
(Reading database ... 281851 files and directories currently installed.)
Preparing to unpack .../0-mysql-common_1%3a10.3.8+maria~artful_all.deb ...
Unpacking mysql-common (1:10.3.8+maria~artful) ...
Selecting previously unselected package libaio1:amd64.
Preparing to unpack .../1-libaio1_0.3.110-4_amd64.deb ...
Unpacking libaio1:amd64 (0.3.110-4) ...
Selecting previously unselected package mysql-client-core-5.7.
Preparing to unpack .../2-mysql-client- core-5.7_5.7.22-0ubuntu0.17.10.1_amd64.deb ...
Unpacking mysql-client-core-5.7 (5.7.22-0ubuntu0.17.10.1) ...
Selecting previously unselected package mysql-client-5.7.
Preparing to unpack .../3-mysql-client- 5.7_5.7.22-0ubuntu0.17.10.1_amd64.deb ...
Unpacking mysql-client-5.7 (5.7.22-0ubuntu0.17.10.1) ...
Selecting previously unselected package mysql-server-core-5.7.
Preparing to unpack .../4-mysql-server- core-5.7_5.7.22-0ubuntu0.17.10.1_amd64.deb ...
Unpacking mysql-server-core-5.7 (5.7.22-0ubuntu0.17.10.1) ...
Selecting previously unselected package libevent-core-2.1-6:amd64.
Preparing to unpack .../5-libevent-core-2.1-6_2.1.8-stable-4_amd64.deb ...
Unpacking libevent-core-2.1-6:amd64 (2.1.8-stable-4) ...
Setting up mysql-common (1:10.3.8+maria~artful) ...
Selecting previously unselected package mysql-server-5.7.
(Reading database ... 282013 files and directories currently installed.)
Preparing to unpack .../mysql-server-5.7_5.7.22-0ubuntu0.17.10.1_amd64.deb ...
Unpacking mysql-server-5.7 (5.7.22-0ubuntu0.17.10.1) ...
Selecting previously unselected package mysql-server.
Preparing to unpack .../mysql-server_5.7.22-0ubuntu0.17.10.1_all.deb ...
Unpacking mysql-server (5.7.22-0ubuntu0.17.10.1) ...
Setting up libevent-core-2.1-6:amd64 (2.1.8-stable-4) ...
Processing triggers for ureadahead (0.100.0-20) ...
Processing triggers for libc-bin (2.26-0ubuntu2.1) ...
Setting up libaio1:amd64 (0.3.110-4) ...
Processing triggers for systemd (234-2ubuntu12.4) ...
Processing triggers for man-db (2.7.6.1-2) ...
Setting up mysql-client-core-5.7 (5.7.22-0ubuntu0.17.10.1) ...
Setting up mysql-server-core-5.7 (5.7.22-0ubuntu0.17.10.1) ...
Setting up mysql-client-5.7 (5.7.22-0ubuntu0.17.10.1) ...
Setting up mysql-server-5.7 (5.7.22-0ubuntu0.17.10.1) ...
/var/lib/dpkg/info/mysql-server-5.7.postinst: line 143: /usr/share/mysql- common/configure-symlinks: No such file or directory
dpkg: error processing package mysql-server-5.7 (--configure):
subprocess installed post-installation script returned error exit status 127
dpkg: dependency problems prevent configuration of mysql-server:
mysql-server depends on mysql-server-5.7; however:
Package mysql-server-5.7 is not configured yet.
dpkg: error processing package mysql-server (--configure):
dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
Processing triggers for libc-bin (2.26-0ubuntu2.1) ...
Errors were encountered while processing:
mysql-server-5.7
mysql-server
E: Sub-process /usr/bin/dpkg returned an error code (1)
Я пытался закомментировать строку 143 в /var/lib/dpkg/info/mysql-server-5.7.postinst, но это не помогло.
Любая помощь будет принята с благодарностью. Подумайте об использовании образа докера в качестве обходного пути.