Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unable to install R package 'tmap' for 3.4.3 issue with 'sf' & 'gdal' for CentoS 7 #949

Closed
phanirg opened this issue Jan 16, 2019 · 4 comments

Comments

@phanirg
Copy link

phanirg commented Jan 16, 2019

installing to /opt/microsoft/rclient/3.4.3/runtime/R/site-library/sf/libs
** R
** data
** demo
** inst
** preparing package for lazy loading
in method for ‘dbWriteTable’ with signature ‘"PostgreSQLConnection","character","sf"’: no definition for
in method for ‘dbDataType’ with signature ‘"PostgreSQLConnection","sf"’: no definition for class “Postgr
in method for ‘coerce’ with signature ‘"Spatial","sf"’: no definition for class “Spatial”
in method for ‘coerce’ with signature ‘"Spatial","sfc"’: no definition for class “Spatial”
in method for ‘coerce’ with signature ‘"sf","Spatial"’: no definition for class “Spatial”
in method for ‘coerce’ with signature ‘"sfc","Spatial"’: no definition for class “Spatial”
in method for ‘coerce’ with signature ‘"XY","Spatial"’: no definition for class “Spatial”
** help
*** installing help indices
** building package indices
** installing vignettes
** testing if installed package can be loaded
Error: package or namespace load failed for ‘sf’ in dyn.load(file, DLLpath = DLLpath, ...):
unable to load shared object '/opt/microsoft/rclient/3.4.3/runtime/R/site-library/sf/libs/sf.so':
/opt/microsoft/rclient/3.4.3/runtime/R/site-library/sf/libs/sf.so: undefined symbol: _ZN10OGRFeature20
Error: loading failed
Execution halted
ERROR: loading failed

  • removing ‘/opt/microsoft/rclient/3.4.3/runtime/R/site-library/sf’
    ERROR: dependency ‘sf’ is not available for package ‘lwgeom’
  • removing ‘/opt/microsoft/rclient/3.4.3/runtime/R/site-library/lwgeom’

The downloaded source packages are in

Warning messages:
1: In install.packages("lwgeom", configure.args = "--with-gdal-config=/usr/local/bin/gdal-config --with-ith-proj-include=/usr/local/include --with-proj-lib=/usr/local/lib --with-proj-share=/usr/local/share/pr
installation of package ‘sf’ had non-zero exit status
2: In install.packages("lwgeom", configure.args = "--with-gdal-config=/usr/local/bin/gdal-config --with-ith-proj-include=/usr/local/include --with-proj-lib=/usr/local/lib --with-proj-share=/usr/local/share/pr
installation of package ‘lwgeom’ had non-zero exit status

@rsbivand
Copy link
Member

Which versions of GDAL, GEOS, and PROJ are installed? How were they installed? See older closed issues such as #815, and follow the advice in the README section on Multiple GDAL, GEOS and/or PROJ versions on your system and #844 for the issue leading up to it.

@phanirg
Copy link
Author

phanirg commented Jan 16, 2019

geos-3.6.2, proj-4.9.3, gdal-2.2.4.
Followed those issues, but still getting the same error.
For RHEL7, there is no proper info. on this

@rsbivand
Copy link
Member

For source installs, the burden is on you. You have not confirmed that you checked and that these versions are the only ones on your system. With duplicate GDAL, your symptoms are that you compiled sf against the one pointed to by gdal-config, but linked at run time against another.

@pat-s
Copy link
Member

pat-s commented Feb 15, 2019

You may try this solution and see if it works for you.

@edzer edzer closed this as completed Mar 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants