2

So I have already attempted the solutions that were posted here, and I still get the same issue even after reinstalling QGIS: libpng problems for QGIS

I keep getting the following error message:

libpng warning: Application was compiled with png.h from libpng-1.6.36
libpng warning: Application  is  running with png.c from libpng-1.2.56
libpng error: Incompatible libpng version in application and library

And then when I try to open anything with QGIS, it crashes and then I get this message in the terminal:

libpng warning: Application jmp_buf size changed
QGIS died on signal 11Could not attach to process.  If your uid matches the uid of the target
process, check the setting of /proc/sys/kernel/yama/ptrace_scope, or try
again as the root user.  For more details, see /etc/sysctl.d/10-ptrace.conf
ptrace: Opération non permise.
No thread selected
No stack.
gdb returned 256
Abandon (core dumped)

I have tried to rebuild GDAL, which I have installed from source, with updated libpng headers, but that didn't fix my issues. I also installed QGIS from the following apt repository:

Atteint :8 https://qgis.org/ubuntu disco InRelease   

And with my installed QGIS, I tried the following command, and I got nothing back:

ldd `which qgis` | grep png

I am at a loss as to what to do, short of completely reininstalling Ubuntu. Has anyone else encountered this issue and found a way to fix it?

EDIT: This is not a duplicate question because there are additional error messages that came with this particular issue, and the fixes that addressed the previous so-called "duplicate" question, as I stated before, did not work. If they worked, and if there weren't also new error messages that make this situation different, then I wouldn't be asking it.

  • Most probably you have to self-compile QGIS as well. – AndreJ Aug 8 at 11:07
  • I was hoping this would not be the thing I would have to do, but if it fixes QGIS then so be it. – R. M. Spies Aug 8 at 14:42
  • See also gis.stackexchange.com/questions/313294/… with all comments below my answer.Try to install libpng-dev first, then rebuild GDAL. Turns out that rebuilding QGIS was not necessary in my ECW case. Or remove any self-compiled GDAL stuff if possible. – AndreJ Aug 8 at 19:22
1

So I have managed to fix this with the help of another friend, and this was a critical step that was missed in any previous answers to this genre of error in QGIS. Basically, when reinstalling GDAL with updated libpng headers, you have to use the following commands after installing libpng-dev if you have installed GDAL from source like I've had to:

make clean
./configure
make
sudo make install

And sometimes you need to relink your lib files to get all your system files in working order. This has been helpful for my friend and I both:

cd /usr/lib
sudo ln -sf /path/to/compiled/libgdal/files/libgdal.so.20something libgdal.so.20

I hope this additional second step clears up this error for anyone else who's had to install GDAL from source.

  • make clean is a kind of prerequisite for all self-compiled stuff. Alternatively to the relink I copy the new compiled files from /usr/local/lib to /usr/lib to make sure that the package libs are overwritten. But glad to see that you got it running. – AndreJ Aug 9 at 16:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.