Rico
Rico

Reputation: 9

installation of package had non-zero exit status - Linux Server

I work with on windows 10 with R. As my project is calculation heavy, i want to use my universities Linux server to do the calculations. The installation of a package (and also its dependencies if tried individually) does not work.

Installing other packages works fine. So i tried to install my package over the console which didn't work, then i accessed R in the console and tried installing it which didn't work. Next i copied my library from my PC in the library which my R accesses on the Linux server. While it works perfectly on my PC, the server tells me it doesn't find my package.

I use the usual install.packages("prodest"), i also tried stuff like install.packages("prodest", dependencies = T), or installing dependencies which it needs directly [like install.packages("haven")].

I would like to install this to then run my script on the server. Some further information:

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

Session Info on the server:

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

Session info on my 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

Upvotes: 0

Views: 2063

Answers (1)

IRTFM
IRTFM

Reputation: 263342

You may need to install (or get your admin to install) libcurl on the SUSE Linux server. On Ubuntu (which your university server does not have) you might do:

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

But on SUSE I read that Yast might be a more typical package management choice.

After getting your system dependencies in shape, you still need to handle the dependencies in R, so consider this (with the warning that it may take a long time):

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

Unfortunately install.packages is not recursive in its searching of a dependency tree, i.e. the dependencies of the dependencies of the dependencies, etc..... That said, the number of dependencies in that particular recursively assembled tree was 77, and it might have been faster to simply install the four or five named packages that were missing.

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

Upvotes: 1

Related Questions