I want to install ggalt
package which needs proj4
package installed, but when I install proj4
it throws an error libproj and/or proj_api.h not found in standard search locations
.
My computer is Mac, and I have installed PROJ.4
using brew install proj
, and the version of R is 3.6.0_2
. I searched on the Internet for this problem but didn't find a method to solve it. I'm not a coder and just begin to learn R, so I don't know how to do now.
The error shows as below:
* installing *source* package ‘proj4’ ...
** package ‘proj4’ successfully unpacked and MD5 sums checked
** using staged installation
checking for gcc... clang
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether clang accepts -g... yes
checking for clang option to accept ISO C89... none needed
checking how to run the C preprocessor... clang -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ANSI C header files... rm: conftest.dSYM: is a directory
rm: conftest.dSYM: is a directory
yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking proj_api.h usability... no
checking proj_api.h presence... no
checking for proj_api.h... no
checking for pj_init_plus in -lproj... yes
configure: error: libproj and/or proj_api.h not found in standard search locations.
*** Install PROJ.4 and if necessary set PKG_CPPFLAGS/PKG_LIBS accordingly.
ERROR: configuration failed for package ‘proj4’
* removing ‘/usr/local/lib/R/3.6/site-library/proj4’
The downloaded source packages are in
‘/private/var/folders/sn/1d6n55qs0zl522kcc769jq5h0000gn/T/RtmpNOkU64/downloaded_packages’