Closed nakashimatakaya closed 2 weeks ago
Hi, have you managed to solve this? Same issue here.
you need to install libpng
it depends on your platform and many more parameters (if you want to compile C code, you should be able to set up your platform 😛). For me, on macos, I used:
brew install libpng
Then I configured the file ~/.R/Makevars
. Mine is actually this one:
LOC=/usr/local/Cellar/gcc/14.2.0_1
CC=$(LOC)/bin/gcc-14 -fopenmp
CXX=$(LOC)/bin/g++-14 -fopenmp
CXX11=$(LOC)/bin/g++-14 -fopenmp
CFLAGS=-I/usr/local/include
CPPFLAGS=-I/usr/local/include
CXXFLAGS=-I/usr/local/include
CXX11FLAGS=-I/usr/local/include
LDFLAGS=-L/usr/local/lib
You may need to adapt it, I don't know if you have gcc-14 for example
thanks so much, I'll try!
Hello,
I encountered a compilation error while attempting to install the rvg package on macOS after updated R version 4.3.2 (2023-10-31). Here is the error message I received:
`raster.cpp:6:10: fatal error: 'png.h' file not found
include
1 error generated. make: *** [raster.o] Error 1 ERROR: compilation failed for package ‘rvg’ `
This issue occurred during the installation process, indicating that the png.h header file could not be found. It seems like a dependency problem related to the libpng library, which is required for compiling the rvg package.
I have attempted to resolve this issue by ensuring that libpng is installed on my system, but the problem persists. Below are the steps I have taken:
Checked to ensure that libpng is installed and up to date.
I would greatly appreciate any advice on resolving this issue or any additional steps I should take to troubleshoot further.
Thank you for your help.