tomoakin / RPostgreSQL

Automatically exported from code.google.com/p/rpostgresql
64 stars 20 forks source link

Unable to install in R #117

Open xiw588 opened 2 years ago

xiw588 commented 2 years ago

I am trying to install the package in r but kept receiving the following error messages and was unable to install.

trying URL 'https://mirrors.nics.utk.edu/cran/src/contrib/RPostgreSQL_0.7-3.tar.gz' Content type 'application/x-gzip' length 580771 bytes (567 KB)

downloaded 567 KB

benz0li commented 2 years ago

See Issue https://github.com/tomoakin/RPostgreSQL/issues/116

tomoakin commented 2 years ago

Have you installed a postgresql-devel package with sudo yum install postgresql-devel or sudo yum install postgresql[appropriate version no]-devel ?

xiw588 commented 2 years ago

@tomoakin no..I was trying to install on cluster, not allowed to sudo

xiw588 commented 2 years ago

@benz0li I tried install.packages("RPostgreSQL", configure.args = c(PG_INCDIR = "/usr/pgsql-11/include")) but same error

tomoakin commented 2 years ago

The first thing you should do is to find pg_config and put it in your PATH. If there isn't on the system, I do not understand what is your idea to use PostgreSQL at all (where is the server running and are they accessible?) Regardless of sudo privilege, you can compile and install the whole PostgreSQL under your home directory if you have sufficient capacity. Then you can direct the PATH to include them. However, the PostgreSQL server normally requires to occupy certain resource (port etc.) for operation and belongs to the superuser control. You can use some non-default port, though.

tomoakin commented 2 years ago

The lesson of #116 is to ask the IT staff for necessary information. If your include files aren't in /usr/pgsql-11/include, install.packages("RPostgreSQL", configure.args = c(PG_INCDIR = "/usr/pgsql-11/include")) will not help.