在 centos 6.7 上的 R 3.3.0 中安装 Hmisc 时出错
Posted
技术标签:
【中文标题】在 centos 6.7 上的 R 3.3.0 中安装 Hmisc 时出错【英文标题】:Error installing Hmisc in R 3.3.0 on centos 6.7 【发布时间】:2016-09-22 18:17:51 【问题描述】:我已经在 centos 5.2 服务器上安装了 R 3.3.0,并且正在尝试安装运行 shiny
应用程序所需的软件包;其中一个包是Hmisc
并导致错误。
不幸的是,我不知道如何继续。有人可以建议吗?我是否需要通过yum install
添加其他库?
非常感谢
gcc: /builddir/build/BUILD/R-3.3.0/zlib-1.2.8/target/usr/lib64/libz.a: 没有这样的文件或目录 gcc:/builddir/build/BUILD/R-3.3.0/bzip2-1.0.6/target/usr/lib64/libbz2.a:没有这样的文件或目录 gcc:/builddir/build/BUILD/R-3.3.0/xz-5.2.2/target/usr/lib64/liblzma.a:没有这样的文件或目录 gcc:/builddir/build/BUILD/R-3.3.0/pcre-8.38/target/usr/lib64/libpcre.a:没有这样的文件或目录 gcc: /builddir/build/BUILD/R-3.3.0/curl-7.48.0/target/usr/lib64/libcurl.a: 没有这样的文件或目录
> 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】:这对我有同样的问题,这是一个黑客但仍然有效。
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
>
【讨论】:
以上是关于在 centos 6.7 上的 R 3.3.0 中安装 Hmisc 时出错的主要内容,如果未能解决你的问题,请参考以下文章
在linux(CentOS-6.7_x86_64)上安装mysql成功记录