Installing RPostgreSQL with R 2.13 on a Mac

1. Download file from http://cran.r-project.org/web/packages/RPostgreSQL/index.html to ~/Downloads

2. From ~/Downloads, enter the following in the terminal:
tar xvzf RPostgreSQL_0.1-7.tar.gz

3. Create a symbolic link to the pg_config file:
sudo ln -s /Library/PostgreSQL/9.0/bin/pg_config /usr/local/bin

4. Edit the configure file in the ~/Downloads/RPostgreSQL directory to add the path to libpq-fe.h. In particular, add
/Library/PostgreSQL/9.0/include to the list of directories. The original text looks something like:

for dir in \
/usr/include \
/usr/include/pgsql \

After editing, it looks like this

for dir in \
/Library/PostgreSQL/9.0/include \
/usr/include \
/usr/include/pgsql \

Advertisements
This entry was posted in Uncategorized and tagged , , . Bookmark the permalink.

2 Responses to Installing RPostgreSQL with R 2.13 on a Mac

  1. Pingback: Installing RPostgreSQL with R 2.13 on a Mac (via iangow) « Chicago Mac/PC Support

  2. iangow says:

    For a better approach, please see the response from a RPostgreSQL team member here.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s