Ubuntu Linux Error Message : dpkg: error processing package mysql-server-5.7 (–configure)

Posted on

This error specified in the title of this article popped out in the middle of the execution of apt command. It is an error which has been bothering for quite sometime. It is because the upgrade process of MySQL Database Server in the Ubuntu Linux Operating System, every operation involving apt tool for package management system include installing, updating and removing packages will generate an error message specified in the title of the article at the end. So, below are steps taken which is basically trial and error in sequential order to be able to completely remove the nuisance of error message generated in the title of this article as follows :

dpkg: error processing package mysql-server-5.7 (--configure)

Below are several of those steps taken :

1. Using dpkg –configure -a.

The first step taken is using ‘dpkg –configure -a’ which is executed since mysql-server-5.7 is considered installed but it hasn’t been configured yet. Below is the output of the command generated :

root@hostname:/home/user# dpkg --configure -a
....
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
...
Errors were encountered while processing:
 mysql-server-5.7
 mysql-server
You have new mail in /var/mail/root
root@hostname:/home/user#

2. But apparently, executing the above ‘dpkg –configure a’ doesn’t really help at all. So, after searching further, below is another step taken to solve the problem which is trying to add configuration for generating log in MySQL Database Server configuration :

general_log_file = /var/log/mysql/mysql.log
general_log = 1

It is done by executing the following MySQL Database Server :

user@hostname:~$ vim /etc/mysql/my.cnf
user@hostname:~$ sudo su -
[sudo] password for user:
user@hostname:~# vim /etc/mysql/my.cnf

After trying to reconfigure mysql-server-5.7 which is actually failing, the reconfigure process is continued with the following steps :

3. The following is how to restart the MySQL Database Server process after executing the above process for editing MySQL Database Server’s configuration :

user@hostname:~# /etc/init.d/mysql reload
* Reloading MySQL database server mysqld mysqladmin: connect to server at 'localhost' failed
error: 'Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)'
Check that mysqld is running and that the socket: '/var/run/mysqld/mysqld.sock' exists!
root@hostname:~# systemctl restart mysql
Job for mysql.service failed because the control process exited with error code. See "systemctl status mysql.service" and "journalctl -xe" for details.
root@hostname:~#

3. Checking the status of MySQL Database Server with just a failure :

root@hostname:~# systemctl status mysql
● mysql.service - MySQL Community Server
Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled)
Active: activating (start-post) (Result: exit-code) since Mon 2017-11-06 10:37:16 WIB; 4s ago
Process: 15100 ExecStart=/usr/sbin/mysqld (code=exited, status=1/FAILURE)
Process: 15084 ExecStartPre=/usr/share/mysql/mysql-systemd-start pre (code=exited, status=0/SUCCESS)
Main PID: 15100 (code=exited, status=1/FAILURE); : 15101 (mysql-systemd-s)
Tasks: 2
Memory: 332.0K
CPU: 27ms
CGroup: /system.slice/mysql.service
└─control
├─15101 /bin/bash /usr/share/mysql/mysql-systemd-start post
└─15211 sleep 1

Nov 06 10:37:16 hostname systemd[1]: Starting MySQL Community Server...
Nov 06 10:37:16 hostname mysql-systemd-start[15084]: my_print_defaults: [ERROR] Found option without preceding
Nov 06 10:37:16 hostname mysql-systemd-start[15084]: my_print_defaults: [ERROR] Fatal error in defaults handlin
Nov 06 10:37:16 hostname mysqld[15100]: mysqld: [ERROR] Found option without preceding group in config file /et
Nov 06 10:37:16 hostname mysqld[15100]: mysqld: [ERROR] Fatal error in defaults handling. Program aborted!
Nov 06 10:37:16 hostname systemd[1]: mysql.service: Main process exited, code=exited, status=1/FAILURE
lines 1-20/20 (END)

root@hostname:~#

4. Although the process above is going to be reversed by editing the following two lines before added to the MySQL Database Server as shown below :

root@hostname:~# vim /etc/mysql/my.cnf
root@hostname:~# systemctl restart mysql
root@hostname:~# vim /etc/mysql/my.cnf
You have new mail in /var/mail/root
root@hostname:~# systemctl restart mysql
root@hostname:~# mysql -uroot -p
Enter password:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
root@hostname:~# systemctl status mysql
● mysql.service - MySQL Community Server
Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled)
Active: active (running) since Mon 2017-11-06 12:42:39 WIB; 15s ago
Process: 32501 ExecStartPost=/usr/share/mysql/mysql-systemd-start post (code=exited, status=0/SUCCESS)
Process: 32491 ExecStartPre=/usr/share/mysql/mysql-systemd-start pre (code=exited, status=0/SUCCESS)
Main PID: 32500 (mysqld)
Tasks: 13
Memory: 103.2M
CPU: 270ms
CGroup: /system.slice/mysql.service
└─32500 /usr/sbin/mysqld

Nov 06 12:42:09 hostname systemd[1]: Starting MySQL Community Server...
Nov 06 12:42:39 hostname systemd[1]: Started MySQL Community Server.
root@hostname:~# 

5. For further reference, the following is the information about the version of MySQL Database Server which is going to be configured further in Ubuntu Linux :

root@hostname:~# mysql –version
mysql Ver 14.14 Distrib 5.7.19, for Linux (x86_64) using EditLine wrapper

6. After reloading the process of MySQL Database Server, unfortunately it caused the service cannot be used as shown below. So, the following is the process to install a new MySQL Database Server :

root@hostname:~# apt-get install mysql-server
Reading package lists... Done
Building dependency tree
Reading state information... Done
mysql-server is already the newest version (5.7.20-0ubuntu0.16.04.1).
0 upgraded, 0 newly installed, 0 to remove and 149 not upgraded.
2 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] Y
debconf: DbDriver "config": /var/cache/debconf/config.dat is locked by another process: Resource temporarily unavailable
Setting up mysql-server-5.7 (5.7.19-0ubuntu0.16.04.1) ...
debconf: DbDriver "config": /var/cache/debconf/config.dat is locked by another process: Resource temporarily unavailable
dpkg: error processing package mysql-server-5.7 (--configure):
subprocess installed post-installation script returned error exit status 1
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.
Errors were encountered while processing:
mysql-server-5.7
mysql-server
E: Sub-process /usr/bin/dpkg returned an error code (1)

7. After failing on to install MySQL Database Server, below is another attempt to configure MySQL Database Server :

root@hostname:~# dpkg --configure -a
Setting up mysql-server-5.7 (5.7.19-0ubuntu0.16.04.1) ...
Renaming removed key_buffer and myisam-recover options (if present)
^Cdpkg: error processing package mysql-server-5.7 (--configure):
subprocess installed post-installation script was interrupted
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
Errors were encountered while processing:
mysql-server-5.7
mysql-server
You have new mail in /var/mail/root
root@hostname:~#

8. So, in order to solve the above problem the following command is carried out to be executed in order :

sudo apt remove --purge mysql-server-5.5
sudo apt remove --purge mysql-server-5.6
sudo apt remove --purge mysql-server-5.7
sudo apt-get autoremove
sudo apt-get autoclean
sudo apt update
sudo apt upgrade
sudo apt install mysql-server mysql-client

9. The first one is about removing the program called mysql-server-5.5 :

root@hostname:~# apt remove --purge mysql-server-5.5
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
mysql-server-5.5*
0 upgraded, 0 newly installed, 1 to remove and 46 not upgraded.
2 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] Y
(Reading database ... 921862 files and directories currently installed.)
Removing mysql-server-5.5 (5.5.46-0ubuntu0.14.04.2) ...
Purging configuration files for mysql-server-5.5 (5.5.46-0ubuntu0.14.04.2) ...
Setting up mysql-server-5.7 (5.7.19-0ubuntu0.16.04.1) ...
Renaming removed key_buffer and myisam-recover options (if present)
dpkg: error processing package mysql-server-5.7 (--configure):
subprocess installed post-installation script returned error exit status 1
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 report written because the error message indicates its a followup error from a previous failure.
E: Sub-process /usr/bin/dpkg returned an error code (1)
You have new mail in /var/mail/root
root@hostname:~# 

10. After failing on removing the program called mysq-server-5.7, the next one is to remove the program called mysql-server-5.6 as shown below :

root@hostname:~# apt remove --purge mysql-server-5.6
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package 'mysql-server-5.6' is not installed, so not removed
0 upgraded, 0 newly installed, 0 to remove and 46 not upgraded.
2 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up mysql-server-5.7 (5.7.19-0ubuntu0.16.04.1) ...
Renaming removed key_buffer and myisam-recover options (if present)

 

z
[1]+ Stopped apt remove --purge mysql-server-5.6
root@hostname:~#

11. The above process is about removing the program called ‘mysql-server-5.6’ but apparently it is failing. The process is continued by removing mysql-server-5.7 as shown below :

root@hostname:~# apt remove --purge mysql-server-5.7
E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable)
E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?
root@hostname:~#

The process failed since it has already been another attempt on removing ‘mysql-server-5.6’ before in the 9th step. So, apt tool stuck because of the previous failure on removing it. Below is how to solve it :

root@hostname:~# rm -rv /var/cache/apt/archives/lock
removed '/var/cache/apt/archives/lock'
root@hostname:~# rm -rv /var/lib/dpkg/lock
removed '/var/lib/dpkg/lock'
root@hostname:~#

Try to re-execute on removing mysql-server-5.6 :

root@hostname:~# apt remove --purge mysql-server-5.6
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package 'mysql-server-5.6' is not installed, so not removed
0 upgraded, 0 newly installed, 0 to remove and 46 not upgraded.
2 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up mysql-server-5.7 (5.7.19-0ubuntu0.16.04.1) ...
Renaming removed key_buffer and myisam-recover options (if present)

[2]+ Stopped apt remove --purge mysql-server-5.6
root@hostname:~# rm -rv /var/cache/apt/archives/lock
removed '/var/cache/apt/archives/lock'
root@hostname:~# rm -rv /var/lib/dpkg/lock
removed '/var/lib/dpkg/lock'
root@hostname:~#

12. If there is no MySQL Server 5.6 installed and the process eventually still stuck as shown in the previous output, just terminate the process and carry on to the next process which is the process executed to continue removing another program called ‘mysql-server-5.7’ as shown below :

root@hostname:~# apt remove --purge mysql-server-5.7
E: dpkg was interrupted, you must manually run 'dpkg --configure -a' to correct the problem.
root@hostname:~# dpkg --configure -a
Setting up mysql-server-5.7 (5.7.19-0ubuntu0.16.04.1) ...
debconf: DbDriver "config": /var/cache/debconf/config.dat is locked by another process: Resource temporarily unavailable
dpkg: error processing package mysql-server-5.7 (--configure):
subprocess installed post-installation script returned error exit status 1
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
Errors were encountered while processing:
mysql-server-5.7
mysql-server

The above process is re-executed once as shown in the following executed command after executing ‘dpkg –configure -a’ first as shown below :

root@hostname:~# apt remove --purge mysql-server-5.7
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
mysql-server* mysql-server-5.7*
0 upgraded, 0 newly installed, 2 to remove and 46 not upgraded.
2 not fully installed or removed.
After this operation, 48,5 MB disk space will be freed.
Do you want to continue? [Y/n] Y
debconf: DbDriver "config": /var/cache/debconf/config.dat is locked by another process: Resource temporarily unavailable
(Reading database ... 921858 files and directories currently installed.)
Removing mysql-server (5.7.20-0ubuntu0.16.04.1) ...
Removing mysql-server-5.7 (5.7.19-0ubuntu0.16.04.1) ...
debconf: DbDriver "config": /var/cache/debconf/config.dat is locked by another process: Resource temporarily unavailable
dpkg: error processing package mysql-server-5.7 (--purge):
subprocess installed pre-removal script returned error exit status 1
debconf: DbDriver "config": /var/cache/debconf/config.dat is locked by another process: Resource temporarily unavailable
dpkg: error while cleaning up:
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
mysql-server-5.7
E: Sub-process /usr/bin/dpkg returned an error code (1)
root@hostname:~#

The following is an attempt for stopping MySQL Database Server after failing on removing MySQL Database Server 5.7 :

root@hostname:~# systemctl stop mysqld
Failed to stop mysqld.service: Unit mysqld.service not loaded.
root@hostname:~# systemctl stop mysql
root@hostname:~# apt remove --purge mysql-server-5.7
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
mysql-server-5.7*
0 upgraded, 0 newly installed, 1 to remove and 46 not upgraded.
1 not fully installed or removed.
After this operation, 48,4 MB disk space will be freed.
Do you want to continue? [Y/n] Y
debconf: DbDriver "config": /var/cache/debconf/config.dat is locked by another process: Resource temporarily unavailable
(Reading database ... 921854 files and directories currently installed.)
Removing mysql-server-5.7 (5.7.19-0ubuntu0.16.04.1) ...
debconf: DbDriver "config": /var/cache/debconf/config.dat is locked by another process: Resource temporarily unavailable
dpkg: error processing package mysql-server-5.7 (--purge):
subprocess installed pre-removal script returned error exit status 1
debconf: DbDriver "config": /var/cache/debconf/config.dat is locked by another process: Resource temporarily unavailable
dpkg: error while cleaning up:
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
mysql-server-5.7
E: Sub-process /usr/bin/dpkg returned an error code (1)
root@hostname:~#

Since the above execution also ends in failure, the following is the other command which is considered as another process done to be able to remove completely mysql-server-5.7 :

root@hostname:~# fuser -v /var/cache/debconf/config.dat

Re-execute again on the process for removing mysql-server-5.7. Below is the command carried out to able to perform it with the output of it :

root@hostname:~# apt remove --purge mysql-server-5.7
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
mysql-server* mysql-server-5.7*
0 upgraded, 0 newly installed, 2 to remove and 46 not upgraded.
2 not fully installed or removed.
After this operation, 48,5 MB disk space will be freed.
Do you want to continue? [Y/n] Y
(Reading database ... 921854 files and directories currently installed.)
Removing mysql-server (5.7.20-0ubuntu0.16.04.1) ...
Removing mysql-server-5.7 (5.7.19-0ubuntu0.16.04.1) ...
update-alternatives: using /etc/mysql/my.cnf.fallback to provide /etc/mysql/my.cnf (my.cnf) in auto mode
Purging configuration files for mysql-server-5.7 (5.7.19-0ubuntu0.16.04.1) ...
Processing triggers for man-db (2.7.5-1) ...
root@hostname:~#

13. Trying to remove again mysql-server-5.6 as shown below :

root@hostname:~# apt remove --purge mysql-server-5.6
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package 'mysql-server-5.6' is not installed, so not removed
0 upgraded, 0 newly installed, 0 to remove and 46 not upgraded.
root@hostname:~#

14. The next step is a step which is taken to execute the command ‘apt-get autoremove’ which is shown as follows :

root@hostname:~# apt-get autoremove
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 46 not upgraded.
root@hostname:~#

15. Another step taken is to execute ‘apt-get autoclean’ which is shown as follows :

root@hostname:~# apt-get autoclean
Reading package lists... Done
Building dependency tree
Reading state information... Done
Del libcurl3-gnutls 7.47.0-1ubuntu2.3 [185 kB]
Del xserver-xorg-core 2:1.18.4-0ubuntu0.7 [1.344 kB]
Del cacti-spine 0.8.8b-1ubuntu1.1 [45,4 kB]
Del libpoppler58 0.41.0-0ubuntu1.4 [756 kB]
Del git 1:2.7.4-0ubuntu1.3 [3.102 kB]
Del mysql-server 5.7.20-0ubuntu0.16.04.1 [10,2 kB]
Del libopenipmi0 2.0.18-0ubuntu11.1 [438 kB]
Del libpoppler-glib8 0.41.0-0ubuntu1.4 [104 kB]
Del xserver-xephyr 2:1.18.4-0ubuntu0.7 [924 kB]
Del libxenstore3.0 4.6.5-0ubuntu1.4 [21,9 kB]
Del adobe-flashplugin 1:20171010.1-0ubuntu0.16.04.1 [9.750 kB]
Del adobe-flash-properties-gtk 1:20171010.1-0ubuntu0.16.04.1 [142 kB]
Del xserver-xorg-legacy 2:1.18.4-0ubuntu0.7 [35,9 kB]
Del libxen-4.6 4.6.5-0ubuntu1.4 [345 kB]
Del cacti 0.8.8f+ds1-4ubuntu4.16.04.2 [1.693 kB]
Del libpoppler-qt4-4 0.41.0-0ubuntu1.4 [116 kB]
Del xserver-common 2:1.18.4-0ubuntu0.7 [27,7 kB]
Del chromium-codecs-ffmpeg-extra 61.0.3163.100-0ubuntu0.16.04.1306 [1.043 kB]
Del libpoppler-qt5-1 0.41.0-0ubuntu1.4 [118 kB]
Del dkms 2.2.0.3-2ubuntu11.5 [66,3 kB]
Del git-man 1:2.7.4-0ubuntu1.3 [736 kB]
Del libcurl4-openssl-dev 7.47.0-1ubuntu2.3 [263 kB]
Del gitk 1:2.7.4-0ubuntu1.3 [132 kB]
Del libxfont1 1:1.5.1-1ubuntu0.16.04.3 [95,1 kB]
Del libwayland-client0 1.12.0-1~ubuntu16.04.2 [22,4 kB]
Del git-core 1:2.7.4-0ubuntu1.3 [1.460 B]
Del x11proto-core-dev 7.0.31-1~ubuntu16.04.2 [254 kB]
Del google-chrome-stable 62.0.3202.62-1 [48,5 MB]
Del libcurl3 7.47.0-1ubuntu2.3 [186 kB]
Del chromium-browser-l10n 61.0.3163.100-0ubuntu0.16.04.1306 [2.813 kB]
Del chromium-browser 61.0.3163.100-0ubuntu0.16.04.1306 [59,4 MB]
Del curl 7.47.0-1ubuntu2.3 [138 kB]
Del libmirprotobuf3 0.26.3+16.04.20170605-0ubuntu1.1 [120 kB]
Del wpasupplicant 2.4-0ubuntu6.2 [902 kB]
Del libwayland-server0 1.12.0-1~ubuntu16.04.2 [28,0 kB]
Del poppler-utils 0.41.0-0ubuntu1.4 [131 kB]
Del libwayland-cursor0 1.12.0-1~ubuntu16.04.2 [10,1 kB]
root@hostname:~# 

16. The final step is the installation process of a new MySQL Database Server. The following is an activity by executing the following command. The following command executed with output shown as follows ‘ apt-get install mysql-client mysql-server libmysqlclient-dev’ :

user@hostname:~$ sudo su -
[sudo] password for user:
root@hostname:~# apt-get install mysql-client mysql-server libmysqlclient-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
libmecab2 libmysqlclient20 mysql-common mysql-community-client mysql-community-server
The following packages will be REMOVED:
mysql-client-5.7 mysql-client-core-5.7 mysql-server-core-5.7
The following NEW packages will be installed:
libmecab2 mysql-community-client mysql-community-server mysql-server
The following packages will be upgraded:
libmysqlclient-dev libmysqlclient20 mysql-client mysql-common
4 upgraded, 4 newly installed, 3 to remove and 9 not upgraded.
38 not fully installed or removed.
Need to get 0 B/35,3 MB of archives.
After this operation, 128 MB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Preconfiguring packages ...
(Reading database ... 926513 files and directories currently installed.)
Preparing to unpack .../mysql-client_5.7.20-1ubuntu16.04_amd64.deb ...
Unpacking mysql-client (5.7.20-1ubuntu16.04) over (5.7.19-0ubuntu0.16.04.1) ...
dpkg: mysql-server-core-5.7: dependency problems, but removing anyway as you requested:
akonadi-backend-mysql depends on mysql-server-core-5.7 | virtual-mysql-server-core; however:
Package mysql-server-core-5.7 is to be removed.
Package virtual-mysql-server-core is not installed.
Package mysql-server-core-5.7 which provides virtual-mysql-server-core is to be removed.
akonadi-backend-mysql depends on mysql-server-core-5.7 | virtual-mysql-server-core; however:
Package mysql-server-core-5.7 is to be removed.
Package virtual-mysql-server-core is not installed.
Package mysql-server-core-5.7 which provides virtual-mysql-server-core is to be removed.

(Reading database ... 926513 files and directories currently installed.)
Removing mysql-server-core-5.7 (5.7.19-0ubuntu0.16.04.1) ...
dpkg: mysql-client-5.7: dependency problems, but removing anyway as you requested:
redmine-mysql depends on mysql-client | virtual-mysql-client; however:
Package mysql-client is not configured yet.
Package virtual-mysql-client is not installed.
Package mysql-client-5.7 which provides virtual-mysql-client is to be removed.
zabbix-server-mysql depends on mysql-client | virtual-mysql-client; however:
Package mysql-client is not configured yet.
Package virtual-mysql-client is not installed.
Package mysql-client-5.7 which provides virtual-mysql-client is to be removed.
dbconfig-mysql depends on mysql-client | mariadb-client | virtual-mysql-client; however:
Package mysql-client is not configured yet.
Package mariadb-client is not installed.
Package virtual-mysql-client is not installed.
Package mysql-client-5.7 which provides virtual-mysql-client is to be removed.

Removing mysql-client-5.7 (5.7.19-0ubuntu0.16.04.1) ...
dpkg: mysql-client-core-5.7: dependency problems, but removing anyway as you requested:
akonadi-backend-mysql depends on mysql-client-core-5.7 | virtual-mysql-client-core; however:
Package mysql-client-core-5.7 is to be removed.
Package virtual-mysql-client-core is not installed.
Package mysql-client-core-5.7 which provides virtual-mysql-client-core is to be removed.
akonadi-backend-mysql depends on mysql-client-core-5.7 | virtual-mysql-client-core; however:
Package mysql-client-core-5.7 is to be removed.
Package virtual-mysql-client-core is not installed.
Package mysql-client-core-5.7 which provides virtual-mysql-client-core is to be removed.

Removing mysql-client-core-5.7 (5.7.19-0ubuntu0.16.04.1) ...
Processing triggers for man-db (2.7.5-1) ...
Selecting previously unselected package mysql-community-server.
(Reading database ... 926371 files and directories currently installed.)
Preparing to unpack .../mysql-community-server_5.7.20-1ubuntu16.04_amd64.deb ...
Unpacking mysql-community-server (5.7.20-1ubuntu16.04) ...
Selecting previously unselected package mysql-community-client.
Preparing to unpack .../mysql-community-client_5.7.20-1ubuntu16.04_amd64.deb ...
Unpacking mysql-community-client (5.7.20-1ubuntu16.04) ...
Preparing to unpack .../mysql-common_5.7.20-1ubuntu16.04_amd64.deb ...
Unpacking mysql-common (5.7.20-1ubuntu16.04) over (5.7.19-0ubuntu0.16.04.1) ...
Selecting previously unselected package libmecab2.
Preparing to unpack .../libmecab2_0.996-1.2ubuntu1_amd64.deb ...
Unpacking libmecab2 (0.996-1.2ubuntu1) ...
Preparing to unpack .../libmysqlclient-dev_5.7.20-1ubuntu16.04_amd64.deb ...
Unpacking libmysqlclient-dev (5.7.20-1ubuntu16.04) over (5.7.19-0ubuntu0.16.04.1) ...
Preparing to unpack .../libmysqlclient20_5.7.20-1ubuntu16.04_amd64.deb ...
Unpacking libmysqlclient20:amd64 (5.7.20-1ubuntu16.04) over (5.7.19-0ubuntu0.16.04.1) ...
Selecting previously unselected package mysql-server.
Preparing to unpack .../mysql-server_5.7.20-1ubuntu16.04_amd64.deb ...
Unpacking mysql-server (5.7.20-1ubuntu16.04) ...
Processing triggers for systemd (229-4ubuntu19) ...
Processing triggers for ureadahead (0.100.0-19) ...
ureadahead will be reprofiled on next reboot
Processing triggers for man-db (2.7.5-1) ...
Processing triggers for libc-bin (2.23-0ubuntu9) ...
Setting up google-chrome-stable (62.0.3202.75-1) ...
Setting up adobe-flashplugin (1:20171025.1-0ubuntu0.16.04.1) ...
update-alternatives: using /usr/lib/adobe-flashplugin/libflashplayer.so to provide /usr/lib/mozilla/plugins/flashplugin-alternative.so (mozilla-flashplugin) in auto mode
Setting up adobe-flash-properties-gtk (1:20171025.1-0ubuntu0.16.04.1) ...
Setting up php7.0-common (7.0.25-1+ubuntu16.04.1+deb.sury.org+1) ...
Setting up php7.0-json (7.0.25-1+ubuntu16.04.1+deb.sury.org+1) ...
Setting up php7.0-opcache (7.0.25-1+ubuntu16.04.1+deb.sury.org+1) ...
Setting up php7.0-readline (7.0.25-1+ubuntu16.04.1+deb.sury.org+1) ...
Setting up php7.0-cli (7.0.25-1+ubuntu16.04.1+deb.sury.org+1) ...
Setting up libapache2-mod-php7.0 (7.0.25-1+ubuntu16.04.1+deb.sury.org+1) ...
libapache2-mod-php7.0: not switching MPM - already enabled
Setting up php-imagick (3.4.3-3+ubuntu16.04.1+deb.sury.org+1) ...
Setting up php-memcache (3.0.9~20160311.4991c2f-7+ubuntu16.04.1+deb.sury.org+1) ...
Setting up php5.6-common (5.6.32-1+ubuntu16.04.1+deb.sury.org+1) ...
Setting up php5.6-mysql (5.6.32-1+ubuntu16.04.1+deb.sury.org+1) ...
Setting up php7.0 (7.0.25-1+ubuntu16.04.1+deb.sury.org+1) ...
Setting up php7.0-curl (7.0.25-1+ubuntu16.04.1+deb.sury.org+1) ...
Setting up php7.0-gd (7.0.25-1+ubuntu16.04.1+deb.sury.org+1) ...
Setting up php7.0-imap (7.0.25-1+ubuntu16.04.1+deb.sury.org+1) ...
Setting up php7.0-intl (7.0.25-1+ubuntu16.04.1+deb.sury.org+1) ...
Setting up php7.0-ldap (7.0.25-1+ubuntu16.04.1+deb.sury.org+1) ...
Setting up php7.0-mbstring (7.0.25-1+ubuntu16.04.1+deb.sury.org+1) ...
Setting up php7.0-mcrypt (7.0.25-1+ubuntu16.04.1+deb.sury.org+1) ...
Setting up php7.0-mysql (7.0.25-1+ubuntu16.04.1+deb.sury.org+1) ...
Setting up php7.0-pspell (7.0.25-1+ubuntu16.04.1+deb.sury.org+1) ...
Setting up php7.0-recode (7.0.25-1+ubuntu16.04.1+deb.sury.org+1) ...
Setting up php7.0-soap (7.0.25-1+ubuntu16.04.1+deb.sury.org+1) ...
Setting up php7.0-sqlite3 (7.0.25-1+ubuntu16.04.1+deb.sury.org+1) ...
Setting up php7.0-tidy (7.0.25-1+ubuntu16.04.1+deb.sury.org+1) ...
Setting up php7.0-xml (7.0.25-1+ubuntu16.04.1+deb.sury.org+1) ...
Setting up php7.0-xmlrpc (7.0.25-1+ubuntu16.04.1+deb.sury.org+1) ...
Setting up php7.0-xsl (7.0.25-1+ubuntu16.04.1+deb.sury.org+1) ...
Setting up php7.0-zip (7.0.25-1+ubuntu16.04.1+deb.sury.org+1) ...
Setting up php7.1-common (7.1.11-1+ubuntu16.04.1+deb.sury.org+1) ...
Setting up php7.1-gd (7.1.11-1+ubuntu16.04.1+deb.sury.org+1) ...
Setting up php7.1-mcrypt (7.1.11-1+ubuntu16.04.1+deb.sury.org+1) ...
Setting up php7.1-soap (7.1.11-1+ubuntu16.04.1+deb.sury.org+1) ...
Setting up php7.1-xml (7.1.11-1+ubuntu16.04.1+deb.sury.org+1) ...
Setting up php7.1-zip (7.1.11-1+ubuntu16.04.1+deb.sury.org+1) ...
Setting up gitlab-ce (10.1.1-ce.0) ...
...

 

The above process is actually a success. Start the service and below is the output of it :

user@hostname:~$ systemctl status mysql
● mysql.service - MySQL Community Server
   Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled)
   Active: active (running) since Jum 2017-11-10 09:12:12 WIB; 1 day 2h ago
  Process: 1852 ExecStart=/usr/sbin/mysqld --daemonize --pid-file=/var/run/mysqld/mysqld.pid (code=exited, status=0/SUCCESS)
  Process: 1729 ExecStartPre=/usr/share/mysql/mysql-systemd-start pre (code=exited, status=0/SUCCESS)
 Main PID: 1880 (mysqld)
    Tasks: 31
   Memory: 27.6M
      CPU: 1min 54.045s
   CGroup: /system.slice/mysql.service
           └─1880 /usr/sbin/mysqld --daemonize --pid-file=/var/run/mysqld/mysqld.pid
user@hostname:~$

The verson is still MySQL Database Serer 5.7 but this version is already fully configured without having to lose the data or database already created.

user@hostname:~$ myql --version
mysql  Ver 14.14 Distrib 5.7.20, for Linux (x86_64) using  EditLine wrapper
user@hostname:~$ 

One thought on “Ubuntu Linux Error Message : dpkg: error processing package mysql-server-5.7 (–configure)

Leave a Reply