Author Topic: [SOLVED - Workaround fix only] Unable to start PixInsight on Linux system  (Read 8086 times)

Offline lazjen

  • Newcomer
  • Posts: 8
*****
Solution is here: https://pixinsight.com/forum/index.php?topic=10718.msg70469#msg70469
*****

Original post:

I just tried to install PixInsight (downloaded from Software Distribution this morning) on one of my Linux boxes (it's a Gentoo based system) and when I try to run it, I get this:

/opt/PixInsight/bin/PixInsight: /opt/PixInsight/bin/lib/libz.so.1: version `ZLIB_1.2.9' not found (required by /usr/lib64/libpng16.so.16)

Any ideas on what I am doing wrong?  I notice that in the  /opt/PixInsight/bin/lib/ there is a libpng15.so.15 so I wonder if it should be referring to that?

Btw, I've been able to install and run PixInsight on other Gentoo boxes in the past - it's just started failing for me now.

Thanks,

Chris
« Last Edit: 2017 November 02 03:56:37 by lazjen »

Offline lazjen

  • Newcomer
  • Posts: 8
Re: Unable to start PixInsight on Linux system
« Reply #1 on: 2017 January 25 00:19:03 »
No ideas or suggestions?

I've now got this on 2 systems now - it's obviously some system update I've done that's caused the problem, but I can't work out why it's referring to the libraries that it's showing in the error message.

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
Re: Unable to start PixInsight on Linux system
« Reply #2 on: 2017 January 25 02:11:05 »
Hi Chris,

This looks like you are trying to run the PixInsight binary executable directly. You must run the PixInsight.sh script, which is on /opt/PixInsight/bin after a normal installation. Or you can run the /bin/PixInsight script, also created by the installer program by default.
Juan Conejero
PixInsight Development Team
http://pixinsight.com/

Offline lazjen

  • Newcomer
  • Posts: 8
Re: Unable to start PixInsight on Linux system
« Reply #3 on: 2017 January 25 03:02:05 »
Thanks for the reply, however I don't think that's it.

chrisr@coffee ~ $ PixInsight
/opt/PixInsight/bin/PixInsight: /opt/PixInsight/bin/lib/libz.so.1: version `ZLIB_1.2.9' not found (required by /usr/lib64/libpng16.so.16)
chrisr@coffee ~ $ which PixInsight
/bin/PixInsight
chrisr@coffee ~ $ file /bin/PixInsight
/bin/PixInsight: Bourne-Again shell script, ASCII text executable
chrisr@coffee ~ $ /opt/PixInsight/bin/PixInsight.sh
/opt/PixInsight/bin/PixInsight: /opt/PixInsight/bin/lib/libz.so.1: version `ZLIB_1.2.9' not found (required by /usr/lib64/libpng16.so.16)


One system was a new, clean install, the other an existing install that was previously working.  The common thing between them is an up to date Gentoo install.

I also can't work out why it's referring to libpng16 when there's a libpng15 in the PixInsight lib directory.


Offline copello

  • PTeam Member
  • Newcomer
  • Posts: 31
Re: Unable to start PixInsight on Linux system
« Reply #4 on: 2017 January 25 04:38:54 »
Hi Chris,

it looks to me that there are incompatibilities between your libpng/libz and PixInsight-libz versions.
When setting (exporting) all the library paths as in
Code: [Select]
/opt/PixInsight/bin/PixInsight.shand executing:
Code: [Select]
>ldd /opt/PixInsight/bin/PixInsight I get:

Code: [Select]
linux-vdso.so.1 (0x00007ffe6e238000)
libSM.so.6 => /usr/lib/x86_64-linux-gnu/libSM.so.6 (0x00007ff914f68000)
...
libz.so.1 => /opt/PixInsight/bin/lib/libz.so.1 (0x00007ff9126b8000)
...
libpng12.so.0 => /lib/x86_64-linux-gnu/libpng12.so.0 (0x00007ff90c390000)
...

and checking:
Code: [Select]
>ldd /lib/x86_64-linux-gnu/libpng12.so.0gives:
Code: [Select]
linux-vdso.so.1 (0x00007fffbc2d0000)
libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007fcd43fd8000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fcd43cd0000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fcd43920000)
/lib64/ld-linux-x86-64.so.2 (0x00007fcd44420000)

So it looks that:
Code: [Select]
PixInsight -> [libz.so.1]/opt/PixInsight/bin/lib/libz.so.1, [libpng12.so.0]/lib/x86_64-linux-gnu/libpng12.so.0 -> [libz.so.1]/lib/x86_64-linux-gnu/libz.so.1
On my Debian Jessie I have the following libz versions:
Code: [Select]
>locate libz.so.1           
/lib/x86_64-linux-gnu/libz.so.1
/lib/x86_64-linux-gnu/libz.so.1.2.8
/opt/PixInsight/bin/lib/libz.so.1
/opt/PixInsight/bin/lib/libz.so.1.2.7

How about downgrading the Gentoo zlib package (though on Gentoo this usually requires to recompile the universe) to version 1.2.7 or 1.2.8,
or trying to downgrade your libpng package to a lower version?

Cheers
 Thomas
« Last Edit: 2017 January 25 04:50:09 by copello »

Offline lazjen

  • Newcomer
  • Posts: 8
Re: Unable to start PixInsight on Linux system
« Reply #5 on: 2017 February 03 13:46:31 »
Thanks for that.  I don't want to downgrade the libraries, so for now I'll just use it on Windows until it eventually gets updated again.  Not ideal, but I don't want to mess with the system to such a degree for one piece of software.

Offline lazjen

  • Newcomer
  • Posts: 8
[SOLVED] Re: Unable to start PixInsight on Linux system
« Reply #6 on: 2017 August 05 23:49:57 »
An update to this problem, in case someone else has the same issue.

The issue has nothing to do with zlib at all, it's problems with certain versions of libpng.

To get PixInsight working again, mask your libpng to stop versions >1.6.27 (this one currently works).

I'm still a bit puzzled why this is happening, as PixInsight ships with its own libpng in the bin/lib directory.  However, at least I can get back to using PI under Linux again.

Offline Cheyenne

  • PixInsight Addict
  • ***
  • Posts: 146
    • Link to Picasa gallery of my astronomy photos
Re: [SOLVED] Unable to start PixInsight on Linux system
« Reply #7 on: 2017 August 08 06:09:05 »
I was having the same problem (gentoo platform as well).

My solution was to simply rename the libz.so file in PixInsight's bin/lib directory (e.g. cd PixInsight/bin/lib;mv libz.so.1 libz.so.1.xx ). 

Everything seems to work okay...
Code: [Select]
$ pwd
        ~/bin/PixInsight/bin

$ export LD_LIBRARY_PATH=${PWD}/lib:$LD_LIBRARY_PATH

$ ldd PixInsight|grep -i libz
libz.so.1 => /lib64/libz.so.1 (0x00007f0e617b8000)
$ ldd PixInsight|grep -i png
libpng16.so.16 => /usr/lib64/libpng16.so.16 (0x00007fe94b9cc000)


$ ls -l lib/libpng*
               19 Feb  6  2017 lib/libpng15.so -> libpng15.so.15.13.0
               19 Feb  6  2017 lib/libpng15.so.15 -> libpng15.so.15.13.0
       179296 Nov 30  2015 lib/libpng15.so.15.13.0
               11 Feb  6  2017 lib/libpng.so -> libpng15.so

$ ls -l lib/libz*
        90632 May 19  2016 lib/libz.so.1.2.7
               13 Feb  6  2017 lib/libz.so.1.xx -> libz.so.1.2.7
               13 Feb  6  2017 lib/libz.so.xx -> libz.so.1.2.7

It looks like the problem is that PixInsight is not pulling in the "correct version" of libpng (it's pulling in the one found in the system lib directory).  Just doing a grep for png.so in the PixInsight bin directory shows that there is nothing directly pulling in libpng, so it's some more digging it appears that at  the QT libraries are the culprit:

Code: [Select]
libQt5WebEngineCore.so
./libQt5WebEngineCore.so: PixInsight/bin/lib/libz.so.1: version `ZLIB_1.2.9' not found (required by /usr/lib64/libpng16.so.16)
libpng16.so.16 => /usr/lib64/libpng16.so.16 (0x00007f9be9f96000)
libQt5WebEngine.so
./libQt5WebEngine.so: PixInsight/bin/lib/libz.so.1: version `ZLIB_1.2.9' not found (required by /usr/lib64/libpng16.so.16)
libpng16.so.16 => /usr/lib64/libpng16.so.16 (0x00007fcf940f2000)
libQt5WebEngineWidgets.so
./libQt5WebEngineWidgets.so: PixInsight/bin/lib/libz.so.1: version `ZLIB_1.2.9' not found (required by /usr/lib64/libpng16.so.16)
libpng16.so.16 => /usr/lib64/libpng16.so.16 (0x00007f7f0c052000)

Doing a strings against one of the above produces:
Code: [Select]
$ strings libQt5WebEngineCore.so|grep libpng
Application built with libpng-
libpng version 1.6.22 - May 26, 2016
 libpng version 1.6.22 - May 26, 2016
gamma value does not match libpng estimate
png_process_data_skip is not implemented in any current version of libpng
libpng does not support gamma+background+rgb_to_gray

$ strings qt-plugins/platforms/libqminimalegl.so|grep libpng
libpng warning: %s
libpng error: %s
invalid window size (libpng)
Application built with libpng-
libpng version 1.6.28 - January 5, 2017
 libpng version 1.6.28 - January 5, 2017
gamma value does not match libpng estimate
libpng does not support gamma+background+rgb_to_gray
png_get_libpng_ver





On my current gentoo system libpng is media-libs/libpng-1.6.29 and zlib is sys-libs/zlib-1.2.11



 
Cheyenne Wills
Takahashi 130 TOA
Losmandy G11
SBIG STF8300M
Canon 20Da
SBIG ST-i + openPHD for autoguiding

Offline lazjen

  • Newcomer
  • Posts: 8
Re: [SOLVED] Unable to start PixInsight on Linux system
« Reply #8 on: 2017 August 08 23:44:00 »
That's a pretty good solution.  I'll have to try it sometime.  I hate masking packages so this is a much better approach.

Offline ihowarth

  • Newcomer
  • Posts: 15
Re: [SOLVED] Unable to start PixInsight on Linux system
« Reply #9 on: 2017 September 04 03:38:04 »
Same problem after an upgrade to Mageia6 (zlib1.2.9).   Cheyenne's fix work for me

Offline Tertsi

  • Newcomer
  • Posts: 16
Re: [SOLVED] Unable to start PixInsight on Linux system
« Reply #10 on: 2017 September 04 05:08:53 »
I have a same problem in Fedora 26. Cheyenne's fix didn't work for me. Any suggestions?

Edit: Fix did work in Fedora 26, I may have skipped some step earlier.
« Last Edit: 2017 September 05 00:25:02 by Tertsi »

Offline aireland

  • Newcomer
  • Posts: 1
Re: [SOLVED] Unable to start PixInsight on Linux system
« Reply #11 on: 2017 October 31 11:46:46 »
Cheyenne's fix worked here today on Arch linux.  :)

Offline jpaana

  • Newcomer
  • Posts: 13
Re: [SOLVED] Unable to start PixInsight on Linux system
« Reply #12 on: 2017 November 02 01:18:28 »
On Ubuntu 17.10 had to rename both libstdc++.so.6 and libz.so.1, works now.

Offline lazjen

  • Newcomer
  • Posts: 8
Re: [SOLVED] Unable to start PixInsight on Linux system
« Reply #13 on: 2017 November 02 03:53:09 »
I should probably update that this fix also worked for me too.  Since the problem seems to be spreading to other distributions, I wonder if we could get a proper update for the problem?

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
Quote
Since the problem seems to be spreading to other distributions, I wonder if we could get a proper update for the problem?

I'll try to fix this problem as soon as possible with a new version release. Sorry for the inconvenience.
Juan Conejero
PixInsight Development Team
http://pixinsight.com/