1

I'm trying to install fpart, but having mysql error:

# apt install fpart
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  linux-aws-headers-4.4.0-1090 linux-aws-headers-4.4.0-1092 linux-aws-headers-4.4.0-1094 linux-aws-headers-4.4.0-1095 linux-aws-headers-4.4.0-1096 linux-aws-headers-4.4.0-1098
  linux-aws-headers-4.4.0-1100 linux-aws-headers-4.4.0-1101 linux-aws-headers-4.4.0-1102 linux-aws-headers-4.4.0-1104 linux-aws-headers-4.4.0-1105 linux-aws-headers-4.4.0-1106
Use 'sudo apt autoremove' to remove them.
The following NEW packages will be installed:
  fpart
0 upgraded, 1 newly installed, 0 to remove and 48 not upgraded.
2 not fully installed or removed.
Need to get 36.2 kB of archives.
After this operation, 119 kB of additional disk space will be used.
Get:1 http://us-east-1.ec2.archive.ubuntu.com/ubuntu xenial/universe amd64 fpart amd64 0.9.2-1 [36.2 kB]
Fetched 36.2 kB in 0s (318 kB/s) 
Selecting previously unselected package fpart.
(Reading database ... 358221 files and directories currently installed.)
Preparing to unpack .../fpart_0.9.2-1_amd64.deb ...
Unpacking fpart (0.9.2-1) ...
Processing triggers for man-db (2.7.5-1) ...
Setting up mysql-server-5.7 (5.7.30-0ubuntu0.16.04.1) ...
insserv: warning: current start runlevel(s) (empty) of script `mysql' overrides LSB defaults (2 3 4 5).
insserv: warning: current stop runlevel(s) (0 1 2 3 4 5 6) of script `mysql' overrides LSB defaults (0 1 6).
mysql_upgrade: Got error: 2002: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) while connecting to the MySQL server
Upgrade process encountered error and will not continue.
mysql_upgrade failed with exit status 11
dpkg: error processing package mysql-server-5.7 (--configure):
 subprocess installed post-installation script returned error exit status 1
No apport report written because the error message indicates its a followup error from a previous failure.
                                                                                                          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
Setting up fpart (0.9.2-1) ...
Errors were encountered while processing:
 mysql-server-5.7
 mysql-server
E: Sub-process /usr/bin/dpkg returned an error code (1)

Obviously, there are no such dependency in the list as mysql:

# apt depends fpart
fpart
  Depends: libc6 (>= 2.4)
  Depends: rsync (>= 3.1.1)
  Depends: sudo (>= 1.8.12)

What could be the reason for such behavior? Maybe there was uncompleted MySQL installation?

# apt list --installed | grep -i mysql
dbconfig-mysql/xenial,now 2.0.4ubuntu1 all [installed,automatic]
mysql-client/xenial-updates,xenial-security,now 5.7.30-0ubuntu0.16.04.1 all [installed]
mysql-client-5.7/xenial-updates,xenial-security,now 5.7.30-0ubuntu0.16.04.1 amd64 [installed,automatic]
mysql-client-core-5.7/xenial-updates,xenial-security,now 5.7.30-0ubuntu0.16.04.1 amd64 [installed,automatic]
mysql-common/xenial-updates,xenial-security,now 5.7.30-0ubuntu0.16.04.1 all [installed]
mysql-server/xenial-updates,xenial-security,now 5.7.30-0ubuntu0.16.04.1 all [installed]
mysql-server-5.7/xenial-updates,xenial-security,now 5.7.30-0ubuntu0.16.04.1 amd64 [installed,automatic]
mysql-server-core-5.7/xenial-updates,xenial-security,now 5.7.30-0ubuntu0.16.04.1 amd64 [installed,automatic]
php-mysql/xenial-updates,now 1:7.0+35ubuntu6.1 all [installed]
php7.0-mysql/xenial-updates,xenial-security,now 7.0.33-0ubuntu0.16.04.15 amd64 [installed,automatic]

And # ps aux | grep -i mysql | grep -v grep so MySQL is not running

Roman Newaza
  • 632
  • 4
  • 13
  • 23

1 Answers1

2

It looks like MySQL upgrade process fails.

If you have modified MySQL system users, then the upgrade might fail because it cannot authenticate via the MySQL socket.

Another possibility is that your MySQL server is not running, and therefore upgrade process cannot connect to the server.

Tero Kilkanen
  • 36,796
  • 3
  • 41
  • 63