-2

(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)

Jeter-work
  • 782
  • 7
  • 22

1 Answers1

0

Satyam, first off, your question really needs reformatting, when posting questions here like that make it look of bad quality, the way it is presented is not appropriate to help other people understand the problem.

In general, you have libraries issues, it comes because you don't have /usr/lib/x86_64-linux-gnu/libpng12.so.0, which is true, you might have only the /usr/lib/x86_64-linux-gnu/libpng12.so.0.54.0

To overcome this, just create symbolic link called /usr/lib/x86_64-linux-gnu/libpng12.so.0 pointing to /usr/lib/x86_64-linux-gnu/libpng12.so.0.54.0

The folder should then contains 2 files, like these 2:

/usr/lib/x86_64-linux-gnu/libpng12.so.0 (symlink)
/usr/lib/x86_64-linux-gnu/libpng12.so.0.54.0

Your original error:

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)
Marco
  • 1,172
  • 9
  • 24