繁体   English   中英

软件包的安装退出状态为非零-Linux服务器

[英]installation of package had non-zero exit status - Linux Server

我在带R的Windows 10上使用。由于我的项目计算量很大,因此我想使用我的大学Linux服务器进行计算。 软件包的安装(如果单独尝试,则还取决于其依赖性)无法正常工作。

安装其他软件包可以正常工作。 因此,我尝试在无法正常运行的控制台上安装我的软件包,然后我在控制台中访问了R并尝试安装了无法正常运行的软件包。 接下来,我从PC复制我的库到R在Linux服务器上访问的库中。 虽然它可以在我的PC上正常运行,但服务器会告诉我找不到我的软件包。

我使用通常的install.packages("prodest") ,我也尝试过类似install.packages("prodest", dependencies = T) ,或者安装直接需要的依赖项[例如install.packages("haven") ]。

我想安装此程序,然后在服务器上运行我的脚本。 一些进一步的信息:

Warning message on the Server:

    compilation terminated.
/usr/lib64/R/etc/Makeconf:167: recipe for target 'readstat/spss/readstat_zsav_compress.o' failed
make: *** [readstat/spss/readstat_zsav_compress.o] Error 1
ERROR: compilation failed for package ‘haven’
* removing ‘/home/rid52xb/R/x86_64-suse-linux-gnu-library/3.6/haven’
* installing *source* package ‘curl’ ...
** package ‘curl’ successfully unpacked and MD5 sums checked
** using staged installation
Package libcurl was not found in the pkg-config search path.
Perhaps you should add the directory containing `libcurl.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libcurl' found
Package libcurl was not found in the pkg-config search path.
Perhaps you should add the directory containing `libcurl.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libcurl' found
Using PKG_CFLAGS=
Using PKG_LIBS=-lcurl
------------------------- ANTICONF ERROR ---------------------------
Configuration failed because libcurl was not found. Try installing:
 * deb: libcurl4-openssl-dev (Debian, Ubuntu, etc)
 * rpm: libcurl-devel (Fedora, CentOS, RHEL)
 * csw: libcurl_dev (Solaris)
If libcurl is already installed, check that 'pkg-config' is in your
PATH and PKG_CONFIG_PATH contains a libcurl.pc file. If pkg-config
is unavailable you can set INCLUDE_DIR and LIB_DIR manually via:
R CMD INSTALL --configure-vars='INCLUDE_DIR=... LIB_DIR=...'
--------------------------------------------------------------------
ERROR: configuration failed for package ‘curl’
* removing ‘/home/rid52xb/R/x86_64-suse-linux-gnu-library/3.6/curl’
ERROR: dependencies ‘haven’, ‘curl’ are not available for package ‘rio’
* removing ‘/home/rid52xb/R/x86_64-suse-linux-gnu-library/3.6/rio’
ERROR: dependency ‘rio’ is not available for package ‘car’
* removing ‘/home/rid52xb/R/x86_64-suse-linux-gnu-library/3.6/car’
ERROR: dependency ‘car’ is not available for package ‘AER’
* removing ‘/home/rid52xb/R/x86_64-suse-linux-gnu-library/3.6/AER’
ERROR: dependency ‘AER’ is not available for package ‘prodest’
* removing ‘/home/rid52xb/R/x86_64-suse-linux-gnu-library/3.6/prodest’

The downloaded source packages are in
        ‘/tmp/RtmpGxZbcG/downloaded_packages’
1: In install.packages("prodest") :
  installation of package ‘haven’ had non-zero exit status
2: In install.packages("prodest") :
  installation of package ‘curl’ had non-zero exit status
3: In install.packages("prodest") :
  installation of package ‘rio’ had non-zero exit status
4: In install.packages("prodest") :
  installation of package ‘car’ had non-zero exit status
5: In install.packages("prodest") :
  installation of package ‘AER’ had non-zero exit status
6: In install.packages("prodest") :
  installation of package ‘prodest’ had non-zero exit status

服务器上的会话信息:

R version 3.6.0 (2019-04-26)
Platform: x86_64-suse-linux-gnu (64-bit)
Running under: SUSE Linux Enterprise Server 12 SP4

Matrix products: default
BLAS:   /usr/lib64/R/lib/libRblas.so
LAPACK: /usr/lib64/R/lib/libRlapack.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

other attached packages:
[1] data.table_1.12.2

loaded via a namespace (and not attached):
[1] compiler_3.6.0 tools_3.6.0

我的PC上的会话信息:

R version 3.6.1 (2019-07-05)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 17134)

Matrix products: default

locale:
[1] LC_COLLATE=German_Germany.1252  LC_CTYPE=German_Germany.1252    LC_MONETARY=German_Germany.1252
[4] LC_NUMERIC=C                    LC_TIME=German_Germany.1252    

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

other attached packages:
[1] prodest_1.0.1     Matrix_1.2-17     dplyr_0.8.3       data.table_1.12.2

loaded via a namespace (and not attached):
 [1] zip_2.0.3         Rcpp_1.0.2        cellranger_1.1.0  pillar_1.4.2      compiler_3.6.1   
 [6] forcats_0.4.0     tools_3.6.1       zeallot_0.1.0     tibble_2.1.3      lattice_0.20-38  
[11] pkgconfig_2.0.2   rlang_0.4.0       openxlsx_4.1.0.1  curl_4.0          DEoptim_2.2-4    
[16] haven_2.1.1       rio_0.5.16        AER_1.2-7         vctrs_0.2.0       hms_0.5.0        
[21] lmtest_0.9-37     grid_3.6.1        tidyselect_0.2.5  glue_1.3.1        R6_2.4.0         
[26] survival_2.44-1.1 readxl_1.3.1      foreign_0.8-71    Rsolnp_1.16       carData_3.0-2    
[31] Formula_1.2-3     purrr_0.3.2       car_3.0-3         magrittr_1.5      splines_3.6.1    
[36] backports_1.1.4   abind_1.4-5       assertthat_0.2.1  sandwich_2.5-1    truncnorm_1.0-8  
[41] crayon_1.3.4      zoo_1.8-6

您可能需要在SUSE Linux服务器上安装(或让管理员安装)libcurl。 在Ubuntu(您的大学服务器没有)上,您可以执行以下操作:

sudo apt-get -y install libcurl4-openssl-dev

但是在SUSE上,我读到Yast可能是更典型的软件包管理选择。

使系统依赖关系成形后,您仍然需要处理R中的依赖关系,因此请考虑一下(警告可能会花费很长时间):

install.packages( c(tools::package_dependencies(package="prodest", recursive=TRUE)$prodest,
                    "prodest")
                 )

不幸的是, install.packages在搜索依赖关系树时不是递归的,即依赖关系的依赖关系等。...也就是说,在那个特定的递归组装树中,依赖关系的数量为77,这可能只需安装缺少的四个或五个命名软件包,速度更快。

 install.packages( c( 'haven' 'curl' , 'rio, 'car', 'AER'), dependencies=TRUE)

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM