Cran-R package png libpng-config: missing command

Hello,
When installing the imager package, the png dependency is required.

When installing the imager package, the png dependency is required.
This installation returns the following message (sorry, it’s in French…):

installation de la dépendance ‘png’

essai de l'URL 'https://stat.ethz.ch/CRAN/src/contrib/png_0.1-9.tar.gz'
essai de l'URL 'https://stat.ethz.ch/CRAN/src/contrib/readbitmap_0.1.5.tar.gz'
* installing *source* package ‘png’ ...
** this is package ‘png’ version ‘0.1-9’
** package ‘png’ correctement décompressé et sommes MD5 vérifiées
** using staged installation
** libs
using C compiler: ‘gcc (SUSE Linux) 15.2.1 20260202’
gcc -I"/usr/lib64/R/include" -DNDEBUG   -I/usr/local/include    `libpng-config --cflags` -fpic  -O2 -Wall -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -flto=auto -g  -c dummy.c -o dummy.o
/usr/bin/bash: ligne 1: libpng-config: commande introuvable
gcc -I"/usr/lib64/R/include" -DNDEBUG   -I/usr/local/include    `libpng-config --cflags` -fpic  -O2 -Wall -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -flto=auto -g  -c read.c -o read.o
/usr/bin/bash: ligne 1: libpng-config: commande introuvable
read.c:3:10: erreur fatale: png.h : Aucun fichier ou dossier de ce nom
    3 | #include <png.h>
      |          ^~~~~~~
compilation terminée.

Do you have any ideas on how to resolve this issue?

Best regards,
D.

Do you have libpng12-compat-devel or libpng16-compat-devel installed?

Thank you for your quick response.

After checking what was already installed, I chose libpng16-compat-devel.

And everything works great!

Very efficient!

Have a good evening
MERCI!
D

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.