安装‘Rmpfr’包时出现非零退出状态

6
请帮我在R中安装Rmpfr包。 结果是: 安装程序包'Rmpfr'时出现非零退出状态,我无法安装它。
以下是来自R控制台的代码:
* installing *source* package ‘Rmpfr’ ...
** package ‘Rmpfr’ successfully unpacked and MD5 sums checked
checking for gcc... gcc -std=gnu99
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc -std=gnu99 accepts -g... yes
checking for gcc -std=gnu99 option to accept ISO C89... none needed
checking how to run the C preprocessor... gcc -std=gnu99 -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
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
ERROR: configuration failed for package ‘Rmpfr’
* removing ‘/home/fbn/R/x86_64-pc-linux-gnu-library/3.2/Rmpfr’
Warning in install.packages :
  installation of package ‘Rmpfr’ had non-zero exit status

谢谢你!

3
你是否已经安装了mpfr库?这个Rmpfr软件包的描述中提到:“SystemRequirementsNote MPFR(MP浮点可靠库,http://mpfr.org/)和GMP(GNU多精度库,http://gmplib.org/)”。 - RHertel
感谢RHertel的回复,我正在elementary OS中使用R - 根据synaptic软件包管理器的报告,libmpfr4、libgmp-dev和libmpc3已安装。 - bogdan.narcis
1
问题已解决。我按照http://askubuntu.com/questions/394296/how-to-install-mpfr-3-1-2-in-ubuntu-13-04中的建议安装了一些库:sudo apt-get install libmpfr-dev libmpfr-doc libmpfr4 libmpfr4-dbg。感谢您的帮助。 - bogdan.narcis
1个回答

10
尝试从终端安装libmpfr-dev:

请在终端中执行以下命令:

sudo apt-get install libmpfr-dev

再次从R中安装'Rmpfr'


非常感谢,它运行得非常好。为什么你必须使用终端安装它? - Daniel González Cortés

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接