ggplot2在Mac上导致段错误

时间:2017-05-08 18:44:39

标签: r macos plot ggplot2

这个问题有几个报告都在2到3年前发生:

caught segfault error in R

Problems loading packages (ie. ggplot2) on R 3.2.2 caught segfault address 0x18, cause 'memory not mapped' [duplicate]

他们中的大多数都是指较旧的系统版本和较旧的ggplot2版本。我想知道是否有人找到了建议的R重新安装的替代解决方案(显然这对每个人都不起作用)?

我在Mac 10.11.6上尝试从R(R CMD INSTALL)内部或外部安装ggp​​lot2时,我得到了段错误:

*** caught segfault ***
address 0x18, cause 'memory not mapped'

使用ggplot2版本可以重现相同的内容:

  

1.0.0,1.0.1,2.0.0,2.1.0,2.2.0

我在新的R-3.3.2会话上测试过。安装过程中出错,而不是在加载过程中出现。

收到回溯:

 Traceback:
 1: dyn.load(file, DLLpath = DLLpath, ...)
 2: library.dynam(lib, package, package.lib)
 3: loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]])
 4: asNamespace(ns)
 5: namespaceImportFrom(ns, loadNamespace(j <- i[[1L]], c(lib.loc,     .libPaths()), versionCheck = vI[[j]]), i[[2L]], from = package)
 6: loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]])
 7: namespaceImport(ns, loadNamespace(i, c(lib.loc, .libPaths()),     versionCheck = vI[[i]]), from = package)
 8: loadNamespace(package, lib.loc, keep.source, partial = TRUE)
 9: withCallingHandlers(expr, packageStartupMessage = function(c) invokeRestart("muffleMessage"))
10: suppressPackageStartupMessages(loadNamespace(package, lib.loc,     keep.source, partial = TRUE))
11: code2LazyLoadDB(package, lib.loc = lib.loc, keep.source = keep.source,     compress = compress)
12: makeLazyLoading(pkg_name, lib, keep.source = keep.source)
13: doTryCatch(return(expr), name, parentenv, handler)
14: tryCatchOne(expr, names, parentenv, handlers[[1L]])
15: tryCatchList(expr, classes, parentenv, handlers)
16: tryCatch(expr, error = function(e) {    call <- conditionCall(e)    if (!is.null(call)) {        if (identical(call[[1L]], quote(doTryCatch)))             call <- sys.call(-4L)        dcall <- deparse(call)[1L]        prefix <- paste("Error in", dcall, ": ")        LONG <- 75L        msg <- conditionMessage(e)        sm <- strsplit(msg, "\n")[[1L]]        w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w")        if (is.na(w))             w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L],                 type = "b")        if (w > LONG)             prefix <- paste0(prefix, "\n  ")    }    else prefix <- "Error : "    msg <- paste0(prefix, conditionMessage(e), "\n")    .Internal(seterrmessage(msg[1L]))    if (!silent && identical(getOption("show.error.messages"),         TRUE)) {        cat(msg, file = stderr())        .Internal(printDeferredWarnings())    }    invisible(structure(msg, class = "try-error", condition = e))})
17: try({    suppressPackageStartupMessages(.getRequiredPackages(quietly = TRUE))    makeLazyLoading(pkg_name, lib, keep.source = keep.source)})
18: do_install_source(pkg_name, instdir, pkg, desc)
19: do_install(pkg)
20: tools:::.install_packages()
An irrecoverable exception occurred. R is aborting now ...
/Users/username/miniconda3/lib/R/bin/INSTALL: line 34:  2049 Done                    echo 'tools:::.install_packages()'
      2050 Segmentation fault: 11  | R_DEFAULT_PACKAGES= LC_COLLATE=C "${R_HOME}/bin/R" $myArgs --slave --args ${args}

重现,开始新的R会话并安装&#39; ggplot2&#39;用:

$ R
> install.packages('ggplot2')

会话信息:

> sessionInfo()
R version 3.3.2 (2016-10-31)
Platform: x86_64-apple-darwin11.4.2 (64-bit)
Running under: OS X 10.11.6 (El Capitan)

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base 

任何建议都将不胜感激。

0 个答案:

没有答案