I'm starting to seriously use R and have tried to solve this issue using my reference books but I'm missing something simple. Running R-2.13.1 on Slackware-13.1. Trying to invoke RPostgreSQL so I can copy data from a postgres table to an R data-frame. I installed RPostgreSQL and the library() command shows it's present: Packages in library '/home/rshepard/R/i486-slackware-linux-gnu-library/2.13': DBI R Database Interface RPostgreSQL R interface to the PostgreSQL database system Yet, trying to load it fails:> library(RPostgreSQL)Loading required package: DBI Error in dyn.load(file, DLLpath = DLLpath, ...) : unable to load shared object '/home/rshepard/R/i486-slackware-linux-gnu-library/2.13/RPostgreSQL/libs/RPostgreSQL.so': libR.so: cannot open shared object file: No such file or directory Error: package/namespace load failed for 'RPostgreSQL' The shared library, of course, is present: [rshepard at salmo ~/R/i486-slackware-linux-gnu-library/2.13/RPostgreSQL/libs]$ ll -rwxr-xr-x 1 rshepard users 44385 2011-08-03 20:13 RPostgreSQL.so* Can someone explain to me what's going on and how I fix it? Rich
On 08/30/2011 10:53 AM, Rich Shepard wrote:> Error in dyn.load(file, DLLpath = DLLpath, ...) : > unable to load shared object > '/home/rshepard/R/i486-slackware-linux-gnu-library/2.13/RPostgreSQL/libs/RPostgreSQL.so': > > libR.so: cannot open shared object file: No such file or directory > Error: package/namespace load failed for 'RPostgreSQL' > > The shared library, of course, is present: > > [rshepard at salmo > ~/R/i486-slackware-linux-gnu-library/2.13/RPostgreSQL/libs]$ ll > -rwxr-xr-x 1 rshepard users 44385 2011-08-03 20:13 RPostgreSQL.so* > > Can someone explain to me what's going on and how I fix it?Just a guess, but possibly because libpq.so (the postgres client library) is not being found. 1) Do you have libpq.so installed on your system? 2) If so, where? 3) If it is not in a standard system location (e.g. /usr/lib), try adding an entry either to /etc/ld.so.conf or a file with the appropriate entry in /etc/ld.so.conf.d/ and then run ldconfig HTH, Joe -- Joe Conway credativ LLC: http://www.credativ.us Linux, PostgreSQL, and general Open Source Training, Service, Consulting, & 24x7 Support
On Tue, 30 Aug 2011, Joe Conway wrote:> Just a guess, but possibly because libpq.so (the postgres client > library) is not being found.Joe, My initial thought, too. But, that's not it.> 1) Do you have libpq.so installed on your system? > 2) If so, where? > 3) If it is not in a standard system location (e.g. /usr/lib), try > adding an entry either to /etc/ld.so.conf or a file with the appropriate > entry in /etc/ld.so.conf.d/ and then run ldconfig/usr/local/pgsql/lib/libpq.so /usr/local/pgsql/lib/libpq.so.5 /usr/local/pgsql/lib/libpq.so.5.3 /usr/lib/libpq.so /usr/lib/libpq.so.5 The softlinks in /usr/lib/ are to /usr/local/pgsql/lib/libpq.so.5.3. Since postgres-9.0.4 runs quite well here there must be some other factor in play. Thanks, Rich