opensuse 15.4 zypper错误安装postgresql

发布于 2025-02-07 23:25:16 字数 839 浏览 2 评论 0 原文

我是Linux的新手 我安装了OpenSuse Leap 15.4,并制作了root Directory Ext4,然后遵循以下步骤在系统

1上安装PostgreSQL 13。 sudo zypper update

  1. sudo zypper addrepo

但是,在此之后,i sudo sudo zypper ref ref 再次显示一个错误说:

Retrieving repository 'PostgreSQL 13 SLES 15.4 - x86_64' metadata .....................................[error]
Repository 'PostgreSQL 13 SLES 15.4 - x86_64' is invalid.
[pgdg-13|https://download.postgresql.org/pub/repos/zypp/13/suse/sles-15.4-x86_64] Valid metadata not found at specified URL
History:
 - [pgdg-13|https://download.postgresql.org/pub/repos/zypp/13/suse/sles-15.4-x86_64] Repository type can't be determined.

我该怎么做才能安装PostgreSQL

I am new to Linux,
I installed openSUSE Leap 15.4, and made the root directory ext4, I then followed these steps to install postgreSQL 13 on my system

1.sudo zypper ref && sudo zypper update

  1. sudo zypper addrepo https://download.postgresql.org/pub/repos/zypp/repo/pgdg-sles-15-pg13.repo

But after this, I sudo zypper ref again and it shows an error saying:

Retrieving repository 'PostgreSQL 13 SLES 15.4 - x86_64' metadata .....................................[error]
Repository 'PostgreSQL 13 SLES 15.4 - x86_64' is invalid.
[pgdg-13|https://download.postgresql.org/pub/repos/zypp/13/suse/sles-15.4-x86_64] Valid metadata not found at specified URL
History:
 - [pgdg-13|https://download.postgresql.org/pub/repos/zypp/13/suse/sles-15.4-x86_64] Repository type can't be determined.

what can I do to install postgreSQL

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

千年*琉璃梦 2025-02-14 23:25:16

我不能确切地说出您的Zypper命令失败的原因,但这可能与您链接中的存储库旨在用于Suse Linux Enterprise 15 SP4,而不是使用OpenSuse Leap 15.4,这是您使用的。因此,即使您确实让这些存储库工作了,稍后您也可能会遇到其他兼容性问题。

要安装PostgreSQL,始终可以选择在 software.opensuse.org 。 (我强烈建议您在此页面上添加书签 - 这是 寻找opensuse套件的位置。)对于Postgresql13,确实有一个官方的实验套件可用于OpenSuse 15.4,即< a href =“ https://software.opensuse.org/package/postgresql13” rel =“ nofollow noreferrer”>在这里,您可以通过1-Click-Install安装。但是,较新版本的PostgreSQL14已经持续了一段时间,因此,如果您有很强的理由这样做,我只建议使用较旧的Postgresql13。较新的PostgreSQL14还具有官方的实验软件包,可用于OpenSuse 15.4,即

I can't say precisely why your zypper command failed, but it might have to do with the fact that the repositories from your link are intended for SUSE Linux Enterprise 15 SP4, not for openSUSE Leap 15.4, which is what you're using. So even if you did get these repositories to work, you might run into other compatibility problems later.

To install postgresql, there is always the option to search for your package on software.opensuse.org. (I strongly recommend you bookmark this page – it's the place to look for openSUSE packages.) For postgresql13, there is indeed an official experimental package available for openSUSE 15.4, namely here, which you can install via 1-Click-Install. However, the newer version postgresql14 is already out for quite a while, so I would only advise for using the older postgresql13 if you have a very strong reason to do so. The newer postgresql14 also has an official experimental package available for openSUSE 15.4, namely here; this is the one I would recommend currently.

撞了怀 2025-02-14 23:25:16

首先检查repo是否已启用 zypper repos -d

检查 /etc/zypp/repos.d/pgdg-13.repo 文件>文件

first check if repo is enabled zypper repos -d

check /etc/zypp/repos.d/pgdg-13.repo file

最终幸福 2025-02-14 23:25:16

如果打开添加的回购文件,所有设置 sles 。但是我认为主要问题是 type = rpm-md 。无论如何,您不需要添加第三部分回购即可安装邮政局。该软件包已经在主要存储库中,称为 PostgreSQL-Server

因此,请删除 https://download.postgresql.org/pub/repos/repos/zypp/repo/pgdg-sles-15-pg13.repo 以防止任何其他问题和包装冲突

zypper lr # to list the repos and find the number for the `https://download.postgresql.org/pub/repos/zypp/repo/pgdg-sles-15-pg13.repo`
zypper rr <number>

,然后只需安装 postgresql-server

btw当您刷新不需要运行更新的软件包时

If you open the added repo file all set sles. but i think the main problem is the type=rpm-md. In any case you dont need add third part repo to install postgress. the package is already in the main repos and is called postgresql-server.

So remove the https://download.postgresql.org/pub/repos/zypp/repo/pgdg-sles-15-pg13.repo to prevent any other issues and package conflicts

zypper lr # to list the repos and find the number for the `https://download.postgresql.org/pub/repos/zypp/repo/pgdg-sles-15-pg13.repo`
zypper rr <number>

Then just install postgresql-server

Btw when you refresh the packages you dont need to run update

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文