This question already has answers here:
Can't find the 'libpq-fe.h header when trying to install pg gem
(39个答案)
6个月前关闭。
在R上,我试图安装名为
我试图通过在命令行中发出如下语句来安装它:
命令行语句显示输出:
然后我试着安装这个软件包
安装失败,并显示此错误消息
似乎R找不到名为
参考文献:
亚马逊网络服务>论坛>Set up the pg gem - postgresql in development
PostgreSQL>百胜存储库>aa>
(39个答案)
6个月前关闭。
在R上,我试图安装名为
RPostgreSQL
的PostgreSQL包。我试图通过在命令行中发出如下语句来安装它:
R
命令行语句显示输出:
R version 3.5.2 (2018-12-20) -- "Eggshell Igloo"
Copyright (C) 2018 The R Foundation for Statistical Computing
Platform: x86_64-redhat-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
Natural language support but running in an English locale
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
>
然后我试着安装这个软件包
install.packages("RPostgreSQL")
安装失败,并显示此错误消息
In file included from RS-PQescape.c:7:0:
RS-PostgreSQL.h:23:14: fatal error: libpq-fe.h: No such file or directory
# include "libpq-fe.h"
^~~~~~~~~~~~
compilation terminated.
似乎R找不到名为
libpq-fe.h
的文件/库。解决这个问题的办法是什么? 最佳答案
在Red Hat family linux发行版上,这可以通过安装用于C语言开发的库和头文件来解决
yum install postgresql-devel
参考文献:
亚马逊网络服务>论坛>Set up the pg gem - postgresql in development
PostgreSQL>百胜存储库>aa>