Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#1154 closed defect (fixed)

PostGIS failed to install from UbuntuGIS repository

Reported by: kalxas Owned by: live-demo@…
Priority: blocker Milestone: OSGeoLive7.0
Component: OSGeoLive Keywords:
Cc: jlarouche@…

Description

Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 postgis : Depends: libgdal1h (>= 1.9.0) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
ERROR: Package install failed! Aborting.

Change History (20)

comment:1 by kalxas, 11 years ago

This appeared on build [10308]

comment:3 by kalxas, 11 years ago

fix committed in [10317]

comment:4 by hamish, 11 years ago

Hi,

re. install_postgis.sh

PROJ_FORCE='--force-yes proj=4.8.0-3~precise2' 

Under no circumstances should "apt-get --force" be used; that needs to be removed ASAP. What's the problem that's needing this? (there will be a better way to fix it)

thanks, Hamish

comment:5 by kalxas, 11 years ago

Still I get the same error on latest nightly.

Is there a way to revert postgis to previous deb file?

comment:6 by kalxas, 11 years ago

I have tried to install the latest postgis packages on a new VM. Unmet dependencies: libgdal1h>1.9.0

in reply to:  5 comment:7 by hamish, 11 years ago

Replying to kalxas:

Is there a way to revert postgis to previous deb file?

 apt-get install package=exact_version-numbers

Setting up postgis (2.0.1-2~precise3) ... Setting up postgresql-9.1-postgis (2.0.1-2~precise3) ...

e.g.

 apt-get install postgis=2.0.1-2~precise3 postgresql-9.1-postgis=2.0.1-2~precise3

(check old build logs to get the version numbers)

and hopefully the ppa retains the old versions in the pool.

you may need to check available versions with "apt-cache policy postgis" and to avoid it being later upgraded put a hold on the package(s) with: echo "package_name hold" | dpkg --set-selections.

Hamish

comment:8 by jlarouche, 11 years ago

I don't really understand why you're having this error.

Yes the new Postgis depends on libgdal1h, but the new gdal 1.10 uploaded on ubuntuGIS for 12.04 contains this package.

I just tried to install it in a new Precise VM and it works.

Precise updated 100% for now, so maybe there's another package causing some conflicts, but if you have gdal 1.10 from the repo, it should be fine.

comment:9 by kalxas, 11 years ago

Resolution: fixed
Status: newclosed

(In [10330]) fix #1154 by installing previous version

comment:10 by kalxas, 11 years ago

Resolution: fixed
Status: closedreopened

Hi Jerome,

Can you post the exact apt-get command you used for testing? It seems that the problem is caused when adding postgresql-9.1-postgis-2.0-scripts

Also, can you review the installation script:

Thanks, Angelos

comment:12 by jlarouche, 11 years ago

I added the ubuntugis ppa did the update and then "sudo apt-get install postgresql-9.1-postgis-2.0-scripts". It does find libgdal1h

I think the problem might be with postgresql-9.1-postgis. The new update also changed that the postgresql-9.1-postgis package is renamed to postgresql-9.1-postgis-2.0. There seems to be changes coming to people could install multiple version of Postgis/Postgresql. So you don't even need postgresql-9.1-postgis as it is required dependency of postgresql-9.1-postgis-2.0-scripts.

It should work that way.

Sorry for all the mess.

comment:13 by kalxas, 11 years ago

Thanks Jerome,

I am testing this in [10331]

comment:14 by kalxas, 11 years ago

PostGIS is now installed in nightly build but it seems that the db cannot be initialized: http://pastebin.com/VsspcPdy

comment:15 by jlarouche, 11 years ago

Ah, I was wrong, the postgresql-9.1-postgis-2.0 depends on the -scripts package and postgresql.

What you've got now is only the PostGIS scripts and lib without postgresql. I should have looked at the package instead of going from memory, sorry about that.

Also, by looking at load_postgis.sh I just realised that the new postgis package is missing the .../postgresql/9.1/contrib folder with the postgis.sql, legacy_minimal.sql... scripts. I'll look into it and upload new packages for postgis.

I suppose that for now you could force the older version of postgis(2.0.1-2~precise3) a bit like proj.

in reply to:  15 comment:16 by hamish, 11 years ago

Replying to jlarouche:

I suppose that for now you could force the older version of postgis(2.0.1-2~precise3) a bit like proj.

if you do that please use 'apt-get install package=version_number', not --force. :) (The force flag is not to be used on the live disc *under any circumstances*.)

thanks, Hamish

comment:17 by phaf, 11 years ago

It looks like PostGIS is still broken in build 10338 (tried to install PostGIS via 'create extension postgis' like in the past). What are missing steps to fix this important issue?

comment:18 by jlarouche, 11 years ago

New package is up on Precise with the contrib folder.

You can remove the postgresql-9.1-postgis-2.0-scripts from apt-get and change postgresql-9.1-postgis to posgresql-9.1-postgis-2.0. Keep postgis and proj. This will install PostgreSQL, the Postgis lib and scripts.

I tried running the same command you're using in the script in a clean VM and it all seems to be working fine and I've been running a PostGIS DB on Raring using the new PostGIS package and it all seem fine.

comment:19 by kalxas, 11 years ago

Resolution: fixed
Status: reopenedclosed

confirmed as fixed in build [10344]

Thanks

comment:20 by darkblueb, 11 years ago

on a test VM, which has XUbuntu 12.04-1, setup and services from Live, and libgdal1h installed, with UbuntuGIS-unstable only, I install

sudo apt-get install postgis postgresql-9.1-postgis-2.0 postgresql-9.1-postgis-2.0-scripts

this also brings in liblwgeom-2.0.3

I will run some tests with the result of this install.

Note: See TracTickets for help on using tickets.