我想安装
我的电脑是Mac,并且已经使用
下面是错误信息:
ggalt
程序包,但需要先安装proj4
程序包。然而,当我安装proj4
时,出现错误信息:libproj和/或proj_api.h未在标准搜索位置找到
。我的电脑是Mac,并且已经使用
brew install proj
安装了PROJ.4
,R的版本是3.6.0_2
。我在互联网上搜索了这个问题,但没有找到解决方法。作为一名初学者,我不知道该怎么做。下面是错误信息:
* 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’
proj
包含所需的proj_api.h
吗?它在哪里?使用brew ls --verbose proj
命令可以帮助回答这些问题。 - Ralf Stubnerproj_api.h
is located in/usr/local/Cellar/proj/6.1.0/include/proj_api.h
- jubyproj4
包之前将环境变量PKG_CPPFLAGS
定义为-I/usr/local/Cellar/proj/6.1.0/include/
? - Ralf Stubnerexport PKG_CPPFLAGS="-I/usr/local/Cellar/proj/6.1.0/include"
和Sys.setenv("PKG_CPPFLAGS"="-I/usr/local/Cellar/proj/6.1.0/include")
,但是没有起作用。 - juby