我已经花了很长时间在闪亮的服务器上安装XML。它目前已安装,但我无法将其安装在单独的用户上,有光泽或使用sudo。
* installing *source* package ‘XML’ ...
** package ‘XML’ successfully unpacked and MD5 sums checked
ERROR: 'configure' exists but is not executable -- see the 'R Installation
and Administration Manual'
* removing ‘/home/dalgleishjl/R/x86_64-redhat-linux-gnu-library/3.5/XML’
* restoring previous ‘/home/dalgleishjl/R/x86_64-redhat-linux-gnu-
library/3.5/XML’
The downloaded source packages are in
‘/tmp/RtmpMK29rO/downloaded_packages’
Warning message:
In install.packages("XML") :
installation of package ‘XML’ had non-zero exit status
使用sudo R尝试它有以下结果:
trying URL 'https://cloud.r-project.org/src/contrib/XML_3.98-1.11.tar.gz'
Content type 'application/x-gzip' length 1599533 bytes (1.5 MB)
==================================================
downloaded 1.5 MB
* installing *source* package ‘XML’ ...
** package ‘XML’ successfully unpacked and MD5 sums checked
ERROR: 'configure' exists but is not executable -- see the 'R Installation
and Administration Manual'
* removing ‘/usr/lib64/R/library/XML’
The downloaded source packages are in
‘/tmp/RtmpJCIVd4/downloaded_packages’
Updating HTML index of packages in '.Library'
Making 'packages.html' ... done
Warning message:
In install.packages("XML") :
installation of package ‘XML’ had non-zero exit status
我已经尝试过用户闪亮(sudo -u shiny R):
trying URL 'https://cloud.r-project.org/src/contrib/XML_3.98-1.11.tar.gz'
Content type 'application/x-gzip' length 1599533 bytes (1.5 MB)
==================================================
downloaded 1.5 MB
Error in setwd(od) : cannot change working directory
Error in setwd(startdir) : cannot change working directory
Execution halted
The downloaded source packages are in
‘/tmp/Rtmpa7IPyB/downloaded_packages’
Warning message:
In install.packages("XML") :
installation of package ‘XML’ had non-zero exit status
> sessionInfo()
R version 3.5.0 (2018-04-23)
Platform: x86_64-redhat-linux-gnu (64-bit)
Running under: CentOS Linux 7 (Core)
Matrix products: default
BLAS/LAPACK: /usr/lib64/R/lib/libRblas.so
locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
[3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8
[5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=en_US.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.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.5.0 tools_3.5.0
我还安装了最新版本的libxml2-devel和libxml2 (使用sudo yum install libxml2-devel和sudo yum install libxml2)。
答案 0 :(得分:1)
实际上相当简单。使用sudo R启动R,执行以下操作:
dir.create("/home/username/tmp/")
Sys.setenv(TMPDIR="/home/username/tmp/")
install.packages(“XML”)