这是一个有点重复的问题(请参阅如何为我的目录中安装的 R 设置 PATH)但我确实遇到了新版本 R 的一些新问题。
我试图在我自己的目录中安装新版本的 R (R 3.3.1)。我按照我之前的安装流程
但是我遇到了一个我以前没有遇到过的问题。
./configure --prefix=$HOME/Programme/R-3.3.1
.......
checking for zlib.h... yes
checking if zlib version >= 1.2.5... no
checking whether zlib support suffices... configure: error: zlib library and headers are required
Run Code Online (Sandbox Code Playgroud)
好像zlib版本太低了,所以我安装了当前版本的zlib
tar xvf zlib-1.2.11.tar.gz
cd zlib-1.2.11
./configure --prefix=$HOME/Programme/zlib-1.2.11
make && make install
Run Code Online (Sandbox Code Playgroud)
然后我尝试再次为 R 进行配置,例如:
./configure --prefix=$HOME/Programme/R-3.3.1 --enable-R-shlib LDFLAGS="-L/$HOME/Programme/zlib-1.2.11/lib" CPPFLAGS="-I/$HOME/Programme/zlib-1.2.11/include"
Run Code Online (Sandbox Code Playgroud)
我仍然有同样的错误:
checking if zlib version >= 1.2.5... no
checking whether zlib support suffices... configure: error: zlib library and headers are …Run Code Online (Sandbox Code Playgroud) 嗨,当我尝试配置 R 安装时遇到了一个问题。基本上,我尝试按照我以前的安装过程进行操作,(出于某种原因,我需要在 CentOS6 而不是 CentOS5 中重新安装相同的 R)
./configure --prefix=$HOME/Programme/R-3.3.2 --enable-R-shlib LDFLAGS="-L/$HOME/Programme/zlib-1.2.11/lib -L/$HOME/Programme/ bzip2-1.0.6/lib -L/$HOME/Programme/xz-5.2.3/lib -L/$HOME/Programme/pcre-8.40/lib -L/$HOME/Programme/curl-7.47.1/lib " CPPFLAGS="-I/$HOME/Programme/zlib-1.2.11/include -I/$HOME/Programme/bzip2-1.0.6/include -I/$HOME/Programme/xz-5.2.3/include - I/$HOME/Programme/pcre-8.40/include -I/$HOME/Programme/curl-7.47.1/include"
配置退出,因为:
...
checking for curl-config... /u32/myusername/Programme/curl-7.52.1/bin//curl-config
checking libcurl version ... 7.52.1
checking curl/curl.h usability... yes
checking curl/curl.h presence... yes
checking for curl/curl.h... yes
checking if libcurl is version 7 and >= 7.28.0... yes
checking if libcurl supports https... no
configure: error: libcurl >= 7.28.0 library and headers are required with support for https
Run Code Online (Sandbox Code Playgroud)
注意到有人用过,“7.47.1”似乎对他/她有用,所以安装了“7.47.1”,但没有用。 …
我试图安装一个名为“devtools”的 R 包,但没有成功。
ERROR: dependencies ‘curl’, ‘openssl’ are not available for package ‘httr’
* removing ‘/misc/u32/huang/.R325/lib64/R/library/httr’
ERROR: dependencies ‘httr’, ‘git2r’ are not available for package ‘devtools’
* removing ‘/misc/u32/huang/.R325/lib64/R/library/devtools’
Run Code Online (Sandbox Code Playgroud)
原来我需要安装“Curl”,它需要以root身份执行安装命令
有没有办法解决这个问题?也许只是安装 curl 正在进行本地目录?啧!