Opened 11 years ago

Closed 9 years ago

Last modified 8 years ago

#40259 closed defect (fixed)

postgis2 @2.0.3_0 Won't install alongside Postgis 1.5 even in a separate PostgreSQL

Reported by: jeabraham Owned by: Veence (Vincent)
Priority: Normal Milestone:
Component: ports Version: 2.2.0
Keywords: Cc: ryandesign (Ryan Carsten Schmidt), stromnov (Andrey Stromnov), cooljeanius (Eric Gallager)
Port: postgis postgis2

Description

I have a PostgreSQL 9.1. server running in production with a PostGIS 1.5 in it. I also have a PostgreSQL 9.2 server installed (but not running), with a PostGIS2 in it. However when I try to update or re-install PostGIS2 it won't do it, complaining that a conflicting port is installed

sudo port install postgis2
--->  Computing dependencies for postgis2
Error: Unable to execute port: Can't install postgis2 because conflicting ports are installed: postgis
sudo port installed postgis2
The following ports are currently installed:
  postgis2 @2.0.1_0+postgresql92+raster+topology
  postgis2 @2.0.3_0+postgresql92+raster+topology (active)

sudo port installed postgis
The following ports are currently installed:
  postgis @1.5.5_0+postgresql91
  postgis @1.5.8_0+postgresql91 (active)

Somehow I managed to get both installed, I can't remember how, maybe I installed Postgis1.58 after Postgis2. But now I can't do any maintenance on the PostGIS2 port because it always complains about the installed (and running -- in production) Postgis1.5.8 port.

This also relates to mapserver, and presumably other ports that want to use the postgis2 libraries. I want the mapserver port to use the Postgis2 libraries even though there is a running production postgis1.5 elsewhere on the machine (in a different postgresql installation), but macports keeps complaining that it can't do anything with postgis2 because postgis (1.5.8) is installed.

Change History (10)

comment:1 Changed 11 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: stromnov@… added
Owner: changed from macports-tickets@… to vince@…
Port: mapserver removed

The postgis2 port declares a conflict with the postgis port. The postgis port does not declare a conflict with the postgis2 port. This does not make sense. Either the ports install the same files, in which case both ports need to declare a conflict with each other, or the ports do not install the same files, in which case both ports need to not declare a conflict with each other.

comment:2 Changed 11 years ago by jeabraham

Do we need this conflict definition or not? Can't we specify that each PostgreSQL installation (9.1, 9.2, 9.3) can have a different Postgis?

For example, can we specify that postgis2+postgresql91 conflicts with postgis+postgresql91, but postgis2+postgresql91 does not conflict with postgis+postgresql92 ?

comment:3 in reply to:  2 Changed 11 years ago by ryandesign (Ryan Carsten Schmidt)

Replying to jea@…:

For example, can we specify that postgis2+postgresql91 conflicts with postgis+postgresql91, but postgis2+postgresql91 does not conflict with postgis+postgresql92 ?

No, there's no syntax for specifying that.

comment:4 in reply to:  description Changed 10 years ago by jeabraham

Replying to jea@…:

Somehow I managed to get both installed, I can't remember how, maybe I installed Postgis1.58 after Postgis2. But now I can't do any maintenance on the PostGIS2 port because it always complains about the installed (and running -- in production) Postgis1.5.8 port.

This also relates to mapserver, and presumably other ports that want to use the postgis2 libraries. I want the mapserver port to use the Postgis2 libraries even though there is a running production postgis1.5 elsewhere on the machine (in a different postgresql installation), but macports keeps complaining that it can't do anything with postgis2 because postgis (1.5.8) is installed.

I've discovered that to upgrade my postgis2 installation, I can deactivate the postgis 1.5.8, then upgrade postgis2, then activate postgis1.5.8 again. Perhaps this works because my postgis1.5.8 is installed in the postgresql9.1 while my postgis2 is installed in postgresql9.2.

-- John

comment:5 Changed 10 years ago by Veence (Vincent)

Since it is not possible to refine the conflicting mechanism using variants, there is hardly anything else I can do. Maybe the conflict resolution algorithm would need to be more graceful.

I can remove the "conflicts" line in the postgis 2 port, which would solve this problem but surely give rise to some kind of mess if one tried to install postgis and postgis2 on the same postgresql version.

Besides, I did not expect anyone still using postgis 1.5. Is there anything that prevents you migrating to a more modern version?

comment:6 Changed 10 years ago by cooljeanius (Eric Gallager)

Cc: egall@… added

Cc Me!

comment:7 Changed 9 years ago by Veence (Vincent)

Resolution: fixed
Status: newclosed

I suppose everyone is using PostGIS 2 now. I’ll probably drop PostGIS 1.5 support at the end of the month.

comment:8 in reply to:  7 ; Changed 9 years ago by jeabraham

Replying to vince@…:

I suppose everyone is using PostGIS 2 now. I’ll probably drop PostGIS 1.5 support at the end of the month.

I'm just a dinosaur, I guess... Thanks for the update, time for me to move forward, as soon as I can find a weekend to migrate.

Just a headsup to others, my workaround (deactivate 1.5, upgrade 2, activate 1.5) wasn't working due to some proj problem:

ERROR:  could not load library "/opt/local/lib/postgresql91/postgis-1.5.so": dlopen(/opt/local/lib/postgresql91/postgis-1.5.so, 10): Library not loaded: /opt/local/lib/libproj.0.dylib
  Referenced from: /opt/local/lib/postgresql91/postgis-1.5.so
  Reason: image not found

but I did:

deactivate 1.5
upgrade 2
deactivate 2
activate 1.5
upgrade 1.5
deactivate 1.5
activate 2

and now Postgis 1.5 is happily working with my old PostgreSQL 9.1 again, while I have Postgis 2 for everything else.

Version 1, edited 9 years ago by jeabraham (previous) (next) (diff)

comment:9 Changed 9 years ago by Veence (Vincent)

Yeah, that’s because proj has been upgraded as part of your postgis2 install, so the dylib version has bumped.

comment:10 in reply to:  8 Changed 8 years ago by jeabraham

Once again, I'm upgrading, to Sierra, and still using postgis 1.5 in an old database. I'm a bad person, I guess. But I'm glad I wrote down these instructions for myself.

Note: See TracTickets for help on using tickets.