<html><body><span style="font-family:Verdana; color:#000000; font-size:10pt;"><div>--9.3 Environment settings <br><br>-bash-4.1$ cat .bash_profile<br># .bash_profile<br><br># Get the aliases and functions<br>if [ -f ~/.bachrc ]; then<br> . ~/.bashrc<br>fi<br><br># User specific environment and start-up programs<br><br>PATH=/sars/apps/db/9.3/bin:/usr/bin/perl:/sars/apps/db/9.3/pgAdmin3/bin:/opt/ActivePerl-5.16/site/bin:/opt/ActivePerl-5.16/bin:$PATH<br>LD_LIBRARY_PATH=/sars/apps/db/9.3/lib:/sars/apps/db/9.3/pgAdmin3/lib:/usr/lib64:/lib64:/usr/local/lib<br>PGDATA=/sars/apps/db/9.3/data<br>PYTHON=/usr/bin/python2.7<br><br>export PATH LD_LIBRARY_PATH PGDATA PYTHON<br><br>-bash-4.1$<br><br>-- I First successfully upgraded Postgis from 1.5.8 to postgis 2.1.1, then I executed the <a href="http://postgis_restore.pl">postgis_restore.pl</a> to restore the data, everything was proceeding fine. <br><br>At this point I have in my 9.1.10 instance: Pg_config<br><br>-bash-4.1$ pg_config --libdir<br>/usr/pgsql-9.1/lib<br>-bash-4.1$ pg_config --pkglibdir<br>/usr/pgsql-9.1/lib<br><br>and in my 9.3.0 instance: Pg_config <br><br>-bash-4.1$ pg_config --pkglibdir<br>/storage/sars/apps/db/9.3/lib/postgresql<br>-bash-4.1$ pg_config --libdir<br>/storage/sars/apps/db/9.3/lib<br><br>-- The olddb is the original PostgreSQL 9.1.10 with Postgis 1.5.8 database.<br><br>-bash-4.1$ psql olddb<br>psql (9.1.10)<br>Type "help" for help.<br><br>olddb=# select version();<br> version<br>---------------------------------------------------------------------------------------------------------------<br> PostgreSQL 9.1.10 on x86_64-unknown-linux-gnu, compiled by gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-3), 64-bit<br>(1 row)<br><br>olddb=# select postgis_full_version();<br> postgis_full_version<br>--------------------------------------------------------------------------------------------------------<br> POSTGIS="1.5.8" GEOS="3.4.2-CAPI-1.8.2 r3921" PROJ="Rel. 4.8.0, 6 March 2012" LIBXML="2.7.6" USE_STATS<br>(1 row)<br><br>olddb=# \connect sarsdb<br>You are now connected to database "sarsdb" as user "sars".<br>sarsdb=# select version();<br> version<br>---------------------------------------------------------------------------------------------------------------<br> PostgreSQL 9.1.10 on x86_64-unknown-linux-gnu, compiled by gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-3), 64-bit<br>(1 row)<br><br>sarsdb=# select postgis_full_version();<br> postgis_full_version<br>-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------<br> POSTGIS="2.1.1 r12113" GEOS="3.4.2-CAPI-1.8.2 r3921" PROJ="Rel. 4.8.0, 6 March 2012" GDAL="GDAL 1.10.1, released 2013/08/26" LIBXML="2.9.1" LIBJSON="UNKNOWN" TOPOLOGY RASTER<br>(1 row)<br><br><br><br>-bash-4.1$ pg_upgrade -c -k -d /sars/apps/db/data -D /sars/apps/db/9.3/data -b /sars/apps/db/bin -B /sars/apps/db/9.3/bin -p 5432 -P 5432<br>Performing Consistency Checks<br>-----------------------------<br>Checking cluster versions ok<br>Checking database user is a superuser ok<br>Checking for prepared transactions ok<br>Checking for reg* system OID user data types ok<br>Checking for contrib/isn with bigint-passing mismatch ok<br>Checking for presence of required libraries fatal<br><br>Your installation references loadable libraries that are missing from the<br>new installation. You can add these libraries to the new installation,<br>or remove the functions using them from the old installation. A list of<br>problem libraries is in the file:<br> loadable_libraries.txt<br><br>Failure, exiting<br>-bash-4.1$ cat loadable_libraries.txt<br>Could not load library "$libdir/rtpostgis-2.1"<br>ERROR: incompatible library "/storage/sars/apps/db/9.3/lib/postgresql/<a href="http://rtpostgis-2.1.so">rtpostgis-2.1.so</a>": version mismatch<br>DETAIL: Server is version 9.3, library is version 9.1.<br><br>Could not load library "$libdir/postgis-2.1"<br>ERROR: incompatible library "/storage/sars/apps/db/9.3/lib/postgresql/<a href="http://postgis-2.1.so">postgis-2.1.so</a>": version mismatch<br>DETAIL: Server is version 9.3, library is version 9.1.<br><br>Could not load library "$libdir/postgis-1.5"<br>ERROR: incompatible library "/storage/sars/apps/db/9.3/lib/postgresql/<a href="http://postgis-1.5.so">postgis-1.5.so</a>": version mismatch<br>DETAIL: Server is version 9.3, library is version 9.1.<br><br><br>Does anyone know why, the library is version 9.1, when the /storage/sars/apps/db/9.3/lib directory was created by the postgresql-9.3.0-rc1-linux-x64.run installer, and how do I get the process to point to the correct 9.3 library.<br><br>thanks<br mce_bogus="1"></div></span></body></html>