Preparing to unpack .../python-pkg-resources_39.0.1-2_all.deb ... Unpacking python-pkg-resources (39.0.1-2) ... Selecting previously unselected package python-setuptools. Preparing to unpack .../python-setuptools_39.0.1-2_all.deb ... Unpacking python-setuptools (39.0.1-2) ... Selecting previously unselected package linuxbrew-wrapper. Preparing to unpack .../linuxbrew-wrapper_20170516-2_all.deb ... Unpacking linuxbrew-wrapper (20170516-2) ... Setting up python-pkg-resources (39.0.1-2) ... Processing triggers for man-db (2.8.3-2) ... Setting up mysql-server-5.7 (5.7.24-0ubuntu0.18.04.1) ... /var/lib/mysql/ibdata1: 16595 ERROR: Database files are locked. Daemon already running? Warning: Unable to start the server. Please restart MySQL and run mysql_upgrade to ensure the database is ready for use. /var/lib/mysql/ibdata1: 16595 ERROR: Database files are locked. Daemon already running? Warning: Unable to start the server. Job for mysql.service failed because the control process exited with error code. See "systemctl status mysql.service" and "journalctl -xe" for details. invoke-rc.d: initscript mysql, action "start" failed. ● mysql.service - MySQL Community Server Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled) Active: activating (auto-restart) (Result: exit-code) since Tue 2018-11-13 16:15:25 IST; 16ms ago Process: 20970 ExecStart=/usr/sbin/mysqld --daemonize --pid-file=/run/mysqld/mysqld.pid (code=exited, status=1/FAILURE) Process: 20956 ExecStartPre=/usr/share/mysql/mysql-systemd-start pre (code=exited, status=0/SUCCESS) dpkg: error processing package mysql-server-5.7 (--configure): installed mysql-server-5.7 package post-installation script subprocess returned error exit status 1