我正试图从CRAN存储库中安装R
包。在configure阶段,我必须传递一个标志,但我不知道如何在install.packages
中实现:
> install.packages("Rmpfr")
..........
checking mpfr.h usability... no
checking mpfr.h presence... no
checking for mpfr.h... no
configure: error: Header file mpfr.h not found;
**maybe use --with-mpfr-include=INCLUDE_PATH**
(注意:我已在自定义位置安装了MPFR,因为我没有root权限。)
但是我如何向R
的install.package
命令传递特定的带参数标志呢?例如 " --with-mpfr-include=/path/to/mpfr/include"根据
install.packages
手册页面的说明,我尝试了:install.packages("Rmpfr" , INSTALL_opts = "--with-mpfr-include=/path/to/mpfr/include")
install.packages("Rmpfr" , configure.args = "--with-mpfr-include=/path/to/mpfr/include")
install.packages("Rmpfr" , configure.vars = "--with-mpfr-include=/path/to/mpfr/include")
但是它们都没有奏效,出现了同样的错误。
configure.args =
语法应该是正确的。你是否验证了指定路径下是否存在头文件? - MrFlick