(Original post does not include the actual apt-get
command used)
The question is actually:
What causes this output while updating mysql, and how do I fix it?
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
So far so good.
The following packages were automatically installed and are no longer required:
linux-headers-5.8.0-49-generic
linux-hwe-5.8-headers-5.8.0-49
linux-image-5.8.0-49-generic
linux-modules-5.8.0-49-generic
linux-modules-extra-5.8.0-49-generic
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
libpng12-0
The following NEW packages will be installed:
libpng12-0
0 upgraded, 1 newly installed, 0 to remove and 6 not upgraded.
3 not fully installed or removed.
Need to get 0 B/116 kB of archives.
After this operation, 285 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
(Reading database ... 314650 files and directories currently installed.)
Preparing to unpack .../libpng12-0_1.2.54-1ubuntu1_amd64.deb ...
Unpacking libpng12-0:amd64 (1.2.54-1ubuntu1) ...
dpkg: error processing archive /var/cache/apt/archives/libpng12-0_1.2.54-1ubuntu1_amd64.deb (--unpack):
unable to install new version of '/lib/x86_64-linux-gnu/libpng12.so.0': No such file or directory
No apport report written because the error message indicates an issue on the local system
Errors were encountered while processing:
/var/cache/apt/archives/libpng12-0_1.2.54-1ubuntu1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
(edit: mostly code requirement needs more text)