[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: to install libpng12.so.0



Sven Hartge, on 2019-10-04:
> merlin verdecia, on 2019-10-04:
> > I have debian 10 and i need to install libpng12.so.0, but i can not do
> > it. How i can?
> > I have installed the libpng16.so.0.
>
> What problem exactly are you trying to solve?
>
> Are you trying to use a program compiled for an ancient PNG library
> version?

Hi,

that is most intriguing, because I had the same problem some
weeks ago, to permit a closed source video game to run on my
machine.

Best option here would first to check for updates, see if a new
version has been built against libpng16.  If not, then open a
bug to request a build against libpng16 to your software
provider, if of course this is possible.  :)
Otherwise, if you have to deal with an open source software,
then maybe you can rebuild it against libpng16 by yourself.


Now, if the software is closed source, then you will have to
get a libpng12 targeting your system.  One way is to build your
own, using the source code made available on the home page of
the project (you may have to browse a bit up into sourceforge to
actually get the archived version 1.2.58):

	$ apt-cache show libpng-dev | grep Homepage
	Homepage: http://libpng.org/pub/png/libpng.html

Note on the website all the friendly colourful warnings about
vulnerabilities in the library; it will be important if your
software deals with untrusted PNG files.  Once you've got the
archive, extract it, have a look at the README file, which tells
you to look into INSTALL, which in turn tells you how to build
the library:
> On Unix/Linux and similar systems, you can simply type
>
>     ./configure [--prefix=/path]
>     make check
[...third command skipped on purpose...]

You will need to have packages "build-essential" and
"zlib1g-dev" already installed on your machine.  After running
"./configure && make check", and verified that the test passed,
the resulting library was freshly built and hidden inside
.libs/:

	$ find -name libpng12.so\*
	./.libs/libpng12.so.0.58.0
	./.libs/libpng12.so.0
	./.libs/libpng12.so

Do *not* install this library in your system!

Only make it available for the application needing it: if your
closed source software has a dedicated directory for shared
libraries (something like lib/ or lib64/ for instance), then put
the library at that emplacement instead, with for instance:

	$ mv .libs/libpng12.so* /pathto/yoursoft/lib64/

But if no such directory is already available in your software,
then create and fill it with libpng12.so*, and in the end you
can resort to the LD_LIBRARY_PATH environment variable to point
to the location of that custom libpng12 of yours before running
your application:

	$ env LD_LIBRARY_PATH=/pathto/yoursoft/lib64 /pathto/yoursoft/bin/executable

I hope this helps,
Kind Regards,  :)
-- 
Étienne Mollier <etienne.mollier@mailoo.org>
Fingerprint:  5ab1 4edf 63bb ccff 8b54  2fa9 59da 56fe fff3 882d


Attachment: signature.asc
Description: OpenPGP digital signature


Reply to: