r - RMongo 安装失败,在 Ubuntu 中出现分段错误



在过去的几个小时里,我一直在尝试安装具有以下输出的RMongo软件包:

> install.packages("RMongo")
Installing package into ‘/usr/local/lib/R/site-library’
(as ‘lib’ is unspecified)
--- Please select a CRAN mirror for use in this session ---
trying URL 'https://repo.bppt.go.id/cran/src/contrib/RMongo_0.0.25.tar.gz'
Content type 'application/x-gzip' length 4169519 bytes (4.0 MB)
==================================================
downloaded 4.0 MB
* installing *source* package ‘RMongo’ ...
** package ‘RMongo’ successfully unpacked and MD5 sums checked
** R
** inst
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded
Segmentation fault (core dumped)
ERROR: loading failed
* removing ‘/usr/local/lib/R/site-library/RMongo’
The downloaded source packages are in
‘/tmp/RtmpHZoomn/downloaded_packages’
Warning message:
In install.packages("RMongo") :
installation of package ‘RMongo’ had non-zero exit status

我还发现了尝试安装xlsx的相同错误。

我不知道过去的发行版有什么变化,因为我已经在 Ubuntu 16.04.2 和 Ubuntu 17.04 上尝试过这个,结果是一样的。

这是 Ubuntu 16.04.2 发行版中 R 环境的描述:

> sessionInfo()
R version 3.4.0 (2017-04-21)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 16.04.2 LTS
Matrix products: default
BLAS: /usr/lib/libblas/libblas.so.3.6.0
LAPACK: /usr/lib/lapack/liblapack.so.3.6.0
locale:
[1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C              
[3] LC_TIME=es_ES.UTF-8        LC_COLLATE=en_US.UTF-8    
[5] LC_MONETARY=es_ES.UTF-8    LC_MESSAGES=en_US.UTF-8   
[7] LC_PAPER=es_ES.UTF-8       LC_NAME=C                 
[9] LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=es_ES.UTF-8 LC_IDENTIFICATION=C       
attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     
loaded via a namespace (and not attached):
[1] compiler_3.4.0 tools_3.4.0    tcltk_3.4.0

知道会发生什么吗?

linux-image-3.13.0-121-generic 和 linux-image-4.4.0-81-generic 包含对 Stack Clash 漏洞的修复。

请小心内核更新,这些更新可修复此漏洞。当前的补丁破坏了许多Java(sun/oracle和openjdk)应用程序。请参阅错误 #1699772:linux-image-4.4.0-81-generic,linux-image-3.13.0-121-generic 回归:许多用户空间应用程序崩溃。解决方案是使用旧内核(linux-image-3.13.0-119-generic in Trusty)临时重新启动系统。

Ubuntu内核开发人员将在几天内准备新的补丁。

更新:最新更新(至少是 image-4.4.0-83-generic、linux-image-4.8.0-58-generic、linux-image-4.10.0-26-generic)修复了此漏洞和用户空间程序的问题。

这并不能回答我在使用 RMongo 时遇到的问题,但为我解决了问题,所以我希望它能有用。

我继续做一些测试。由于这个问题是在 RMongo 突然停止工作时开始的,并且考虑到我有一个类似的安装可以正常工作,我开始比较两种环境。

我已经检查过,在出现故障的系统中,执行了一些软件更新(您可以在下面检查它们):

The following NEW packages will be installed
libmircommon7 libmircore1 linux-headers-4.4.0-81 linux-headers-4.4.0-81-generic linux-image-4.4.0-81-generic
linux-image-extra-4.4.0-81-generic
The following packages will be upgraded:
click firefox firefox-locale-en flashplugin-installer gir1.2-click-0.4 google-chrome-stable grub-common grub-pc
grub-pc-bin grub2-common libc-bin libc-dev-bin libc6 libc6:i386 libc6-dbg libc6-dev libclick-0.4-0 libepoxy0
libgnutls-openssl27 libgnutls30 libmirclient9 libmircookie2 libmirprotobuf3 libmwaw-0.3-3 libnss3 libnss3-nssdb
libqt5concurrent5 libqt5core5a libqt5dbus5 libqt5gui5 libqt5network5 libqt5opengl5 libqt5printsupport5 libqt5sql5
libqt5sql5-sqlite libqt5test5 libqt5widgets5 libqt5xml5 libssl-dev libssl-doc libssl1.0.0 libvlc5 libvlccore8
libzzip-0-13 linux-firmware linux-headers-generic linux-image-generic linux-libc-dev locales multiarch-support
openssl python3-click-package vlc vlc-data vlc-nox vlc-plugin-notify vlc-plugin-samba

所以,我一一检查了这个包,原来问题的根源是新的内核4.4.0-81

为了确保这是问题的根源,我使用笔记本电脑中以前版本的内核启动了 Ubuntu 发行版:4.4.0-79

这是安装的结果:

> install.packages("RMongo")
Installing package into ‘/usr/local/lib/R/site-library’
(as ‘lib’ is unspecified)
--- Please select a CRAN mirror for use in this session ---
trying URL 'https://pbil.univ-lyon1.fr/CRAN/src/contrib/RMongo_0.0.25.tar.gz'
Content type 'application/x-gzip' length 4169519 bytes (4.0 MB)
==================================================
downloaded 4.0 MB
* installing *source* package ‘RMongo’ ...
** package ‘RMongo’ successfully unpacked and MD5 sums checked
** R
** inst
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded
* DONE (RMongo)
The downloaded source packages are in
‘/tmp/RtmpJScKfz/downloaded_packages’
> install.packages("xlsx")
Installing package into ‘/usr/local/lib/R/site-library’
(as ‘lib’ is unspecified)
trying URL 'https://pbil.univ-lyon1.fr/CRAN/src/contrib/xlsx_0.5.7.tar.gz'
Content type 'application/x-gzip' length 312839 bytes (305 KB)
==================================================
downloaded 305 KB
* installing *source* package ‘xlsx’ ...
** package ‘xlsx’ successfully unpacked and MD5 sums checked
** R
** inst
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** installing vignettes
** testing if installed package can be loaded
* DONE (xlsx)
The downloaded source packages are in
‘/tmp/RtmpJScKfz/downloaded_packages’

xlsxRMongo这两个软件包现在都已成功安装并正常工作。

我还检查了xlsxRMongo之间的关系,恐怕下面的问题是rJava(共同依赖)。事实上,为了确保这一点,我已经用其他依赖于rJava的软件包(RWeka)进行了测试,我遇到了同样的问题,在更改内核版本后解决了。

== 更新 ==

上次内核更新(从 4.4.0-81 到 4.4.0-83)后,问题已修复。

同样的问题(至少对于软件包"xlsx")发生在内核为3.13.0-121通用的Ubuntu 14.04 LTS中。使用以前的内核(3.13.0-119 通用)引导时,安装工作并加载库。

更新:问题似乎在 Ubuntu 14.04 LTS 中通过新内核 3.13.0-123 通用得到解决

相关内容

  • 没有找到相关文章

最新更新