r-spatial / sf

Simple Features for R
https://r-spatial.github.io/sf/
Other
1.35k stars 299 forks source link

Segmentation failt (core dumped) when install package sf #2396

Closed LeDinhGiaHuy closed 6 months ago

LeDinhGiaHuy commented 6 months ago

Hi, I opened the R console in Ubuntu 22, and then install sf package but got this issue. Can anyone help me on this?

`> install.packages("sf")

Downloading packages -------------------------------------------------------

Successfully downloaded 1 package in 3.3 seconds.

The following package(s) will be installed:

These packages will be installed into "~/Documents/network/renv/library/R-4.1/x86_64-pc-linux-gnu".

Do you want to proceed? [Y/n]: y

Installing packages --------------------------------------------------------

/usr/lib/R/bin/R --vanilla -s -f '/tmp/RtmpWOkmsN/renv-install-72da35734eaa.R'

==============================================================================

*** caught segfault *** address 0x643127a079bf, cause 'memory not mapped' An irrecoverable exception occurred. R is aborting now ... Segmentation fault (core dumped) Error: error testing if 'sf' can be loaded [error code 139] Traceback (most recent calls last): 14: install.packages("sf") 13: install(pkgs) 12: renv_install_impl(records) 11: renv_install_staged(records) 10: renv_install_default(records) 9: handler(package, renv_install_package(record)) 8: renv_install_package(record) 7: withCallingHandlers(renv_install_package_impl(record), error = function(e) writef("FAILED")) 6: renv_install_package_impl(record) 5: withCallingHandlers(if (isbin) renv_install_test(package), error = function(err) unlink(installpath, recursive = TRUE)) 4: renv_install_test(package) 3: renv_system_exec(command = R(), args = c("--vanilla", "-s", "-f", renv_shell_path(script)), action = sprintf("testing if '%s' can be loaded", package)) 2: abort(sprintf("error %s [error code %i]", action, status), body = renv_system_exec_details(command, args, output)) 1: stop(fallback) > `
edzer commented 6 months ago

Package renv does something to your R session that makes it impossible (in some cases?) to install or reinstall sf, and doesn't take responsibility to fix this for you. Search the sf issues for renv, or the renv issues for sf.