You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Configuration failed because libpq was not found. #118
Using pg_config includedir and libdir!
Using PKG_CFLAGS=
Using PKG_LIBS=-lpq
------------------------- ANTICONF ERROR ---------------------------
Configuration failed because libpq was not found. Try installing:
* deb: libpq-dev (Debian, Ubuntu, etc)
* rpm: postgresql-devel (Fedora, EPEL)
* rpm: postgreql8-devel, psstgresql92-devel, postgresql93-devel, or postgresql94-devel (Amazon Linux)
* csw: postgresql_dev (Solaris)
* brew: postgresql (OSX)
If libpq is already installed, check that either:
(i) 'pkg-config' is in your PATH AND PKG_CONFIG_PATH contains
a libpq.pc file; or
(ii) 'pg_config' is in your PATH.
If neither can detect , you can set INCLUDE_DIR
and LIB_DIR manually via:
R CMD INSTALL --configure-vars='INCLUDE_DIR=... LIB_DIR=...'
--------------------------------------------------------------------
Hmm your pkg-config is giving these values, so that means something is misconfigured on your system. Can you please show the output of the successful install? In particular the lines with Using PKG_CFLAGS and Using PKG_LIBS=...
hmm I am doing a fresh build of a docker image that was based on your opencpu dockerfile. Let me see if I can reproduce it with the dockerfile. I have added some other junk in there that I need to remove before sharing
@jeroen I think I'm the one who "broke [...] shit" with #81... reason being...
I've found a bunch of PostgreSQL installations over the years (on particular Linux distros, e.g. Amazon Linuxes) where some combination of these are true:
pkg_config specifying onlyone of cflags or libs
pg_config specifying onlyone of includedir or libdir
the above two cases not complementing each other forcing me to manually specify one or the other of INCLUDE_DIR or LIB_DIR (but not necessarily both) as an arg to RPostgres' installation.
Thus, #81 tried to factor these two variables out into their own value-discovery paths.
For both variables, highest priority is an arg given at package-install time, then pkg_config, then pg_config, then (finally) brew if on darwin*.
Being able to pass exactly one of INCLUDE_DIR or LIB_DIR (i.e. without having to necessarily pass both) at installation-time seems like a good enough reason (IMHO) to treat these two variables separately during installation, but I'm happy to defer to the original author.
Definitely not trying to rock-the-boat here, and thanks a ton for all the work/contributing you put in to these projects.
This old thread has been automatically locked. If you think you have found something related to this, please open a new issue and link to this old issue if necessary.
Activity
jeroen commentedon Mar 21, 2017
Hmm your
pkg-configis giving these values, so that means something is misconfigured on your system. Can you please show the output of the successful install? In particular the lines withUsing PKG_CFLAGSandUsing PKG_LIBS=...JackStat commentedon Mar 21, 2017
hmm I am doing a fresh build of a docker image that was based on your opencpu dockerfile. Let me see if I can reproduce it with the dockerfile. I have added some other junk in there that I need to remove before sharing
oz-r commentedon Mar 25, 2017
I've got a PR(#119) that will most likely fix this issue.
mmuurr commentedon Mar 28, 2017
@Usman-R's #119 does fix this for me.
@jeroen I think I'm the one who "broke [...] shit" with #81... reason being...
I've found a bunch of PostgreSQL installations over the years (on particular Linux distros, e.g. Amazon Linuxes) where some combination of these are true:
Thus, #81 tried to factor these two variables out into their own value-discovery paths.
For both variables, highest priority is an arg given at package-install time, then pkg_config, then pg_config, then (finally) brew if on darwin*.
Being able to pass exactly one of INCLUDE_DIR or LIB_DIR (i.e. without having to necessarily pass both) at installation-time seems like a good enough reason (IMHO) to treat these two variables separately during installation, but I'm happy to defer to the original author.
Definitely not trying to rock-the-boat here, and thanks a ton for all the work/contributing you put in to these projects.
guilherme commentedon May 31, 2017
@JackStat It worked for me when I installed both: libpq-dev and pkg-config
kanxu526 commentedon May 31, 2018
Bumped into this issue and @guilherme 's method works for me as well.
vikram-rawat commentedon Oct 1, 2020
Hi,
Got the same issue like this one today while trying to create a docker file from windows. Is there a solution to fix it yet...
Ticket seems to be closed..
krlmlr commentedon Oct 1, 2020
Please open a new issue with a precise description. What output are you seeing? Have you installed
libpq-dev?github-actions commentedon Oct 2, 2021
This old thread has been automatically locked. If you think you have found something related to this, please open a new issue and link to this old issue if necessary.