libpq-dev 有未满足的依赖关系

libpq-dev 有未满足的依赖关系

解决这个问题的最好方法是什么?

# apt-get install libpq-dev
Reading package lists... Done
Building dependency tree       
Reading state information... Done
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:
  libpq-dev: Depends: libpq5 (= 8.3.12-0lenny1) but 8.4.5-1~bpo50+1 is to be installed

在 Debian Lenny 上。

/etc/apt/sources.list:

deb http://ftp.fr.debian.org/debian/ lenny main
deb-src http://ftp.fr.debian.org/debian/ lenny main
deb http://security.debian.org/ lenny/updates main contrib non-free
deb-src http://security.debian.org/ lenny/updates main contrib non-free
deb http://backports.debian.org/debian-backports lenny-backports main contrib non-free
deb-src http://backports.debian.org/debian-backports lenny-backports main contrib non-free

更新:

# apt-cache policy libpq5 libpq-dev
libpq5:
  Installed: 8.4.5-2~bpo50+1
  Candidate: 8.4.5-2~bpo50+1
  Version table:
 *** 8.4.5-2~bpo50+1 0
        200 http://backports.debian.org lenny-backports/main Packages
        100 /var/lib/dpkg/status
     8.3.12-0lenny1 0
        500 http://security.debian.org lenny/updates/main Packages
     8.3.11-0lenny1 0
        500 http://ftp.fr.debian.org lenny/main Packages
libpq-dev:
  Installed: (none)
  Candidate: 8.3.12-0lenny1
  Version table:
     8.4.5-2~bpo50+1 0
        200 http://backports.debian.org lenny-backports/main Packages
     8.3.12-0lenny1 0
        500 http://security.debian.org lenny/updates/main Packages
     8.3.11-0lenny1 0
        500 http://ftp.fr.debian.org lenny/main Packages

提前致谢,
帕斯卡

答案1

  • 尝试apt-get update然后安装。

  • 进入aptitude操作菜单并使用“取消待处理操作”命令。然后重试安装。

  • 如果这不起作用,您可以随时尝试在线查找所需的 .deb 的特定版本并手动安装它。 看起来你可以在哪里下载它(确保获取 i386 版本或与您的架构相匹配的版本)。

    在本地系统上获取 .deb 后,您可以执行 adpkg -i libpq-dev_8.4.5-1~bpo50+1_i386.deb并安装它。但它可能会抱怨缺少依赖项,这些依赖项在该页面上列出。您必须找出缺少的内容并手动安装它们。

答案2

我找到了解决方案。我需要指定要安装的版本。

apt-get install libpq-dev=8.4.5-2~bpo50+1

相关内容