Comments (5)
The preferred way to find the libraries and headers is using "pg_config". If
this command is found in your path then it should just work. At the command
line type, "pg_config". You should see a lot of text like:
BINDIR = /Library/PostgreSQL/versions/9.0.1/bin
DOCDIR = /Library/PostgreSQL/versions/9.0.1/share/doc/postgresql
HTMLDIR = /Library/PostgreSQL/versions/9.0.1/share/doc/postgresql
INCLUDEDIR = /Library/PostgreSQL/versions/9.0.1/include
PKGINCLUDEDIR = /Library/PostgreSQL/versions/9.0.1/include/postgresql
INCLUDEDIR-SERVER = /Library/PostgreSQL/versions/9.0.1/include/postgresql/server
LIBDIR = /Library/PostgreSQL/versions/9.0.1/lib
PKGLIBDIR = /Library/PostgreSQL/versions/9.0.1/lib/postgresql
. . . . .
etc.
If "pg_config" is not found, then edit your path to include it, wherever
pg_config is installed. You should be able to find the file by typing "sudo
find / -name pg_config -print" at the command line. For example on my system
it returns:
/Library/PostgresPlus/8.4SS/bin/pg_config
/Library/PostgreSQL/versions/9.0.1/bin/pg_config
Note that I have a link to the versioned bin directory at
/Library/PostgreSQL/bin
To check your path type "env $PATH".
My system has the following:
env:
/opt/local/bin:/opt/local/sbin:/sw/bin:/sw/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/u
sr/local/bin:/usr/X11/bin:/usr/X11R6/bin:/Library/PostgreSQL/bin: No such file
or directory
If your path is missing, try editing ".profile" in your home directory. Mine
has the line:
"export PATH=$PATH:/Library/PostgreSQL/bin"
Where you patched the configure file is an old method to locate the files and
is impossible to keep up to date with all the variations of install locations.
In the long run, its really easier to get the path to "pg_config" correct.
Of course, these are just examples and may need to be adjusted to work on your
system.
Original comment by [email protected]
on 24 Apr 2011 at 1:58
from rpostgresql.
Thanks. That's very helpful, even though I already have RPostgreSQL working on
my computer based on my configure-file-edit kluge.
But I notice that the CRAN binary for Mac OS X is missing (it was there for R
2.12, I think) because I guess (based on what you tell me ... I'm no expert)
the path on the system on which it is compiled doesn't include pg_config. I
suspect it's a real pain to keep up with all the moving parts on those systems.
Original comment by [email protected]
on 24 Apr 2011 at 3:59
from rpostgresql.
CRAN is a different issue. Marking this issue closed based on the work-around
posted.
Original comment by [email protected]
on 24 Apr 2011 at 6:56
- Changed state: WontFix
from rpostgresql.
For completeness, I believe one can also define the full path for pg_config in
the environment variable $PG_CONFIG and it will also work.
Original comment by [email protected]
on 24 Apr 2011 at 7:30
from rpostgresql.
For the benefit of any future Mac users that stumble upon this, the solution
proposed by Neil in Comment 4 above was easiest. I just added (check your path
and adjust!):
export PATH=/Library/PostgreSQL/9.0/bin:$PATH
to ~/.profile (called "source ~/.profile") and then compiled from within R using
install.packages("~/Downloads/RPostgreSQL/", repos=NULL, type="source")
Original comment by [email protected]
on 27 Apr 2011 at 3:55
from rpostgresql.
Related Issues (20)
- Get autogenerated keys
- Bug linker flag when build with/link to exist postgresql library in custom path HOT 3
- Usage of internal libpq distribution is broken
- Outdated config.guess and config.sub HOT 2
- Error connecting to postgres 13 using RPostgres package in R. “authentication method 10 not supported” HOT 6
- Error loading RPostgreSQL HOT 6
- 'dbWriteTable()' does not write data out of public schema HOT 4
- configure: error: cannot guess build type; you must specify one in [install.packages("RPostgreSQL")] HOT 2
- Issue installing RPostgreSQL on linux HOT 6
- Unable to install in R HOT 6
- Create Roles and users from RPostgreSQL HOT 4
- dbSendQuery segfault on bad SQL query HOT 1
- How to find headers in /usr/include/psql? HOT 2
- How to pass binary_parameters="yes"? HOT 1
- please support PQconnectdb() interface HOT 2
- `dbConnect()` crashes R Studio instead of erroring HOT 4
- CRAN NEWS and Changelog are out of date
- libpq version 10 or above required for authentication HOT 6
- Old problem: libpg version problems HOT 5
- RPostgreSQL 0.7-4 isn't working with libpq 15.1? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rpostgresql.