postgresql - 无法在 Ubuntu 19.04 上安装 Posgresql
问题描述
打字sudo apt-get install postgresql-11
给我错误:
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:
postgresql-11 : Depends: postgresql-client-11
Depends: libicu55 (>= 55.1-1~) but it is not installable
Depends: libpq5 (>= 9.3~) but it is not going to be installed
Depends: libssl1.0.0 (>= 1.0.2~beta3) but it is not installable
Recommends: sysstat but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
如何解决此错误并最终在我的 ubuntu 上安装 Postgres?
解决方案
要解决未满足的依赖项错误,只需添加最新的 PostgreSQL apt 存储库
$ sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt/ `lsb_release -cs`-pgdg main" >> /etc/apt/sources.list.d/pgdg.list'
$ wget -q https://www.postgresql.org/media/keys/ACCC4CF8.asc -O - | sudo apt-key add -
然后只需触发更新命令
$ sudo apt-get update
之后在你的情况下安装 postgresql-11
$ sudo apt-get install postgresql-11
推荐阅读
- postgresql - 为什么索引会增加 postgres 中的执行时间?
- magento - 如何在magento 2后端保存盘点之前进行验证
- python-3.x - 获取python窗口中的空闲CPU计数
- c# - 以 xamarin 形式连接 3 个表
- java - 在Java流中处理时如何将列表细分为多个列表?
- c++ - 解决多个重载
- ignite - Apache Ignite Yarn 部署 HDFS 问题
- go - 为什么在 golang 中写入全局地图时恢复不起作用
- wordpress - 如果 post 存在且 post_meta 存在
- angular - 在 agm 上放置自定义控制按钮