在ubuntu 20.04中安装libpq-dev时出现问题 [英] Problems instaling libpq-dev in ubuntu 20.04

查看:0
本文介绍了在ubuntu 20.04中安装libpq-dev时出现问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前正在尝试安装libpq-dev来安装心理备份2。问题是,当我试图安装它时,出现一个错误,说我没有最新的libpq5版本。但是,当我尝试下载较新版本的libpq5时,系统提示我已经拥有最新版本。错误的示例。

lhmendes@lhmendes-GA-78LMT-S2P:~$ sudo 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 (= 12.4-0ubuntu0.20.04.1) but 12.4-1.pgdg20.04+1 is to be installed
E: Unable to correct problems, you have held broken packages.
lhmendes@lhmendes-GA-78LMT-S2P:~$ sudo apt-get install libpq5
Reading package lists... Done
Building dependency tree       
Reading state information... Done
libpq5 is already the newest version (12.4-1.pgdg20.04+1).
0 upgraded, 0 newly installed, 0 to remove and 4 not upgraded.

推荐答案

我认为您已经安装了最新的libpq(12.4-1),但libpq-dev需要较旧的版本(12.4-0),这会造成问题。

您可以尝试安装较旧的libpq

 apt-get install libpq==12.4-0ubuntu0.20.04.1

但如果其他程序使用最新版本,则旧版本可能会使此程序出现问题。

12.4-1.pgdg20.04+1pgdg20意味着它不是来自标准repo的模块,而是来自其他repo的模块-可能是postgresqlrepo-可能该repo也有最新版本。您可以在Google中搜索12.4-1.pgdg20.04+1,也许还可以找到libpg-dev12.4-1.pgdg20.04+1


我找到libpq-dev 12.4-1.pgdg20.04+1,您可以下载.deb文件并安装。

或者您可以添加此postgresql repo并与apt-get一起安装。此方法还将通知更新,然后您可以自动安装更新。

这篇关于在ubuntu 20.04中安装libpq-dev时出现问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆