opensuse 15.4 zypper错误安装postgresql
我是Linux的新手 我安装了OpenSuse Leap 15.4,并制作了root Directory Ext4,然后遵循以下步骤在系统
1上安装PostgreSQL 13。 sudo zypper update
但是,在此之后,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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我不能确切地说出您的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.
首先检查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如果打开添加的回购文件,所有设置
sles
。但是我认为主要问题是type = rpm-md
。无论如何,您不需要添加第三部分回购即可安装邮政局。该软件包已经在主要存储库中,称为PostgreSQL-Server
。因此,请删除
https://download.postgresql.org/pub/repos/repos/zypp/repo/pgdg-sles-15-pg13.repo
以防止任何其他问题和包装冲突,然后只需安装
postgresql-server
btw当您刷新不需要运行
更新
的软件包时If you open the added repo file all set
sles
. but i think the main problem is thetype=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 calledpostgresql-server
.So remove the
https://download.postgresql.org/pub/repos/zypp/repo/pgdg-sles-15-pg13.repo
to prevent any other issues and package conflictsThen just install
postgresql-server
Btw when you refresh the packages you dont need to run
update