$ sudo apt full-upgrade -f
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
Calculating upgrade... Done
The following package was automatically installed and is no longer required:
linux-image-extra-4.4.0-45-generic
Use 'sudo apt autoremove' to remove it.
The following NEW packages will be installed:
linux-headers-4.4.0-59-generic
The following packages will be upgraded:
mysql-server-5.7
1 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
77 not fully installed or removed.
Need to get 0 B/3 635 kB of archives.
After this operation, 7 431 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Preconfiguring packages ...
(Reading database ... 156954 files and directories currently installed.)
Preparing to unpack .../linux-headers-4.4.0-59-generic_4.4.0-59.80_amd64.deb ...
Unpacking linux-headers-4.4.0-59-generic (4.4.0-59.80) ...
Preparing to unpack .../mysql-server-5.7_5.7.17-0ubuntu0.16.04.1_amd64.deb ...
cp: cannot overwrite directory '/var/lib/mysql-upgrade/DATADIR.link/mysql' with non-directory
dpkg: error processing archive /var/cache/apt/archives/mysql-server-5.7_5.7.17-0ubuntu0.16.04.1_amd64.deb (--unpack):
subprocess new pre-installation script returned error exit status 1
Errors were encountered while processing:
/var/cache/apt/archives/mysql-server-5.7_5.7.17-0ubuntu0.16.04.1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)