[英]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.