I tried to install leaflet package by following ways:
- install.packages("leaflet")
- by using the R studio package manager
But i am failed. please help me.
I tried to install leaflet package by following ways:
share the error message.
install.packages("leaflet")
Installing package into ‘/home/satyam/R/x86_64-pc-linux-gnu-library/3.4’
(as ‘lib’ is unspecified)
Warning in install.packages :
dependency ‘raster’ is not available
also installing the dependency ‘png’
downloaded 24 KB
downloaded 1.9 MB
libpng-config --cflags
-fpic -g -O2 -fdebug-prefix-map=/build/r-base-AitvI6/r-base-3.4.4=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c read.c -o read.oThe downloaded source packages are in
‘/tmp/RtmpR0rRob/downloaded_packages’
I'm not sure on this one, but the error message mentions it can't find "lib" (where it would install the package) and then can't find another package that the one you are installing relies upon. My starting point would be checking whether the lib / package directory is set correctly. Sorry I'm not sure what exactly it would be though.
It seems you are missing a system dependency (libpng), you haven't tell us on which operating system are you so I can't give you any specific advice but you can Google how to install it in your system
My operation system is ubuntu 18. i installed libpng dependency but still facing same issue.
Have you also installed libpng-dev
? the file png.h
seems to come from there.