在 macOS 上更新 gdal 后安装 R 包 sf 0.9.0 时出错

Dan*_*anO 4 macos r gdal rgdal r-sf

我已经sfrprojMac上工作,直到永远,因为还是升级到卡塔利娜/ R 3.6.2工作。

我尝试sf从 CRAN 和开发版本中安装最新版本的(0.9.0),但两种方式都出现错误,configure: error: libproj not found in standard or given locations.

我已经检查并删除了计算机上 gdal 和 proj 的最后痕迹,卸载了两者,重新安装,但仍然是同样的问题。现在,尝试安装sf我知道在我的计算机上工作的旧版本(0.8.1) 也失败了。完全被这里难住了!

GDAL 2.4.4,2020/01/08 发布

R v3.6.2

macOS 10.15.3

configure: CC: clang
configure: CXX: clang++ -std=gnu++11
checking for gdal-config... /usr/local/bin/gdal-config
checking gdal-config usability... yes
configure: GDAL: 2.4.4
checking GDAL version >= 2.0.1... yes
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... 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 gdal.h usability... yes
checking gdal.h presence... yes
checking for gdal.h... yes
checking GDAL: linking with --libs only... yes
checking GDAL: /usr/local/Cellar/gdal/2.4.4_2/share/gdal/pcs.csv readable... yes
checking GDAL: checking whether PROJ is available for linking:... yes
checking GDAL: checking whether PROJ is available fur running:... yes
configure: GDAL: 2.4.4
checking proj.h usability... yes
checking proj.h presence... yes
checking for proj.h... yes
checking PROJ: checking whether PROJ and sqlite3 are available for linking:... no
configure: error: libproj not found in standard or given locations.
Run Code Online (Sandbox Code Playgroud)

rgdal...

* installing *source* package ‘rgdal’ ...
** package ‘rgdal’ successfully unpacked and MD5 sums checked
** using staged installation
configure: R_HOME: /Library/Frameworks/R.framework/Resources
configure: CC: clang
configure: CXX: clang++ -std=gnu++11
configure: C++11 support available
configure: rgdal: 1.4-7
checking for /usr/bin/svnversion... yes
configure: svn revision: 845
checking for gdal-config... /usr/local/bin/gdal-config
checking gdal-config usability... yes
configure: GDAL: 2.4.4
checking C++11 support for GDAL >= 2.3.0... yes
checking GDAL version >= 1.11.4... yes
checking GDAL version <= 2.5 or >= 3.0... yes
checking gdal: linking with --libs only... yes
checking GDAL: gdal-config data directory readable... yes
checking GDAL: /usr/local/Cellar/gdal/2.4.4_2/share/gdal/pcs.csv readable... yes
configure: pkg-config proj not available
  set PKG_CONFIG_PATH to the directory containing proj.pc
configure: PROJ version not determined using pkg-config proj
configure: proj CPP flags:  -I/usr/local/Cellar/gdal/2.4.4_2/include
configure: PROJ LIBS:  -lproj
checking PROJ header API:... proj_api.h
checking proj_api.h presence and usability... no
configure: error: proj_api.h not found in standard or given locations.
ERROR: configuration failed for package ‘rgdal’
* removing ‘/Library/Frameworks/R.framework/Versions/3.6/Resources/library/rgdal
Run Code Online (Sandbox Code Playgroud)

Dan*_*anO 6

终于找到了几个小时的挖掘后的解决方案在这里,如果其他人遇到这个问题。

  • 谢谢,这个解决方案在几个小时的沮丧之后拯救了我。您能否接受自己的答案,以便将这篇文章记录为“已解决”? (2认同)

归档时间:

查看次数:

934 次

最近记录:

4 年,7 月 前