[postgis-users] Problems installing on Linux

James David Smith james.david.smith at gmail.com
Thu Aug 8 07:52:31 PDT 2013


On 8 August 2013 09:43, James David Smith <james.david.smith at gmail.com> wrote:
> On 6 August 2013 23:32, BladeOfLight16 <bladeoflight16 at gmail.com> wrote:
>> On Tue, Aug 6, 2013 at 12:53 PM, James David Smith
>> <james.david.smith at gmail.com> wrote:
>>>
>>> However it says that Topology and Raster support are not present. So I
>>> thought that I could now run the following commands to install those
>>> too:
>>>
>>> <snip>
>>>
>>>
>>> psql:/usr/pgsql-9.0/share/contrib/postgis-2.0/rtpostgis.sql:48: ERROR:
>>>  could not load library "/usr/pgsql-9.0/lib/rtpostgis-2.0.so":
>>> libgeos-3.2.0.so: cannot open shared object file: No such file or
>>> directory
>>>
>>> Any idea why there is still mention of libgeos-3.2.0  ?  I thought I'd
>>> sorted that out now?
>>
>>
>> Could rtpostgis-2.0.so be a pg-routing binary? I noticed two of your copies
>> of GEOS are in subdirectories of /depot/shared/pgrouting/. Maybe the routing
>> binary is still linked to the old GEOS.
>>
>> As for raster, did you install GDAL? I'm pretty sure that GDAL is required
>> for raster support.
>>
>> Honestly, you have a lot of different pieces and versions installed, and
>> since you installed a bunch of them manually, cleaning them out does not
>> seem practical. Have you considered just installing on a clean machine
>> that's never had PostgreSQL? Or maybe even backing up your data and then
>> wiping this machine (assuming there even is data to preserve)? Even if it
>> costs a little bit to get a clean machine, I bet it's less than the cost of
>> your time (assuming you're on the job).
>>
>> _______________________________________________
>
> Hi all,
>
> Just reporting back. Have made progress again. We had to clean and
> then re-make and install GDAL. If I'm honest I'm not quite sure why,
> but once we had done this everything seemed to work ok. :-)
>
> Thanks
>
> James



Hi there,

Not quite done I'm afraid. Sorry and thanks for your continued help.
I've now got a database in my cluster called 'james_traffic_restored'
which is a postgis2 database with topology and raster support enabled.
Great.

Before I started all this I dumped my old database using pg_dump.

pg_dump mydb > db.sql

I saved it as a SQL file and also as a dump file.

/home/james/james_traffic_08082013.dump
/home/james/james_traffic_08082013.sql

I now want to put this data back into my newly database called
'james_traffic_restored'. So I do this:

pg_restore -d james_traffic_restored james_traffic_08082013.dump

However I get lots of errors. I've not bothered providing them, as I
think that this is wrong anyway. I think I need to do something like
this instead:

sh   /usr/pgsql-9.0/share/contrib/postgis-2.0/postgis_restore.pl
/usr/pgsql-9.0/share/contrib/postgis-2.0/postgis.sql
james_traffic_restored   james_traffic_08082013.dump    >
restore.log

But I get the following errors:

/usr/pgsql-9.0/share/contrib/postgis-2.0/postgis_restore.pl: line 31:
use: command not found
/usr/pgsql-9.0/share/contrib/postgis-2.0/postgis_restore.pl: line 32:
use: command not found
/usr/pgsql-9.0/share/contrib/postgis-2.0/postgis_restore.pl: line 34:
my: command not found
/usr/pgsql-9.0/share/contrib/postgis-2.0/postgis_restore.pl: line 36:
my: command not found
/usr/pgsql-9.0/share/contrib/postgis-2.0/postgis_restore.pl: line 37:
syntax error near unexpected token `newline'
/usr/pgsql-9.0/share/contrib/postgis-2.0/postgis_restore.pl: line 37:
`Usage:   $me [-v] <dumpfile>'

I've had a look at the postgis_restore file around these lines, but
I'm not sure what the problem is.

Thanks

James


More information about the postgis-users mailing list