У меня возникает следующая ошибка при обновлении Ubuntu:
$sudo apt-get upgrade
[...]
Lecture des listes de paquets... Fait
Construction de l'arbre des dépendances
Lecture des informations d'état... Fait
Vous pouvez lancer « apt-get -f install » pour corriger ces problèmes.
Les paquets suivants contiennent des dépendances non satisfaites :
postgresql-client-9.1 : Casse: postgresql-9.1 (< 9.1.7-0ubuntu12.04) mais 9.1.6-1~precise2 est installé
postgresql-contrib-9.1 : Dépend: postgresql-9.1 (= 9.1.7-0ubuntu12.04) mais 9.1.6-1~precise2 est installé
E: Dépendances manquantes. Essayez d'utiliser l'option -f.
$sudo apt-get -f install
dpkg : des problèmes de dépendances empêchent la configuration de postgresql-9.1 : postgresql-client-9.1 (9.1.7-0ubuntu12.04) casse postgresql-9.1 (<< 9.1.7-0ubuntu12.04) et est installé.
La version de postgresql-9.1 à configurer est 9.1.6-1~precise2.
dpkg : erreur de traitement de postgresql-9.1 (--configure) : problèmes de dépendances - laissé non configuré
Aucun rapport « apport » n'a été créé car le message d'erreur indique une erreur consécutive à un échec précédent.
dpkg : des problèmes de dépendances empêchent la configuration de postgresql-contrib-9.1 :
postgresql-contrib-9.1 dépend de postgresql-9.1 (= 9.1.7-0ubuntu12.04) ; cependant : La version de postgresql-9.1 sur le système est 9.1.6-1~precise2.
dpkg : erreur de traitement de postgresql-contrib-9.1 (--configure) : problèmes de dépendances - laissé non configuré
Des erreurs ont été rencontrées pendant l'exécution :
postgresql-9.1
postgresql-contrib-9.1
E: Sub-process /usr/bin/dpkg returned an error code (1)
Я использую postgre-sql с QGIS (& amp; мне было тяжело установить все, чтобы все работало нормально), Это работало хорошо в течение нескольких месяцев, и теперь (с этого утра) у меня есть эта проблема, и я не знаю, что делать ?? ... Я попытался деактивировать репозиторий ubuntugis-unstable и выполнить команду "sudo apt-get -f установить "но безуспешно ... Я проверил в интернете, не найдя моей конкретной проблемы ....
К сожалению, я не эксперт по Ubuntu, поэтому я надеюсь получить совет от одного из вас ... Я надеюсь, что решение не в том, чтобы удалить все ...
Спасибо за вашу помощь!
Попробуйте использовать dpkg --force-depends --purge
, это помогло мне
Попробуйте обновить apt-get, снова обновить apt-get, пакеты postgresql были только что обновлены, и вы, возможно, обнаружили их в несовместимом состоянии.
Все еще проблемы, попробуйте установить пакеты явно. Если это не помогло, (создайте резервную копию любой базы данных) удалите пакеты, затем apt-get autoremove и попробуйте установить их снова.
Извините, я не могу помочь с решением вашей проблемы, но если вам придется переустанавливать postgis, вы можете найти этот скрипт полезным.
#!/bin/bash -x
set -eux
apt-get install -y postgresql-9.1 apache2 python-setuptools postgresql-server-dev-9.1 postgresql-9.1-postgis postgis binutils libproj-dev gdal-bin git unzip
#==================================================#
# setup the posgis template for postgresql
#==================================================#
GEOGRAPHY=0
POSTGIS_SQL=postgis.sql
if [ -d "/usr/share/postgresql/9.1/contrib/postgis-1.5" ]
then
POSTGIS_SQL_PATH=/usr/share/postgresql/9.1/contrib/postgis-1.5
GEOGRAPHY=1
fi
su postgres -c "createdb -E UTF8 template_postgis" && \
su postgres -c "( createlang -d template_postgis -l | grep plpgsql || createlang -d template_postgis plpgsql )" && \
su postgres -c "psql -d postgres -c \"UPDATE pg_database SET datistemplate='true' WHERE datname='template_postgis';\"" && \
su postgres -c "psql -d template_postgis -f $POSTGIS_SQL_PATH/$POSTGIS_SQL" && \
su postgres -c "psql -d template_postgis -f $POSTGIS_SQL_PATH/spatial_ref_sys.sql" && \
su postgres -c "psql -d template_postgis -c \"GRANT ALL ON geometry_columns TO PUBLIC;\"" && \
su postgres -c "psql -d template_postgis -c \"GRANT ALL ON spatial_ref_sys TO PUBLIC;\""
if [ $GEOGRAPHY -eq 1 ]
then
su postgres -c "psql -d template_postgis -c \"GRANT ALL ON geography_columns TO PUBLIC;\""
fi
Скорее всего, вам придется запускать его как sudo.