【问题标题】:Problem with installation of postgresql in Ubuntu 22.10在 Ubuntu 22.10 中安装 postgresql 的问题
【发布时间】:2023-02-23 12:13:43
【问题描述】:

enter image description here

enter image description here

你好,我是按照postgresshttps://www.postgresql.org/download/linux/ubuntu/的原脚本一步步来的,出现了这个依赖错误,我重新配置了dkpg,我尝试使用-f来安装依赖,但还是安装不上,我一直在寻找错误 6 小时 :(, 我总是得到这个错误:

dpkg: dependency problems prevent configuration of postgresql-12:
 postgresql-12 depends on postgresql-common (>= 182~); however:
  Package postgresql-common is not configured yet.

dpkg: error processing package postgresql-12 (--configure):
 dependency problems - leaving unconfigured
Setting up sysstat (12.5.6-1ubuntu0.1) ...
No apport report written because the error message indicates its a followup error from a previous failure.
                                                                                                          dpkg: error processing package sysstat (--configure):
 installed sysstat package post-installation script subprocess returned error exit status 10
Errors were encountered while processing:
 postgresql-common
 postgresql-12
 sysstat
E: Sub-process /usr/bin/dpkg returned an error code (1)

我尝试安装 postgresql

【问题讨论】:

    标签: linux postgresql ubuntu


    【解决方案1】:

    我们缺少有关您当前配置和错误的一些信息。也许您可以在 /var/log 中找到更多信息并将该信息附加到问题中。您还可以提供您的 Ubuntu 版本和 /etc/apt/sources.list.d/pgdg.list 文件内容。

    您可以尝试一些方法来解决您的问题:

    1. 检查 sysstat 包的依赖项。可能缺少依赖项或与系统上的其他包发生冲突,从而阻止安装。您可以使用命令sudo apt-get check 来检查是否存在任何损坏的依赖项。

    2. 删除 sysstat 包,然后再次尝试安装 PostgreSQL 12。您可以使用命令sudo apt-get remove sysstat 删除软件包。删除软件包后,再次尝试安装 PostgreSQL 12。

    3. 尝试使用命令sudo apt-get install postgresql-12 --fix-missing 强制安装 PostgreSQL 12。此命令将尝试在安装过程中修复任何缺失的依赖项。

      此外,您可以首先运行 postgresql-common 以确保它已正确安装:sudo apt-get install postgresql-common 或者如果它已经安装:sudo apt-get remove postgresql-common && sudo apt-get install postgresql-common

    【讨论】:

      猜你喜欢
      • 2021-05-25
      • 2015-09-09
      • 2020-05-27
      • 2015-10-06
      • 1970-01-01
      • 2014-08-11
      • 2017-08-19
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多