Error installing Hmisc in R 3.3.0 on centos 6.7

和自甴很熟 提交于 2019-12-08 06:19:37

问题


I have installed R 3.3.0 on a centos 5.2 server, and am trying to install the packages I need to run a shiny app; one of the packages is Hmisc and causing an error.

Unfortunately, I have no idea how to proceed. Could someone advise please? Do I need to add additional libraries via yum install?

Many thanks

gcc: /builddir/build/BUILD/R-3.3.0/zlib-1.2.8/target/usr/lib64/libz.a: No such file or directory
gcc: /builddir/build/BUILD/R-3.3.0/bzip2-1.0.6/target/usr/lib64/libbz2.a: No such file or directory
gcc: /builddir/build/BUILD/R-3.3.0/xz-5.2.2/target/usr/lib64/liblzma.a: No such file or directory
gcc: /builddir/build/BUILD/R-3.3.0/pcre-8.38/target/usr/lib64/libpcre.a: No such file or directory
gcc: /builddir/build/BUILD/R-3.3.0/curl-7.48.0/target/usr/lib64/libcurl.a: No such file or directory

> sessionInfo()
R version 3.3.0 (2016-05-03)
Platform: x86_64-redhat-linux-gnu (64-bit)
Running under: CentOS release 6.7 (Final)

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] tools_3.3.0

回答1:


This worked for me with the same issue, it's a hack but still worked.

wget http://zlib.net/zlib-1.2.8.tar.gz
./configure ; make ; make install
mkdir -p /builddir/build/BUILD/R-3.3.0/zlib-1.2.8/target/usr/lib64/
ln -s /usr/local/lib/libz.a /builddir/build/BUILD/R-3.3.0/zlib-1.2.8/target/usr/lib64/libz.a

wget http://www.bzip.org/1.0.6/bzip2-1.0.6.tar.gz
make ; make install
mkdir -p /builddir/build/BUILD/R-3.3.0/bzip2-1.0.6/target/usr/lib64/
ln -s /usr/local/lib/libbz2.a /builddir/build/BUILD/R-3.3.0/bzip2-1.0.6/target/usr/lib64/libbz2.a

wget http://tukaani.org/xz/xz-5.2.2.tar.gz
./configure ; make ; make install
mkdir -p /builddir/build/BUILD/R-3.3.0/xz-5.2.2/target/usr/lib64/
ln -s /usr/local/lib/liblzma.a /builddir/build/BUILD/R-3.3.0/xz-5.2.2/target/usr/lib64/liblzma.a

wget http://downloads.sourceforge.net/project/pcre/pcre/8.38/pcre-8.38.tar.gz
./configure ; make ; make install
mkdir -p /builddir/build/BUILD/R-3.3.0/pcre-8.38/target/usr/lib64/
ln -s /usr/local/lib/libpcre.a /builddir/build/BUILD/R-3.3.0/pcre-8.38/target/usr/lib64/libpcre.a

wget https://curl.haxx.se/download/curl-7.48.0.tar.gz
./configure ; make ; make install
mkdir -p /builddir/build/BUILD/R-3.3.0/curl-7.48.0/target/usr/lib64/
ln -s /usr/local/lib/libcurl.a /builddir/build/BUILD/R-3.3.0/curl-7.48.0/target/usr/lib64/libcurl.a

    yum install libidn-devel.i686 libidn-devel.x86_64 libssh-devel.x86_64 libssh-devel.i686 libssh2-devel.i686 libssh2-devel.x86_64 openldap-devel.i686 openldap-devel.x86_64

R
install.packages("Hmisc")

> library(Hmisc)
Loading required package: lattice
Loading required package: survival
Loading required package: Formula
Loading required package: ggplot2

Attaching package: ‘Hmisc’

The following objects are masked from ‘package:base’:

    format.pval, round.POSIXt, trunc.POSIXt, units

>


来源:https://stackoverflow.com/questions/37432130/error-installing-hmisc-in-r-3-3-0-on-centos-6-7

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!