Wine on 18.04: unable to find libpng12.so.0

I installed Wine on my Dell laptop. I had no issues. I then used the same method to install Wine to my Desktop. I did not receive any errors during the installation process and Wine is installed. However, when I run “winecfg” I get the following errors:

$ winecfg
000d:err:wincodecs:PngEncoder_CreateInstance Failed writing PNG because unable to find libpng12.so.0
000d:fixme:ole:CoCreateInstanceEx no instance created for interface {00000103-a8f2-4877-ba0a-fd2b6645fb94} of class {27949969-876a-41d7-9447-568f6a35a4dc}, hres is 0x80004005
000d:err:menubuilder:convert_to_native_icon error 0x80004005 creating bitmap encoder
000d:err:wincodecs:PngEncoder_CreateInstance Failed writing PNG because unable to find libpng12.so.0
000d:fixme:ole:CoCreateInstanceEx no instance created for interface {00000103-a8f2-4877-ba0a-fd2b6645fb94} of class {27949969-876a-41d7-9447-568f6a35a4dc}, hres is 0x80004005
000d:err:menubuilder:convert_to_native_icon error 0x80004005 creating bitmap encoder
000d:err:wincodecs:PngEncoder_CreateInstance Failed writing PNG because unable to find libpng12.so.0
000d:fixme:ole:CoCreateInstanceEx no instance created for interface {00000103-a8f2-4877-ba0a-fd2b6645fb94} of class {27949969-876a-41d7-9447-568f6a35a4dc}, hres is 0x80004005
000d:err:menubuilder:convert_to_native_icon error 0x80004005 creating bitmap encoder
000d:err:wincodecs:PngEncoder_CreateInstance Failed writing PNG because unable to find libpng12.so.0
000d:fixme:ole:CoCreateInstanceEx no instance created for interface {00000103-a8f2-4877-ba0a-fd2b6645fb94} of class {27949969-876a-41d7-9447-568f6a35a4dc}, hres is 0x80004005
000d:err:menubuilder:convert_to_native_icon error 0x80004005 creating bitmap encoder
000d:err:wincodecs:PngEncoder_CreateInstance Failed writing PNG because unable to find libpng12.so.0
000d:fixme:ole:CoCreateInstanceEx no instance created for interface {00000103-a8f2-4877-ba0a-fd2b6645fb94} of class {27949969-876a-41d7-9447-568f6a35a4dc}, hres is 0x80004005
000d:err:menubuilder:convert_to_native_icon error 0x80004005 creating bitmap encoder
000d:err:wincodecs:PngEncoder_CreateInstance Failed writing PNG because unable to find libpng12.so.0
000d:fixme:ole:CoCreateInstanceEx no instance created for interface {00000103-a8f2-4877-ba0a-fd2b6645fb94} of class {27949969-876a-41d7-9447-568f6a35a4dc}, hres is 0x80004005
000d:err:menubuilder:convert_to_native_icon error 0x80004005 creating bitmap encoder
000d:err:wincodecs:PngEncoder_CreateInstance Failed writing PNG because unable to find libpng12.so.0
000d:fixme:ole:CoCreateInstanceEx no instance created for interface {00000103-a8f2-4877-ba0a-fd2b6645fb94} of class {27949969-876a-41d7-9447-568f6a35a4dc}, hres is 0x80004005
000d:err:menubuilder:convert_to_native_icon error 0x80004005 creating bitmap encoder
000d:err:wincodecs:PngEncoder_CreateInstance Failed writing PNG because unable to find libpng12.so.0
000d:fixme:ole:CoCreateInstanceEx no instance created for interface {00000103-a8f2-4877-ba0a-fd2b6645fb94} of class {27949969-876a-41d7-9447-568f6a35a4dc}, hres is 0x80004005
000d:err:menubuilder:convert_to_native_icon error 0x80004005 creating bitmap encoder
000d:err:wincodecs:PngEncoder_CreateInstance Failed writing PNG because unable to find libpng12.so.0
000d:fixme:ole:CoCreateInstanceEx no instance created for interface {00000103-a8f2-4877-ba0a-fd2b6645fb94} of class {27949969-876a-41d7-9447-568f6a35a4dc}, hres is 0x80004005
000d:err:menubuilder:convert_to_native_icon error 0x80004005 creating bitmap encoder
000d:err:wincodecs:PngEncoder_CreateInstance Failed writing PNG because unable to find libpng12.so.0
000d:fixme:ole:CoCreateInstanceEx no instance created for interface {00000103-a8f2-4877-ba0a-fd2b6645fb94} of class {27949969-876a-41d7-9447-568f6a35a4dc}, hres is 0x80004005
000d:err:menubuilder:convert_to_native_icon error 0x80004005 creating bitmap encoder
000d:err:wincodecs:PngEncoder_CreateInstance Failed writing PNG because unable to find libpng12.so.0
000d:fixme:ole:CoCreateInstanceEx no instance created for interface {00000103-a8f2-4877-ba0a-fd2b6645fb94} of class {27949969-876a-41d7-9447-568f6a35a4dc}, hres is 0x80004005
000d:err:menubuilder:convert_to_native_icon error 0x80004005 creating bitmap encoder
000d:err:wincodecs:PngEncoder_CreateInstance Failed writing PNG because unable to find libpng12.so.0
000d:fixme:ole:CoCreateInstanceEx no instance created for interface {00000103-a8f2-4877-ba0a-fd2b6645fb94} of class {27949969-876a-41d7-9447-568f6a35a4dc}, hres is 0x80004005
000d:err:menubuilder:convert_to_native_icon error 0x80004005 creating bitmap encoder
000d:err:wincodecs:PngEncoder_CreateInstance Failed writing PNG because unable to find libpng12.so.0
000d:fixme:ole:CoCreateInstanceEx no instance created for interface {00000103-a8f2-4877-ba0a-fd2b6645fb94} of class {27949969-876a-41d7-9447-568f6a35a4dc}, hres is 0x80004005
000d:err:menubuilder:convert_to_native_icon error 0x80004005 creating bitmap encoder
000d:err:wincodecs:PngEncoder_CreateInstance Failed writing PNG because unable to find libpng12.so.0
000d:fixme:ole:CoCreateInstanceEx no instance created for interface {00000103-a8f2-4877-ba0a-fd2b6645fb94} of class {27949969-876a-41d7-9447-568f6a35a4dc}, hres is 0x80004005
000d:err:menubuilder:convert_to_native_icon error 0x80004005 creating bitmap encoder
000d:err:wincodecs:PngEncoder_CreateInstance Failed writing PNG because unable to find libpng12.so.0
000d:fixme:ole:CoCreateInstanceEx no instance created for interface {00000103-a8f2-4877-ba0a-fd2b6645fb94} of class {27949969-876a-41d7-9447-568f6a35a4dc}, hres is 0x80004005
000d:err:menubuilder:convert_to_native_icon error 0x80004005 creating bitmap encoder
000d:err:wincodecs:PngEncoder_CreateInstance Failed writing PNG because unable to find libpng12.so.0
000d:fixme:ole:CoCreateInstanceEx no instance created for interface {00000103-a8f2-4877-ba0a-fd2b6645fb94} of class {27949969-876a-41d7-9447-568f6a35a4dc}, hres is 0x80004005
000d:err:menubuilder:convert_to_native_icon error 0x80004005 creating bitmap encoder
000d:err:wincodecs:PngEncoder_CreateInstance Failed writing PNG because unable to find libpng12.so.0
000d:fixme:ole:CoCreateInstanceEx no instance created for interface {00000103-a8f2-4877-ba0a-fd2b6645fb94} of class {27949969-876a-41d7-9447-568f6a35a4dc}, hres is 0x80004005
000d:err:menubuilder:convert_to_native_icon error 0x80004005 creating bitmap encoder
000d:err:wincodecs:PngEncoder_CreateInstance Failed writing PNG because unable to find libpng12.so.0
000d:fixme:ole:CoCreateInstanceEx no instance created for interface {00000103-a8f2-4877-ba0a-fd2b6645fb94} of class {27949969-876a-41d7-9447-568f6a35a4dc}, hres is 0x80004005
000d:err:menubuilder:convert_to_native_icon error 0x80004005 creating bitmap encoder
000d:err:wincodecs:PngEncoder_CreateInstance Failed writing PNG because unable to find libpng12.so.0
000d:fixme:ole:CoCreateInstanceEx no instance created for interface {00000103-a8f2-4877-ba0a-fd2b6645fb94} of class {27949969-876a-41d7-9447-568f6a35a4dc}, hres is 0x80004005
000d:err:menubuilder:convert_to_native_icon error 0x80004005 creating bitmap encoder
000d:err:wincodecs:PngEncoder_CreateInstance Failed writing PNG because unable to find libpng12.so.0
000d:fixme:ole:CoCreateInstanceEx no instance created for interface {00000103-a8f2-4877-ba0a-fd2b6645fb94} of class {27949969-876a-41d7-9447-568f6a35a4dc}, hres is 0x80004005
000d:err:menubuilder:convert_to_native_icon error 0x80004005 creating bitmap encoder
000d:err:wincodecs:PngEncoder_CreateInstance Failed writing PNG because unable to find libpng12.so.0
000d:fixme:ole:CoCreateInstanceEx no instance created for interface {00000103-a8f2-4877-ba0a-fd2b6645fb94} of class {27949969-876a-41d7-9447-568f6a35a4dc}, hres is 0x80004005
000d:err:menubuilder:convert_to_native_icon error 0x80004005 creating bitmap encoder
000d:err:wincodecs:PngEncoder_CreateInstance Failed writing PNG because unable to find libpng12.so.0
000d:fixme:ole:CoCreateInstanceEx no instance created for interface {00000103-a8f2-4877-ba0a-fd2b6645fb94} of class {27949969-876a-41d7-9447-568f6a35a4dc}, hres is 0x80004005
000d:err:menubuilder:convert_to_native_icon error 0x80004005 creating bitmap encoder
000d:err:wincodecs:PngEncoder_CreateInstance Failed writing PNG because unable to find libpng12.so.0
000d:fixme:ole:CoCreateInstanceEx no instance created for interface {00000103-a8f2-4877-ba0a-fd2b6645fb94} of class {27949969-876a-41d7-9447-568f6a35a4dc}, hres is 0x80004005
000d:err:menubuilder:convert_to_native_icon error 0x80004005 creating bitmap encoder
000d:err:wincodecs:PngEncoder_CreateInstance Failed writing PNG because unable to find libpng12.so.0
000d:fixme:ole:CoCreateInstanceEx no instance created for interface {00000103-a8f2-4877-ba0a-fd2b6645fb94} of class {27949969-876a-41d7-9447-568f6a35a4dc}, hres is 0x80004005
000d:err:menubuilder:convert_to_native_icon error 0x80004005 creating bitmap encoder
000d:err:wincodecs:PngEncoder_CreateInstance Failed writing PNG because unable to find libpng12.so.0
000d:fixme:ole:CoCreateInstanceEx no instance created for interface {00000103-a8f2-4877-ba0a-fd2b6645fb94} of class {27949969-876a-41d7-9447-568f6a35a4dc}, hres is 0x80004005
000d:err:menubuilder:convert_to_native_icon error 0x80004005 creating bitmap encoder
000d:err:wincodecs:PngEncoder_CreateInstance Failed writing PNG because unable to find libpng12.so.0
000d:fixme:ole:CoCreateInstanceEx no instance created for interface {00000103-a8f2-4877-ba0a-fd2b6645fb94} of class {27949969-876a-41d7-9447-568f6a35a4dc}, hres is 0x80004005
000d:err:menubuilder:convert_to_native_icon error 0x80004005 creating bitmap encoder
000d:err:wincodecs:PngEncoder_CreateInstance Failed writing PNG because unable to find libpng12.so.0
000d:fixme:ole:CoCreateInstanceEx no instance created for interface {00000103-a8f2-4877-ba0a-fd2b6645fb94} of class {27949969-876a-41d7-9447-568f6a35a4dc}, hres is 0x80004005
000d:err:menubuilder:convert_to_native_icon error 0x80004005 creating bitmap encoder
000d:err:wincodecs:PngEncoder_CreateInstance Failed writing PNG because unable to find libpng12.so.0
000d:fixme:ole:CoCreateInstanceEx no instance created for interface {00000103-a8f2-4877-ba0a-fd2b6645fb94} of class {27949969-876a-41d7-9447-568f6a35a4dc}, hres is 0x80004005
000d:err:menubuilder:convert_to_native_icon error 0x80004005 creating bitmap encoder
000d:err:wincodecs:PngEncoder_CreateInstance Failed writing PNG because unable to find libpng12.so.0
000d:fixme:ole:CoCreateInstanceEx no instance created for interface {00000103-a8f2-4877-ba0a-fd2b6645fb94} of class {27949969-876a-41d7-9447-568f6a35a4dc}, hres is 0x80004005
000d:err:menubuilder:convert_to_native_icon error 0x80004005 creating bitmap encoder
000d:err:wincodecs:PngEncoder_CreateInstance Failed writing PNG because unable to find libpng12.so.0
000d:fixme:ole:CoCreateInstanceEx no instance created for interface {00000103-a8f2-4877-ba0a-fd2b6645fb94} of class {27949969-876a-41d7-9447-568f6a35a4dc}, hres is 0x80004005
000d:err:menubuilder:convert_to_native_icon error 0x80004005 creating bitmap encoder
000d:err:wincodecs:PngEncoder_CreateInstance Failed writing PNG because unable to find libpng12.so.0
000d:fixme:ole:CoCreateInstanceEx no instance created for interface {00000103-a8f2-4877-ba0a-fd2b6645fb94} of class {27949969-876a-41d7-9447-568f6a35a4dc}, hres is 0x80004005
000d:err:menubuilder:convert_to_native_icon error 0x80004005 creating bitmap encoder
000d:err:wincodecs:PngEncoder_CreateInstance Failed writing PNG because unable to find libpng12.so.0
000d:fixme:ole:CoCreateInstanceEx no instance created for interface {00000103-a8f2-4877-ba0a-fd2b6645fb94} of class {27949969-876a-41d7-9447-568f6a35a4dc}, hres is 0x80004005
000d:err:menubuilder:convert_to_native_icon error 0x80004005 creating bitmap encoder
000d:err:wincodecs:PngEncoder_CreateInstance Failed writing PNG because unable to find libpng12.so.0
000d:fixme:ole:CoCreateInstanceEx no instance created for interface {00000103-a8f2-4877-ba0a-fd2b6645fb94} of class {27949969-876a-41d7-9447-568f6a35a4dc}, hres is 0x80004005
000d:err:menubuilder:convert_to_native_icon error 0x80004005 creating bitmap encoder
000d:err:wincodecs:PngEncoder_CreateInstance Failed writing PNG because unable to find libpng12.so.0
000d:fixme:ole:CoCreateInstanceEx no instance created for interface {00000103-a8f2-4877-ba0a-fd2b6645fb94} of class {27949969-876a-41d7-9447-568f6a35a4dc}, hres is 0x80004005
000d:err:menubuilder:convert_to_native_icon error 0x80004005 creating bitmap encoder
000d:err:wincodecs:PngEncoder_CreateInstance Failed writing PNG because unable to find libpng12.so.0
000d:fixme:ole:CoCreateInstanceEx no instance created for interface {00000103-a8f2-4877-ba0a-fd2b6645fb94} of class {27949969-876a-41d7-9447-568f6a35a4dc}, hres is 0x80004005
000d:err:menubuilder:convert_to_native_icon error 0x80004005 creating bitmap encoder
000d:err:wincodecs:PngEncoder_CreateInstance Failed writing PNG because unable to find libpng12.so.0
000d:fixme:ole:CoCreateInstanceEx no instance created for interface {00000103-a8f2-4877-ba0a-fd2b6645fb94} of class {27949969-876a-41d7-9447-568f6a35a4dc}, hres is 0x80004005
000d:err:menubuilder:convert_to_native_icon error 0x80004005 creating bitmap encoder
000d:err:wincodecs:PngEncoder_CreateInstance Failed writing PNG because unable to find libpng12.so.0
000d:fixme:ole:CoCreateInstanceEx no instance created for interface {00000103-a8f2-4877-ba0a-fd2b6645fb94} of class {27949969-876a-41d7-9447-568f6a35a4dc}, hres is 0x80004005
000d:err:menubuilder:convert_to_native_icon error 0x80004005 creating bitmap encoder
000d:err:wincodecs:PngEncoder_CreateInstance Failed writing PNG because unable to find libpng12.so.0
000d:fixme:ole:CoCreateInstanceEx no instance created for interface {00000103-a8f2-4877-ba0a-fd2b6645fb94} of class {27949969-876a-41d7-9447-568f6a35a4dc}, hres is 0x80004005
000d:err:menubuilder:convert_to_native_icon error 0x80004005 creating bitmap encoder
000d:err:wincodecs:PngEncoder_CreateInstance Failed writing PNG because unable to find libpng12.so.0
000d:fixme:ole:CoCreateInstanceEx no instance created for interface {00000103-a8f2-4877-ba0a-fd2b6645fb94} of class {27949969-876a-41d7-9447-568f6a35a4dc}, hres is 0x80004005
000d:err:menubuilder:convert_to_native_icon error 0x80004005 creating bitmap encoder
000d:err:wincodecs:PngEncoder_CreateInstance Failed writing PNG because unable to find libpng12.so.0
000d:fixme:ole:CoCreateInstanceEx no instance created for interface {00000103-a8f2-4877-ba0a-fd2b6645fb94} of class {27949969-876a-41d7-9447-568f6a35a4dc}, hres is 0x80004005
000d:err:menubuilder:convert_to_native_icon error 0x80004005 creating bitmap encoder
000d:err:wincodecs:PngEncoder_CreateInstance Failed writing PNG because unable to find libpng12.so.0
000d:fixme:ole:CoCreateInstanceEx no instance created for interface {00000103-a8f2-4877-ba0a-fd2b6645fb94} of class {27949969-876a-41d7-9447-568f6a35a4dc}, hres is 0x80004005
000d:err:menubuilder:convert_to_native_icon error 0x80004005 creating bitmap encoder
000d:err:wincodecs:PngEncoder_CreateInstance Failed writing PNG because unable to find libpng12.so.0
000d:fixme:ole:CoCreateInstanceEx no instance created for interface {00000103-a8f2-4877-ba0a-fd2b6645fb94} of class {27949969-876a-41d7-9447-568f6a35a4dc}, hres is 0x80004005
000d:err:menubuilder:convert_to_native_icon error 0x80004005 creating bitmap encoder
000d:err:wincodecs:PngEncoder_CreateInstance Failed writing PNG because unable to find libpng12.so.0
000d:fixme:ole:CoCreateInstanceEx no instance created for interface {00000103-a8f2-4877-ba0a-fd2b6645fb94} of class {27949969-876a-41d7-9447-568f6a35a4dc}, hres is 0x80004005
000d:err:menubuilder:convert_to_native_icon error 0x80004005 creating bitmap encoder
000d:err:wincodecs:PngEncoder_CreateInstance Failed writing PNG because unable to find libpng12.so.0
000d:fixme:ole:CoCreateInstanceEx no instance created for interface {00000103-a8f2-4877-ba0a-fd2b6645fb94} of class {27949969-876a-41d7-9447-568f6a35a4dc}, hres is 0x80004005
000d:err:menubuilder:convert_to_native_icon error 0x80004005 creating bitmap encoder
000d:err:wincodecs:PngEncoder_CreateInstance Failed writing PNG because unable to find libpng12.so.0
000d:fixme:ole:CoCreateInstanceEx no instance created for interface {00000103-a8f2-4877-ba0a-fd2b6645fb94} of class {27949969-876a-41d7-9447-568f6a35a4dc}, hres is 0x80004005
000d:err:menubuilder:convert_to_native_icon error 0x80004005 creating bitmap encoder
000d:err:wincodecs:PngEncoder_CreateInstance Failed writing PNG because unable to find libpng12.so.0
000d:fixme:ole:CoCreateInstanceEx no instance created for interface {00000103-a8f2-4877-ba0a-fd2b6645fb94} of class {27949969-876a-41d7-9447-568f6a35a4dc}, hres is 0x80004005
000d:err:menubuilder:convert_to_native_icon error 0x80004005 creating bitmap encoder
000d:err:wincodecs:PngEncoder_CreateInstance Failed writing PNG because unable to find libpng12.so.0
000d:fixme:ole:CoCreateInstanceEx no instance created for interface {00000103-a8f2-4877-ba0a-fd2b6645fb94} of class {27949969-876a-41d7-9447-568f6a35a4dc}, hres is 0x80004005
000d:err:menubuilder:convert_to_native_icon error 0x80004005 creating bitmap encoder
000d:err:wincodecs:PngEncoder_CreateInstance Failed writing PNG because unable to find libpng12.so.0
000d:fixme:ole:CoCreateInstanceEx no instance created for interface {00000103-a8f2-4877-ba0a-fd2b6645fb94} of class {27949969-876a-41d7-9447-568f6a35a4dc}, hres is 0x80004005
000d:err:menubuilder:convert_to_native_icon error 0x80004005 creating bitmap encoder
000d:err:wincodecs:PngEncoder_CreateInstance Failed writing PNG because unable to find libpng12.so.0
000d:fixme:ole:CoCreateInstanceEx no instance created for interface {00000103-a8f2-4877-ba0a-fd2b6645fb94} of class {27949969-876a-41d7-9447-568f6a35a4dc}, hres is 0x80004005
000d:err:menubuilder:convert_to_native_icon error 0x80004005 creating bitmap encoder
000d:err:wincodecs:PngEncoder_CreateInstance Failed writing PNG because unable to find libpng12.so.0
000d:fixme:ole:CoCreateInstanceEx no instance created for interface {00000103-a8f2-4877-ba0a-fd2b6645fb94} of class {27949969-876a-41d7-9447-568f6a35a4dc}, hres is 0x80004005
000d:err:menubuilder:convert_to_native_icon error 0x80004005 creating bitmap encoder
000d:err:wincodecs:PngEncoder_CreateInstance Failed writing PNG because unable to find libpng12.so.0
000d:fixme:ole:CoCreateInstanceEx no instance created for interface {00000103-a8f2-4877-ba0a-fd2b6645fb94} of class {27949969-876a-41d7-9447-568f6a35a4dc}, hres is 0x80004005
000d:err:menubuilder:convert_to_native_icon error 0x80004005 creating bitmap encoder
000d:err:wincodecs:PngEncoder_CreateInstance Failed writing PNG because unable to find libpng12.so.0
000d:fixme:ole:CoCreateInstanceEx no instance created for interface {00000103-a8f2-4877-ba0a-fd2b6645fb94} of class {27949969-876a-41d7-9447-568f6a35a4dc}, hres is 0x80004005
000d:err:menubuilder:convert_to_native_icon error 0x80004005 creating bitmap encoder
000d:err:wincodecs:PngEncoder_CreateInstance Failed writing PNG because unable to find libpng12.so.0
000d:fixme:ole:CoCreateInstanceEx no instance created for interface {00000103-a8f2-4877-ba0a-fd2b6645fb94} of class {27949969-876a-41d7-9447-568f6a35a4dc}, hres is 0x80004005
000d:err:menubuilder:convert_to_native_icon error 0x80004005 creating bitmap encoder
000d:err:wincodecs:PngEncoder_CreateInstance Failed writing PNG because unable to find libpng12.so.0
000d:fixme:ole:CoCreateInstanceEx no instance created for interface {00000103-a8f2-4877-ba0a-fd2b6645fb94} of class {27949969-876a-41d7-9447-568f6a35a4dc}, hres is 0x80004005
000d:err:menubuilder:convert_to_native_icon error 0x80004005 creating bitmap encoder
000d:err:wincodecs:PngEncoder_CreateInstance Failed writing PNG because unable to find libpng12.so.0
000d:fixme:ole:CoCreateInstanceEx no instance created for interface {00000103-a8f2-4877-ba0a-fd2b6645fb94} of class {27949969-876a-41d7-9447-568f6a35a4dc}, hres is 0x80004005
000d:err:menubuilder:convert_to_native_icon error 0x80004005 creating bitmap encoder
000d:err:wincodecs:PngEncoder_CreateInstance Failed writing PNG because unable to find libpng12.so.0
000d:fixme:ole:CoCreateInstanceEx no instance created for interface {00000103-a8f2-4877-ba0a-fd2b6645fb94} of class {27949969-876a-41d7-9447-568f6a35a4dc}, hres is 0x80004005
000d:err:menubuilder:convert_to_native_icon error 0x80004005 creating bitmap encoder
000d:err:wincodecs:PngEncoder_CreateInstance Failed writing PNG because unable to find libpng12.so.0
000d:fixme:ole:CoCreateInstanceEx no instance created for interface {00000103-a8f2-4877-ba0a-fd2b6645fb94} of class {27949969-876a-41d7-9447-568f6a35a4dc}, hres is 0x80004005
000d:err:menubuilder:convert_to_native_icon error 0x80004005 creating bitmap encoder
000d:err:wincodecs:PngEncoder_CreateInstance Failed writing PNG because unable to find libpng12.so.0
000d:fixme:ole:CoCreateInstanceEx no instance created for interface {00000103-a8f2-4877-ba0a-fd2b6645fb94} of class {27949969-876a-41d7-9447-568f6a35a4dc}, hres is 0x80004005
000d:err:menubuilder:convert_to_native_icon error 0x80004005 creating bitmap encoder
000d:err:wincodecs:PngEncoder_CreateInstance Failed writing PNG because unable to find libpng12.so.0
000d:fixme:ole:CoCreateInstanceEx no instance created for interface {00000103-a8f2-4877-ba0a-fd2b6645fb94} of class {27949969-876a-41d7-9447-568f6a35a4dc}, hres is 0x80004005
000d:err:menubuilder:convert_to_native_icon error 0x80004005 creating bitmap encoder
000d:err:wincodecs:PngEncoder_CreateInstance Failed writing PNG because unable to find libpng12.so.0
000d:fixme:ole:CoCreateInstanceEx no instance created for interface {00000103-a8f2-4877-ba0a-fd2b6645fb94} of class {27949969-876a-41d7-9447-568f6a35a4dc}, hres is 0x80004005
000d:err:menubuilder:convert_to_native_icon error 0x80004005 creating bitmap encoder
000d:err:wincodecs:PngEncoder_CreateInstance Failed writing PNG because unable to find libpng12.so.0
000d:fixme:ole:CoCreateInstanceEx no instance created for interface {00000103-a8f2-4877-ba0a-fd2b6645fb94} of class {27949969-876a-41d7-9447-568f6a35a4dc}, hres is 0x80004005
000d:err:menubuilder:convert_to_native_icon error 0x80004005 creating bitmap encoder
000d:err:wincodecs:PngEncoder_CreateInstance Failed writing PNG because unable to find libpng12.so.0
000d:fixme:ole:CoCreateInstanceEx no instance created for interface {00000103-a8f2-4877-ba0a-fd2b6645fb94} of class {27949969-876a-41d7-9447-568f6a35a4dc}, hres is 0x80004005
000d:err:menubuilder:convert_to_native_icon error 0x80004005 creating bitmap encoder
000d:err:wincodecs:PngEncoder_CreateInstance Failed writing PNG because unable to find libpng12.so.0
000d:fixme:ole:CoCreateInstanceEx no instance created for interface {00000103-a8f2-4877-ba0a-fd2b6645fb94} of class {27949969-876a-41d7-9447-568f6a35a4dc}, hres is 0x80004005
000d:err:menubuilder:convert_to_native_icon error 0x80004005 creating bitmap encoder
000d:err:wincodecs:PngEncoder_CreateInstance Failed writing PNG because unable to find libpng12.so.0
000d:fixme:ole:CoCreateInstanceEx no instance created for interface {00000103-a8f2-4877-ba0a-fd2b6645fb94} of class {27949969-876a-41d7-9447-568f6a35a4dc}, hres is 0x80004005
000d:err:menubuilder:convert_to_native_icon error 0x80004005 creating bitmap encoder
000d:err:wincodecs:PngEncoder_CreateInstance Failed writing PNG because unable to find libpng12.so.0
000d:fixme:ole:CoCreateInstanceEx no instance created for interface {00000103-a8f2-4877-ba0a-fd2b6645fb94} of class {27949969-876a-41d7-9447-568f6a35a4dc}, hres is 0x80004005
000d:err:menubuilder:convert_to_native_icon error 0x80004005 creating bitmap encoder
000d:err:wincodecs:PngEncoder_CreateInstance Failed writing PNG because unable to find libpng12.so.0
000d:fixme:ole:CoCreateInstanceEx no instance created for interface {00000103-a8f2-4877-ba0a-fd2b6645fb94} of class {27949969-876a-41d7-9447-568f6a35a4dc}, hres is 0x80004005
000d:err:menubuilder:convert_to_native_icon error 0x80004005 creating bitmap encoder
000d:err:wincodecs:PngEncoder_CreateInstance Failed writing PNG because unable to find libpng12.so.0
000d:fixme:ole:CoCreateInstanceEx no instance created for interface {00000103-a8f2-4877-ba0a-fd2b6645fb94} of class {27949969-876a-41d7-9447-568f6a35a4dc}, hres is 0x80004005
000d:err:menubuilder:convert_to_native_icon error 0x80004005 creating bitmap encoder

After the error list, I do get the winecfg menu. I suspect the error has something to do with adding architecture i386. When I first ran “sudo dpkg --add-architecture i386” on my laptop, the installation took some time with many command lines listed. When I first ran this command on my desktop, the system instantly returned me to the terminal prompt. Nothing seemed to be installed. Any suggestions how to approach this issue?

First make sure that libpng12.so.0 is installed:

Then do:
sudo ln -s /lib/i386-linux-gnu/libpng12.so.0 /usr/lib/libpng12.so.0 sudo ln -s /lib/x86_64-linux-gnu/libpng12.so.0 /usr/lib64/libpng12.so.0

This trick is taken from here.

That did not work. First command accepted, Second one not. winecfg provides same output. See below:

$ sudo ln -s /lib/i386-linux-gnu/libpng12.so.0 /usr/lib/libpng12.so.0
$ sudo ln -s /lib/x86_64-linux-gnu/libpng12.so.0 /usr/lib64/libpng12.so.0
ln: failed to create symbolic link '/usr/lib64/libpng12.so.0': No such file or directory
$

Also, not sure if the right command:

$ sudo apt-get install libpng12-0
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package libpng12-0 is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'libpng12-0' has no installation candidate
$

It seems that the libpng12-0 isn’t available since xenial. You can manually download the package, but it’s not advisable to download older/deprecated packages from older distributions as they might break your apt system.

I don’t use Wine, but I tried it on bionic and I didn’t face this type of problem; the latest library is libpng16-16 but in your case it seems like libpng12-0 is required…

If you want to go ahead with this, proceed at your own risk. Here’s where you’ll find the package files for libpng12-0.

Thanks. I will keep that suggestion in mind. I think there is something else going on. Like I mentioned in the original post, I had no issue with my laptop installation. And I did notice that nothing happened with the “sudo dpkg --add-architecture i386” command where it was a lengthy installation on my laptop. Maybe the i386 architecture is not installed or installed correctly?

What does dpkg --print-foreign-architectures command give?

$ dpkg --print-foreign-architectures
i386

I guess this means i386 architecture is already there? Could it be possible it was installed with the OS on one machine and not the other? Both are fresh installs.

Yes it means that 32-bit support is there already, by giving the command dpkg --add-architecture i386.

It doesn’t come pre-installed with the OS.

I saw a post on reddit that by changing repo from Trusty to Artful and reinstalling Wine fixed their issue. I did first install Wine on my laptop using Artful, and then re-installed Wine with Xenial after realizing my mistake. So that is an explanation why my laptop install went fine and my desktop was not. I will re-install Wine using Artful in the next day or so and report back.

Also, should I undo the “sudo ln -s /lib/x86_64-linux-gnu/libpng12.so.0 /usr/lib64/libpng12.so.0” command?

Not sure about that; you can always establish the links again after installing the package…

I removed wine, reinstalled using Artful, same error. So I removed wine and installed again using the following command:

sudo apt install wine64

Now when I check wine version it says I don’t have wine, yet it says I do:

$ wine --version

Command 'wine' not found, but can be installed with:

sudo apt install wine-development
sudo apt install wine-stable     

$ sudo apt install wine-stable     
Reading package lists... Done
Building dependency tree       
Reading state information... Done
wine-stable is already the newest version (3.0.3~xenial).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
$ 

Update: before restoring my OS to last weeks version, I tried installing the devopment version, and got the following:

$ wine --version
wine-3.6 (Ubuntu 3.6-1)
$ winecfg
002b:err:winediag:SECUR32_initNTLMSP ntlm_auth was not found or is outdated. Make sure that ntlm_auth >= 3.0.25 is in your path. Usually, you can find it in the winbind package of your distribution.
0046:err:winediag:SECUR32_initNTLMSP ntlm_auth was not found or is outdated. Make sure that ntlm_auth >= 3.0.25 is in your path. Usually, you can find it in the winbind package of your distribution.
wine: configuration in '/home/jaybo/.wine' has been updated.
$

The config menu did pop up.

Do you have winbind installed? Install it and see if that helps. And also I don’t recommend using the development version unless you’re developing something.

Actually, I ran winecfg again. the error went away. But I could not get any window files to load. So restored last week’s OS backup (with Winehq-stable where I am back to the “Failed writing PNG because unable to find libpng12.so.0” error.

I tried installing libpng12 from the link you provided and all errors cleared.

So you indicated that might be risky. What are my risks going forward?

I mentioned in that reply about the risk; usually it’s not advisable to use old deprecated packages that are no longer supported, it might tinker with the apt system…

1 Like