在 Mac OS X Lion 上安装 rgeos 和 rgdal 时出现问题

发布于 2024-12-01 13:55:51 字数 15408 浏览 0 评论 0 原文

我正在尝试安装 rgeos 包(和 rgdal)包。我有一台运行 os x 10.7.1 的 macbook pro,并且有最新版本的 R 2.13.1。我按照此网站的说明进行操作:http://lostingeospace。 blogspot.com/2011/08/rgeos-on-macos-x.html

我已经从 http://www.kyngchaos.com/software:frameworks 并已下载源文件 rgeos_0.1- 8.tar.gz 来自 CRAN。

在终端中,我按照说明输入以下内容:

R64 CMD INSTALL /Users/Pascal/Downloads/rgeos_0.1-8.tar.gz --configure-args='--with-geos-config=/Library/Frameworks/GEOS.framework/unix/bin/geos-config'

为了彻底起见,这里是整个输出:

    * installing to library ‘/Users/Pascal/Library/R/2.13/library’
* installing *source* package ‘rgeos’ ...
geos-config: /Library/Frameworks/GEOS.framework/unix/bin/geos-config
GEOS: 3.3.0
CPPFLAGS: -DHAVEUNARYUNION -I/Library/Frameworks/GEOS.framework/Versions/3/unix/include
LIBS: -L/Library/Frameworks/GEOS.framework/Versions/3/unix/lib -lgeos
configure: creating ./config.status
config.status: creating src/Makevars
** libs
*** arch - x86_64
gcc-4.2 -arch x86_64 -std=gnu99 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/x86_64 -DHAVEUNARYUNION -I/Library/Frameworks/GEOS.framework/Versions/3/unix/include -I/usr/local/include -I"/Users/Pascal/Library/R/2.13/library/sp/include"   -fPIC  -g -O2 -c gpc_geos.c -o gpc_geos.o
gcc-4.2 -arch x86_64 -std=gnu99 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/x86_64 -DHAVEUNARYUNION -I/Library/Frameworks/GEOS.framework/Versions/3/unix/include -I/usr/local/include -I"/Users/Pascal/Library/R/2.13/library/sp/include"   -fPIC  -g -O2 -c init.c -o init.o
gcc-4.2 -arch x86_64 -std=gnu99 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/x86_64 -DHAVEUNARYUNION -I/Library/Frameworks/GEOS.framework/Versions/3/unix/include -I/usr/local/include -I"/Users/Pascal/Library/R/2.13/library/sp/include"   -fPIC  -g -O2 -c local_stubs.c -o local_stubs.o
gcc-4.2 -arch x86_64 -std=gnu99 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/x86_64 -DHAVEUNARYUNION -I/Library/Frameworks/GEOS.framework/Versions/3/unix/include -I/usr/local/include -I"/Users/Pascal/Library/R/2.13/library/sp/include"   -fPIC  -g -O2 -c rgeos.c -o rgeos.o
gcc-4.2 -arch x86_64 -std=gnu99 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/x86_64 -DHAVEUNARYUNION -I/Library/Frameworks/GEOS.framework/Versions/3/unix/include -I/usr/local/include -I"/Users/Pascal/Library/R/2.13/library/sp/include"   -fPIC  -g -O2 -c rgeos_R2geos.c -o rgeos_R2geos.o
gcc-4.2 -arch x86_64 -std=gnu99 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/x86_64 -DHAVEUNARYUNION -I/Library/Frameworks/GEOS.framework/Versions/3/unix/include -I/usr/local/include -I"/Users/Pascal/Library/R/2.13/library/sp/include"   -fPIC  -g -O2 -c rgeos_bbox.c -o rgeos_bbox.o
gcc-4.2 -arch x86_64 -std=gnu99 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/x86_64 -DHAVEUNARYUNION -I/Library/Frameworks/GEOS.framework/Versions/3/unix/include -I/usr/local/include -I"/Users/Pascal/Library/R/2.13/library/sp/include"   -fPIC  -g -O2 -c rgeos_buffer.c -o rgeos_buffer.o
gcc-4.2 -arch x86_64 -std=gnu99 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/x86_64 -DHAVEUNARYUNION -I/Library/Frameworks/GEOS.framework/Versions/3/unix/include -I/usr/local/include -I"/Users/Pascal/Library/R/2.13/library/sp/include"   -fPIC  -g -O2 -c rgeos_coord.c -o rgeos_coord.o
gcc-4.2 -arch x86_64 -std=gnu99 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/x86_64 -DHAVEUNARYUNION -I/Library/Frameworks/GEOS.framework/Versions/3/unix/include -I/usr/local/include -I"/Users/Pascal/Library/R/2.13/library/sp/include"   -fPIC  -g -O2 -c rgeos_geos2R.c -o rgeos_geos2R.o
gcc-4.2 -arch x86_64 -std=gnu99 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/x86_64 -DHAVEUNARYUNION -I/Library/Frameworks/GEOS.framework/Versions/3/unix/include -I/usr/local/include -I"/Users/Pascal/Library/R/2.13/library/sp/include"   -fPIC  -g -O2 -c rgeos_misc.c -o rgeos_misc.o
rgeos_misc.c: In function ‘rgeos_area’:
rgeos_misc.c:5: warning: passing argument 4 of ‘rgeos_miscfunc’ from incompatible pointer type
rgeos_misc.c: In function ‘rgeos_length’:
rgeos_misc.c:9: warning: passing argument 4 of ‘rgeos_miscfunc’ from incompatible pointer type
rgeos_misc.c: In function ‘rgeos_distance’:
rgeos_misc.c:51: warning: passing argument 5 of ‘rgeos_distancefunc’ from incompatible pointer type
rgeos_misc.c: In function ‘rgeos_hausdorffdistance’:
rgeos_misc.c:55: warning: passing argument 5 of ‘rgeos_distancefunc’ from incompatible pointer type
rgeos_misc.c: In function ‘rgeos_hausdorffdistancedensify’:
rgeos_misc.c:137: warning: passing argument 6 of ‘rgeos_distancedensifyfunc’ from incompatible pointer type
gcc-4.2 -arch x86_64 -std=gnu99 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/x86_64 -DHAVEUNARYUNION -I/Library/Frameworks/GEOS.framework/Versions/3/unix/include -I/usr/local/include -I"/Users/Pascal/Library/R/2.13/library/sp/include"   -fPIC  -g -O2 -c rgeos_poly2nb.c -o rgeos_poly2nb.o
rgeos_poly2nb.c: In function ‘cb’:
rgeos_poly2nb.c:11: warning: cast from pointer to integer of different size
rgeos_poly2nb.c: In function ‘rgeos_poly_findInBox’:
rgeos_poly2nb.c:53: warning: cast to pointer from integer of different size
rgeos_poly2nb.c:62: warning: passing argument 4 of ‘GEOSSTRtree_query_r’ from incompatible pointer type
rgeos_poly2nb.c: In function ‘rgeos_binary_STRtree_query’:
rgeos_poly2nb.c:127: warning: cast to pointer from integer of different size
rgeos_poly2nb.c:151: warning: passing argument 4 of ‘GEOSSTRtree_query_r’ from incompatible pointer type
rgeos_poly2nb.c: In function ‘rgeos_unary_STRtree_query’:
rgeos_poly2nb.c:213: warning: cast to pointer from integer of different size
rgeos_poly2nb.c:222: warning: passing argument 4 of ‘GEOSSTRtree_query_r’ from incompatible pointer type
rgeos_poly2nb.c:242: warning: cast to pointer from integer of different size
gcc-4.2 -arch x86_64 -std=gnu99 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/x86_64 -DHAVEUNARYUNION -I/Library/Frameworks/GEOS.framework/Versions/3/unix/include -I/usr/local/include -I"/Users/Pascal/Library/R/2.13/library/sp/include"   -fPIC  -g -O2 -c rgeos_predicate_binary.c -o rgeos_predicate_binary.o
rgeos_predicate_binary.c: In function ‘rgeos_intersects’:
rgeos_predicate_binary.c:94: warning: passing argument 5 of ‘rgeos_binpredfunc’ from incompatible pointer type
rgeos_predicate_binary.c: In function ‘rgeos_contains’:
rgeos_predicate_binary.c:97: warning: passing argument 5 of ‘rgeos_binpredfunc’ from incompatible pointer type
rgeos_predicate_binary.c: In function ‘rgeos_disjoint’:
rgeos_predicate_binary.c:100: warning: passing argument 5 of ‘rgeos_binpredfunc’ from incompatible pointer type
rgeos_predicate_binary.c: In function ‘rgeos_touches’:
rgeos_predicate_binary.c:103: warning: passing argument 5 of ‘rgeos_binpredfunc’ from incompatible pointer type
rgeos_predicate_binary.c: In function ‘rgeos_crosses’:
rgeos_predicate_binary.c:106: warning: passing argument 5 of ‘rgeos_binpredfunc’ from incompatible pointer type
rgeos_predicate_binary.c: In function ‘rgeos_within’:
rgeos_predicate_binary.c:109: warning: passing argument 5 of ‘rgeos_binpredfunc’ from incompatible pointer type
rgeos_predicate_binary.c: In function ‘rgeos_overlaps’:
rgeos_predicate_binary.c:112: warning: passing argument 5 of ‘rgeos_binpredfunc’ from incompatible pointer type
rgeos_predicate_binary.c: In function ‘rgeos_equals’:
rgeos_predicate_binary.c:115: warning: passing argument 5 of ‘rgeos_binpredfunc’ from incompatible pointer type
rgeos_predicate_binary.c: In function ‘rgeos_relate’:
rgeos_predicate_binary.c:118: warning: passing argument 5 of ‘rgeos_binpredfunc’ from incompatible pointer type
rgeos_predicate_binary.c: In function ‘rgeos_binpredfunc’:
rgeos_predicate_binary.c:149: warning: comparison of distinct pointer types lacks a cast
rgeos_predicate_binary.c:169: warning: comparison of distinct pointer types lacks a cast
gcc-4.2 -arch x86_64 -std=gnu99 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/x86_64 -DHAVEUNARYUNION -I/Library/Frameworks/GEOS.framework/Versions/3/unix/include -I/usr/local/include -I"/Users/Pascal/Library/R/2.13/library/sp/include"   -fPIC  -g -O2 -c rgeos_predicate_unary.c -o rgeos_predicate_unary.o
rgeos_predicate_unary.c: In function ‘rgeos_isvalid’:
rgeos_predicate_unary.c:4: warning: passing argument 4 of ‘rgeos_unarypredfunc’ from incompatible pointer type
rgeos_predicate_unary.c: In function ‘rgeos_issimple’:
rgeos_predicate_unary.c:8: warning: passing argument 4 of ‘rgeos_unarypredfunc’ from incompatible pointer type
rgeos_predicate_unary.c: In function ‘rgeos_isring’:
rgeos_predicate_unary.c:12: warning: passing argument 4 of ‘rgeos_unarypredfunc’ from incompatible pointer type
rgeos_predicate_unary.c: In function ‘rgeos_hasz’:
rgeos_predicate_unary.c:16: warning: passing argument 4 of ‘rgeos_unarypredfunc’ from incompatible pointer type
rgeos_predicate_unary.c: In function ‘rgeos_isempty’:
rgeos_predicate_unary.c:20: warning: passing argument 4 of ‘rgeos_unarypredfunc’ from incompatible pointer type
gcc-4.2 -arch x86_64 -std=gnu99 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/x86_64 -DHAVEUNARYUNION -I/Library/Frameworks/GEOS.framework/Versions/3/unix/include -I/usr/local/include -I"/Users/Pascal/Library/R/2.13/library/sp/include"   -fPIC  -g -O2 -c rgeos_topology.c -o rgeos_topology.o
rgeos_topology.c: In function ‘rgeos_envelope’:
rgeos_topology.c:5: warning: passing argument 5 of ‘rgeos_topologyfunc’ from incompatible pointer type
rgeos_topology.c: In function ‘rgeos_convexhull’:
rgeos_topology.c:9: warning: passing argument 5 of ‘rgeos_topologyfunc’ from incompatible pointer type
rgeos_topology.c: In function ‘rgeos_boundary’:
rgeos_topology.c:13: warning: passing argument 5 of ‘rgeos_topologyfunc’ from incompatible pointer type
rgeos_topology.c: In function ‘rgeos_getcentroid’:
rgeos_topology.c:17: warning: passing argument 5 of ‘rgeos_topologyfunc’ from incompatible pointer type
rgeos_topology.c: In function ‘rgeos_pointonsurface’:
rgeos_topology.c:21: warning: passing argument 5 of ‘rgeos_topologyfunc’ from incompatible pointer type
rgeos_topology.c: In function ‘rgeos_linemerge’:
rgeos_topology.c:25: warning: passing argument 5 of ‘rgeos_topologyfunc’ from incompatible pointer type
rgeos_topology.c: In function ‘rgeos_unioncascaded’:
rgeos_topology.c:29: warning: passing argument 5 of ‘rgeos_topologyfunc’ from incompatible pointer type
rgeos_topology.c: In function ‘rgeos_unaryunion’:
rgeos_topology.c:36: warning: passing argument 5 of ‘rgeos_topologyfunc’ from incompatible pointer type
rgeos_topology.c: In function ‘rgeos_topologyfunc’:
rgeos_topology.c:66: warning: comparison of distinct pointer types lacks a cast
rgeos_topology.c: In function ‘rgeos_polygonize’:
rgeos_topology.c:142: warning: passing argument 2 of ‘GEOSPolygonizer_getCutEdges_r’ from incompatible pointer type
rgeos_topology.c:143: warning: passing argument 2 of ‘GEOSPolygonize_r’ from incompatible pointer type
    gcc-4.2 -arch x86_64 -std=gnu99 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/x86_64 -DHAVEUNARYUNION -I/Library/Frameworks/GEOS.framework/Versions/3/unix/include -I/usr/local/include -I"/Users/Pascal/Library/R/2.13/library/sp/include"   -fPIC  -g -O2 -c rgeos_topology_binary.c -o rgeos_topology_binary.o
rgeos_topology_binary.c: In function ‘rgeos_difference’:
rgeos_topology_binary.c:4: warning: passing argument 6 of ‘rgeos_binarytopologyfunc’ from incompatible pointer type
rgeos_topology_binary.c: In function ‘rgeos_symdifference’:
rgeos_topology_binary.c:7: warning: passing argument 6 of ‘rgeos_binarytopologyfunc’ from incompatible pointer type
rgeos_topology_binary.c: In function ‘rgeos_intersection’:
rgeos_topology_binary.c:10: warning: passing argument 6 of ‘rgeos_binarytopologyfunc’ from incompatible pointer type
rgeos_topology_binary.c: In function ‘rgeos_union’:
rgeos_topology_binary.c:13: warning: passing argument 6 of ‘rgeos_binarytopologyfunc’ from incompatible pointer type
gcc-4.2 -arch x86_64 -std=gnu99 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/x86_64 -DHAVEUNARYUNION -I/Library/Frameworks/GEOS.framework/Versions/3/unix/include -I/usr/local/include -I"/Users/Pascal/Library/R/2.13/library/sp/include"   -fPIC  -g -O2 -c rgeos_validate.c -o rgeos_validate.o
 gcc-4.2 -arch x86_64 -std=gnu99 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/x86_64 -DHAVEUNARYUNION -I/Library/Frameworks/GEOS.framework/Versions/3/unix/include -I/usr/local/include -I"/Users/Pascal/Library/R/2.13/library/sp/include"   -fPIC  -g -O2 -c rgeos_wkt.c -o rgeos_wkt.o
    gcc-4.2 -arch x86_64 -std=gnu99 -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -L/usr/local/lib -o rgeos.so gpc_geos.o init.o local_stubs.o rgeos.o rgeos_R2geos.o rgeos_bbox.o rgeos_buffer.o rgeos_coord.o rgeos_geos2R.o rgeos_misc.o rgeos_poly2nb.o rgeos_predicate_binary.o rgeos_predicate_unary.o rgeos_topology.o rgeos_topology_binary.o rgeos_validate.o rgeos_wkt.o -L/Library/Frameworks/GEOS.framework/Versions/3/unix/lib -lgeos -lgeos_c -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation
    ld: warning: ignoring file /usr/local/lib/libgeos.dylib, missing required architecture x86_64 in file
    ld: warning: ignoring file /usr/local/lib/libgeos_c.dylib, missing required architecture x86_64 in file
    installing to /Users/Pascal/Library/R/2.13/library/rgeos/libs/x86_64
    ** R
    ** inst
    ** preparing package for lazy loading
    ** help
    *** installing help indices
    ** building package indices ...
    ** testing if installed package can be loaded
    Error in dyn.load(file, DLLpath = DLLpath, ...) : 
      unable to load shared object '/Users/Pascal/Library/R/2.13/library/rgeos/libs/x86_64/rgeos.so':
      dlopen(/Users/Pascal/Library/R/2.13/library/rgeos/libs/x86_64/rgeos.so, 6): Symbol not found: _GEOSArea_r
      Referenced from: /Users/Pascal/Library/R/2.13/library/rgeos/libs/x86_64/rgeos.so
      Expected in: flat namespace
     in /Users/Pascal/Library/R/2.13/library/rgeos/libs/x86_64/rgeos.so
    Error: loading failed
    Execution halted
    ERROR: loading failed
    * removing ‘/Users/Pascal/Library/R/2.13/library/rgeos’
    * restoring previous ‘/Users/Pascal/Library/R/2.13/library/rgeos’

rgdal 安装也出现同样的问题。

我不是一个真正的程序员......有人知道我应该做什么吗?

谢谢!

I'm trying to install the rgeos package (and the rgdal) package. I have a macbook pro running os x 10.7.1 and I have the latest version of R, 2.13.1. I am following the instructions from this site: http://lostingeospace.blogspot.com/2011/08/rgeos-on-macos-x.html

I have installed the latest GDAL complete framework 1.8 from http://www.kyngchaos.com/software:frameworks and have downloaded the source file rgeos_0.1-8.tar.gz from CRAN.

In terminal, I input the following, as per the instructions:

R64 CMD INSTALL /Users/Pascal/Downloads/rgeos_0.1-8.tar.gz --configure-args='--with-geos-config=/Library/Frameworks/GEOS.framework/unix/bin/geos-config'

To be thorough, here is the entire output:

    * installing to library ‘/Users/Pascal/Library/R/2.13/library’
* installing *source* package ‘rgeos’ ...
geos-config: /Library/Frameworks/GEOS.framework/unix/bin/geos-config
GEOS: 3.3.0
CPPFLAGS: -DHAVEUNARYUNION -I/Library/Frameworks/GEOS.framework/Versions/3/unix/include
LIBS: -L/Library/Frameworks/GEOS.framework/Versions/3/unix/lib -lgeos
configure: creating ./config.status
config.status: creating src/Makevars
** libs
*** arch - x86_64
gcc-4.2 -arch x86_64 -std=gnu99 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/x86_64 -DHAVEUNARYUNION -I/Library/Frameworks/GEOS.framework/Versions/3/unix/include -I/usr/local/include -I"/Users/Pascal/Library/R/2.13/library/sp/include"   -fPIC  -g -O2 -c gpc_geos.c -o gpc_geos.o
gcc-4.2 -arch x86_64 -std=gnu99 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/x86_64 -DHAVEUNARYUNION -I/Library/Frameworks/GEOS.framework/Versions/3/unix/include -I/usr/local/include -I"/Users/Pascal/Library/R/2.13/library/sp/include"   -fPIC  -g -O2 -c init.c -o init.o
gcc-4.2 -arch x86_64 -std=gnu99 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/x86_64 -DHAVEUNARYUNION -I/Library/Frameworks/GEOS.framework/Versions/3/unix/include -I/usr/local/include -I"/Users/Pascal/Library/R/2.13/library/sp/include"   -fPIC  -g -O2 -c local_stubs.c -o local_stubs.o
gcc-4.2 -arch x86_64 -std=gnu99 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/x86_64 -DHAVEUNARYUNION -I/Library/Frameworks/GEOS.framework/Versions/3/unix/include -I/usr/local/include -I"/Users/Pascal/Library/R/2.13/library/sp/include"   -fPIC  -g -O2 -c rgeos.c -o rgeos.o
gcc-4.2 -arch x86_64 -std=gnu99 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/x86_64 -DHAVEUNARYUNION -I/Library/Frameworks/GEOS.framework/Versions/3/unix/include -I/usr/local/include -I"/Users/Pascal/Library/R/2.13/library/sp/include"   -fPIC  -g -O2 -c rgeos_R2geos.c -o rgeos_R2geos.o
gcc-4.2 -arch x86_64 -std=gnu99 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/x86_64 -DHAVEUNARYUNION -I/Library/Frameworks/GEOS.framework/Versions/3/unix/include -I/usr/local/include -I"/Users/Pascal/Library/R/2.13/library/sp/include"   -fPIC  -g -O2 -c rgeos_bbox.c -o rgeos_bbox.o
gcc-4.2 -arch x86_64 -std=gnu99 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/x86_64 -DHAVEUNARYUNION -I/Library/Frameworks/GEOS.framework/Versions/3/unix/include -I/usr/local/include -I"/Users/Pascal/Library/R/2.13/library/sp/include"   -fPIC  -g -O2 -c rgeos_buffer.c -o rgeos_buffer.o
gcc-4.2 -arch x86_64 -std=gnu99 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/x86_64 -DHAVEUNARYUNION -I/Library/Frameworks/GEOS.framework/Versions/3/unix/include -I/usr/local/include -I"/Users/Pascal/Library/R/2.13/library/sp/include"   -fPIC  -g -O2 -c rgeos_coord.c -o rgeos_coord.o
gcc-4.2 -arch x86_64 -std=gnu99 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/x86_64 -DHAVEUNARYUNION -I/Library/Frameworks/GEOS.framework/Versions/3/unix/include -I/usr/local/include -I"/Users/Pascal/Library/R/2.13/library/sp/include"   -fPIC  -g -O2 -c rgeos_geos2R.c -o rgeos_geos2R.o
gcc-4.2 -arch x86_64 -std=gnu99 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/x86_64 -DHAVEUNARYUNION -I/Library/Frameworks/GEOS.framework/Versions/3/unix/include -I/usr/local/include -I"/Users/Pascal/Library/R/2.13/library/sp/include"   -fPIC  -g -O2 -c rgeos_misc.c -o rgeos_misc.o
rgeos_misc.c: In function ‘rgeos_area’:
rgeos_misc.c:5: warning: passing argument 4 of ‘rgeos_miscfunc’ from incompatible pointer type
rgeos_misc.c: In function ‘rgeos_length’:
rgeos_misc.c:9: warning: passing argument 4 of ‘rgeos_miscfunc’ from incompatible pointer type
rgeos_misc.c: In function ‘rgeos_distance’:
rgeos_misc.c:51: warning: passing argument 5 of ‘rgeos_distancefunc’ from incompatible pointer type
rgeos_misc.c: In function ‘rgeos_hausdorffdistance’:
rgeos_misc.c:55: warning: passing argument 5 of ‘rgeos_distancefunc’ from incompatible pointer type
rgeos_misc.c: In function ‘rgeos_hausdorffdistancedensify’:
rgeos_misc.c:137: warning: passing argument 6 of ‘rgeos_distancedensifyfunc’ from incompatible pointer type
gcc-4.2 -arch x86_64 -std=gnu99 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/x86_64 -DHAVEUNARYUNION -I/Library/Frameworks/GEOS.framework/Versions/3/unix/include -I/usr/local/include -I"/Users/Pascal/Library/R/2.13/library/sp/include"   -fPIC  -g -O2 -c rgeos_poly2nb.c -o rgeos_poly2nb.o
rgeos_poly2nb.c: In function ‘cb’:
rgeos_poly2nb.c:11: warning: cast from pointer to integer of different size
rgeos_poly2nb.c: In function ‘rgeos_poly_findInBox’:
rgeos_poly2nb.c:53: warning: cast to pointer from integer of different size
rgeos_poly2nb.c:62: warning: passing argument 4 of ‘GEOSSTRtree_query_r’ from incompatible pointer type
rgeos_poly2nb.c: In function ‘rgeos_binary_STRtree_query’:
rgeos_poly2nb.c:127: warning: cast to pointer from integer of different size
rgeos_poly2nb.c:151: warning: passing argument 4 of ‘GEOSSTRtree_query_r’ from incompatible pointer type
rgeos_poly2nb.c: In function ‘rgeos_unary_STRtree_query’:
rgeos_poly2nb.c:213: warning: cast to pointer from integer of different size
rgeos_poly2nb.c:222: warning: passing argument 4 of ‘GEOSSTRtree_query_r’ from incompatible pointer type
rgeos_poly2nb.c:242: warning: cast to pointer from integer of different size
gcc-4.2 -arch x86_64 -std=gnu99 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/x86_64 -DHAVEUNARYUNION -I/Library/Frameworks/GEOS.framework/Versions/3/unix/include -I/usr/local/include -I"/Users/Pascal/Library/R/2.13/library/sp/include"   -fPIC  -g -O2 -c rgeos_predicate_binary.c -o rgeos_predicate_binary.o
rgeos_predicate_binary.c: In function ‘rgeos_intersects’:
rgeos_predicate_binary.c:94: warning: passing argument 5 of ‘rgeos_binpredfunc’ from incompatible pointer type
rgeos_predicate_binary.c: In function ‘rgeos_contains’:
rgeos_predicate_binary.c:97: warning: passing argument 5 of ‘rgeos_binpredfunc’ from incompatible pointer type
rgeos_predicate_binary.c: In function ‘rgeos_disjoint’:
rgeos_predicate_binary.c:100: warning: passing argument 5 of ‘rgeos_binpredfunc’ from incompatible pointer type
rgeos_predicate_binary.c: In function ‘rgeos_touches’:
rgeos_predicate_binary.c:103: warning: passing argument 5 of ‘rgeos_binpredfunc’ from incompatible pointer type
rgeos_predicate_binary.c: In function ‘rgeos_crosses’:
rgeos_predicate_binary.c:106: warning: passing argument 5 of ‘rgeos_binpredfunc’ from incompatible pointer type
rgeos_predicate_binary.c: In function ‘rgeos_within’:
rgeos_predicate_binary.c:109: warning: passing argument 5 of ‘rgeos_binpredfunc’ from incompatible pointer type
rgeos_predicate_binary.c: In function ‘rgeos_overlaps’:
rgeos_predicate_binary.c:112: warning: passing argument 5 of ‘rgeos_binpredfunc’ from incompatible pointer type
rgeos_predicate_binary.c: In function ‘rgeos_equals’:
rgeos_predicate_binary.c:115: warning: passing argument 5 of ‘rgeos_binpredfunc’ from incompatible pointer type
rgeos_predicate_binary.c: In function ‘rgeos_relate’:
rgeos_predicate_binary.c:118: warning: passing argument 5 of ‘rgeos_binpredfunc’ from incompatible pointer type
rgeos_predicate_binary.c: In function ‘rgeos_binpredfunc’:
rgeos_predicate_binary.c:149: warning: comparison of distinct pointer types lacks a cast
rgeos_predicate_binary.c:169: warning: comparison of distinct pointer types lacks a cast
gcc-4.2 -arch x86_64 -std=gnu99 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/x86_64 -DHAVEUNARYUNION -I/Library/Frameworks/GEOS.framework/Versions/3/unix/include -I/usr/local/include -I"/Users/Pascal/Library/R/2.13/library/sp/include"   -fPIC  -g -O2 -c rgeos_predicate_unary.c -o rgeos_predicate_unary.o
rgeos_predicate_unary.c: In function ‘rgeos_isvalid’:
rgeos_predicate_unary.c:4: warning: passing argument 4 of ‘rgeos_unarypredfunc’ from incompatible pointer type
rgeos_predicate_unary.c: In function ‘rgeos_issimple’:
rgeos_predicate_unary.c:8: warning: passing argument 4 of ‘rgeos_unarypredfunc’ from incompatible pointer type
rgeos_predicate_unary.c: In function ‘rgeos_isring’:
rgeos_predicate_unary.c:12: warning: passing argument 4 of ‘rgeos_unarypredfunc’ from incompatible pointer type
rgeos_predicate_unary.c: In function ‘rgeos_hasz’:
rgeos_predicate_unary.c:16: warning: passing argument 4 of ‘rgeos_unarypredfunc’ from incompatible pointer type
rgeos_predicate_unary.c: In function ‘rgeos_isempty’:
rgeos_predicate_unary.c:20: warning: passing argument 4 of ‘rgeos_unarypredfunc’ from incompatible pointer type
gcc-4.2 -arch x86_64 -std=gnu99 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/x86_64 -DHAVEUNARYUNION -I/Library/Frameworks/GEOS.framework/Versions/3/unix/include -I/usr/local/include -I"/Users/Pascal/Library/R/2.13/library/sp/include"   -fPIC  -g -O2 -c rgeos_topology.c -o rgeos_topology.o
rgeos_topology.c: In function ‘rgeos_envelope’:
rgeos_topology.c:5: warning: passing argument 5 of ‘rgeos_topologyfunc’ from incompatible pointer type
rgeos_topology.c: In function ‘rgeos_convexhull’:
rgeos_topology.c:9: warning: passing argument 5 of ‘rgeos_topologyfunc’ from incompatible pointer type
rgeos_topology.c: In function ‘rgeos_boundary’:
rgeos_topology.c:13: warning: passing argument 5 of ‘rgeos_topologyfunc’ from incompatible pointer type
rgeos_topology.c: In function ‘rgeos_getcentroid’:
rgeos_topology.c:17: warning: passing argument 5 of ‘rgeos_topologyfunc’ from incompatible pointer type
rgeos_topology.c: In function ‘rgeos_pointonsurface’:
rgeos_topology.c:21: warning: passing argument 5 of ‘rgeos_topologyfunc’ from incompatible pointer type
rgeos_topology.c: In function ‘rgeos_linemerge’:
rgeos_topology.c:25: warning: passing argument 5 of ‘rgeos_topologyfunc’ from incompatible pointer type
rgeos_topology.c: In function ‘rgeos_unioncascaded’:
rgeos_topology.c:29: warning: passing argument 5 of ‘rgeos_topologyfunc’ from incompatible pointer type
rgeos_topology.c: In function ‘rgeos_unaryunion’:
rgeos_topology.c:36: warning: passing argument 5 of ‘rgeos_topologyfunc’ from incompatible pointer type
rgeos_topology.c: In function ‘rgeos_topologyfunc’:
rgeos_topology.c:66: warning: comparison of distinct pointer types lacks a cast
rgeos_topology.c: In function ‘rgeos_polygonize’:
rgeos_topology.c:142: warning: passing argument 2 of ‘GEOSPolygonizer_getCutEdges_r’ from incompatible pointer type
rgeos_topology.c:143: warning: passing argument 2 of ‘GEOSPolygonize_r’ from incompatible pointer type
    gcc-4.2 -arch x86_64 -std=gnu99 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/x86_64 -DHAVEUNARYUNION -I/Library/Frameworks/GEOS.framework/Versions/3/unix/include -I/usr/local/include -I"/Users/Pascal/Library/R/2.13/library/sp/include"   -fPIC  -g -O2 -c rgeos_topology_binary.c -o rgeos_topology_binary.o
rgeos_topology_binary.c: In function ‘rgeos_difference’:
rgeos_topology_binary.c:4: warning: passing argument 6 of ‘rgeos_binarytopologyfunc’ from incompatible pointer type
rgeos_topology_binary.c: In function ‘rgeos_symdifference’:
rgeos_topology_binary.c:7: warning: passing argument 6 of ‘rgeos_binarytopologyfunc’ from incompatible pointer type
rgeos_topology_binary.c: In function ‘rgeos_intersection’:
rgeos_topology_binary.c:10: warning: passing argument 6 of ‘rgeos_binarytopologyfunc’ from incompatible pointer type
rgeos_topology_binary.c: In function ‘rgeos_union’:
rgeos_topology_binary.c:13: warning: passing argument 6 of ‘rgeos_binarytopologyfunc’ from incompatible pointer type
gcc-4.2 -arch x86_64 -std=gnu99 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/x86_64 -DHAVEUNARYUNION -I/Library/Frameworks/GEOS.framework/Versions/3/unix/include -I/usr/local/include -I"/Users/Pascal/Library/R/2.13/library/sp/include"   -fPIC  -g -O2 -c rgeos_validate.c -o rgeos_validate.o
 gcc-4.2 -arch x86_64 -std=gnu99 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/x86_64 -DHAVEUNARYUNION -I/Library/Frameworks/GEOS.framework/Versions/3/unix/include -I/usr/local/include -I"/Users/Pascal/Library/R/2.13/library/sp/include"   -fPIC  -g -O2 -c rgeos_wkt.c -o rgeos_wkt.o
    gcc-4.2 -arch x86_64 -std=gnu99 -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -L/usr/local/lib -o rgeos.so gpc_geos.o init.o local_stubs.o rgeos.o rgeos_R2geos.o rgeos_bbox.o rgeos_buffer.o rgeos_coord.o rgeos_geos2R.o rgeos_misc.o rgeos_poly2nb.o rgeos_predicate_binary.o rgeos_predicate_unary.o rgeos_topology.o rgeos_topology_binary.o rgeos_validate.o rgeos_wkt.o -L/Library/Frameworks/GEOS.framework/Versions/3/unix/lib -lgeos -lgeos_c -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation
    ld: warning: ignoring file /usr/local/lib/libgeos.dylib, missing required architecture x86_64 in file
    ld: warning: ignoring file /usr/local/lib/libgeos_c.dylib, missing required architecture x86_64 in file
    installing to /Users/Pascal/Library/R/2.13/library/rgeos/libs/x86_64
    ** R
    ** inst
    ** preparing package for lazy loading
    ** help
    *** installing help indices
    ** building package indices ...
    ** testing if installed package can be loaded
    Error in dyn.load(file, DLLpath = DLLpath, ...) : 
      unable to load shared object '/Users/Pascal/Library/R/2.13/library/rgeos/libs/x86_64/rgeos.so':
      dlopen(/Users/Pascal/Library/R/2.13/library/rgeos/libs/x86_64/rgeos.so, 6): Symbol not found: _GEOSArea_r
      Referenced from: /Users/Pascal/Library/R/2.13/library/rgeos/libs/x86_64/rgeos.so
      Expected in: flat namespace
     in /Users/Pascal/Library/R/2.13/library/rgeos/libs/x86_64/rgeos.so
    Error: loading failed
    Execution halted
    ERROR: loading failed
    * removing ‘/Users/Pascal/Library/R/2.13/library/rgeos’
    * restoring previous ‘/Users/Pascal/Library/R/2.13/library/rgeos’

The same exact problem arises with the rgdal installation.

I'm not really a programmer....Does anyone have any idea what I should do?

Thanks!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

动听の歌 2024-12-08 13:55:52

我知道一些 geo mac 二进制文件保存在 stats.ox.ac.uk 上,但我无法访问 Lion 机器进行测试。尝试:

install.packages(c('rgdal','rgeos'),repos="http://www.stats.ox.ac.uk/pub/RWin")

如果这不起作用...您需要在 64 位下工作吗?尝试使用 R CMD INSTALL 进行安装。

I know that some geo mac binaries are kept at stats.ox.ac.uk, but I don't have access to a lion machine to test. Try:

install.packages(c('rgdal','rgeos'),repos="http://www.stats.ox.ac.uk/pub/RWin")

If that doesn't work... Do you need to work in 64 bit? try installing with R CMD INSTALL.

青柠芒果 2024-12-08 13:55:52

通过首先像您一样安装 GDAL 框架,我已经成功地让两者在 MacOSX Lion 中工作。

我已经从终端中的源代码安装了 rgdal,与

sudo R64 CMD install rgdal_0.7-1.tar.gz --configure-args='--with-gdal-config=/Library/Frameworks/GDAL.framework/unix/bin/gdal-config --with-proj-include=/Library/Frameworks/PROJ.framework/unix/include --with-proj-lib=/Library/Frameworks/PROJ.framework/unix/lib'

rgeos 类似:

sudo R64 CMD INSTALL rgeos_0.1-8.tar.gz --configure-args='--with-geos-config=/Library/Frameworks/GEOS.framework/unix/bin/geos-config'

请注意,我的所有 R 软件包都是在系统级别安装的,因此 --configure-args=' 中给出说明按原样工作。

I've managed to get both working in MacOSX Lion by first installing the GDAL frameworks the same as you.

I've installed rgdal from source in the terminal with

sudo R64 CMD install rgdal_0.7-1.tar.gz --configure-args='--with-gdal-config=/Library/Frameworks/GDAL.framework/unix/bin/gdal-config --with-proj-include=/Library/Frameworks/PROJ.framework/unix/include --with-proj-lib=/Library/Frameworks/PROJ.framework/unix/lib'

Similarly with rgeos:

sudo R64 CMD INSTALL rgeos_0.1-8.tar.gz --configure-args='--with-geos-config=/Library/Frameworks/GEOS.framework/unix/bin/geos-config'

As a note, all of my R packages are installed at the system level, so the --configure-args=' as given in the instructions work as is.

2024-12-08 13:55:52

尽管根据 Jim M 使用了正确的配置参数,但我在安装 rgdal 时遇到了类似的(如果不是完全相同的)问题。但是,我能够让 rgdal 0.6.33 正常工作(该版本在 KyngChaos 上分发,网址为: http://www.kyngchaos.com/files/software/frameworks/rgdal-0.6.33-3.zip)。

如果可以的话,显然让 0.7-1 工作更好,但这可能是一个临时解决方案(抱歉,我不知道 0.7-1 失败的原因)。我也在 OS X 10.7.1 上运行 64 位 R。

希望有帮助。

更新:看起来您引用的站点也安装了 0.6 版本的 rgdal。

I had a similar, if not identical problem when installing rgdal, despite using the proper configure args per Jim M. However, I was able to get rgdal 0.6.33 to work (the version is distributed on KyngChaos at: http://www.kyngchaos.com/files/software/frameworks/rgdal-0.6.33-3.zip).

Obviously better to get 0.7-1 to work if you can, but this may be a temporary solution (and sorry I don't know the cause of 0.7-1 failing). I'm also on OS X 10.7.1 running 64-bit R.

Hope that helps.

UPDATE: It looks like the site you're referencing also installed a 0.6 release of rgdal.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文