简体   繁体   中英

namespace load failed for ‘sf’ (R package) , unable to load shared object

I am attempting to install R 'sf' on a Centos machine. After extended problems with gdal (now fixed by building from source), I now get:

Error: package or namespace load failed for ‘sf’ in dyn.load(file, DLLpath = DLLpath, ...):

unable to load shared object '/home/my_user_name/R/x86_64-redhat-linux-gnu- library/3.4/sf/libs/sf.so': /home/my_user_name/R/x86_64-redhat-linux-gnu-library/3.4/sf/libs/sf.so: undefined symbol: ZN15OGRMultiSurface18CastToMultiPolygonEPS

How can I resolve this error?

So, this problem was apparently caused by my manual install of gdal not correctly linking to geos.

So I just reinstalled gdal following these instructions ( https://trac.osgeo.org/gdal/wiki/BuildingOnUnix ) with --with-geos=yes as a flag to ./configure.

This solved the problem.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM