首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >数据库文件是由PostgreSQL版本13创建的。

数据库文件是由PostgreSQL版本13创建的。
EN

Unix & Linux用户
提问于 2021-05-28 06:02:34
回答 1查看 551关注 0票数 0

OS是openSUSE Tumble杂草。以前我安装了PostgreSQL 13。我刚把它去掉了:

代码语言:javascript
复制
> sudo zypper rm 'postgres*'

> sudo zypper rr PostgreSQL

> sudo rm -rf /usr/local/var/postgres

然后,我通过指令PostgreSQL 12安装了这里

代码语言:javascript
复制
> sudo zypper addrepo http://download.opensuse.org/repositories/server:database:postgresql/openSUSE_Tumbleweed/ PostgreSQL

> sudo zypper ref

> sudo zypper in -f postgresql postgresql-server postgresql-contrib

> sudo zypper in -f postgresql-plperl postgresql-plpython postgresql-pltlc

> sudo systemctl enable postgresql

> sudo systemctl start postgresql

但是数据库状态是错误的:

代码语言:javascript
复制
> sudo systemctl status postgresql.service  
[sudo] password for root:  
● postgresql.service - PostgreSQL database server
     Loaded: loaded (/usr/lib/systemd/system/postgresql.service; enabled; vendor preset: disabled)
     Active: failed (Result: exit-code) since Thu 2021-05-27 23:08:43 EDT; 2h 10min ago
    Process: 1576 ExecStart=/usr/share/postgresql/postgresql-script start (code=exited, status=1/FAILURE)
        CPU: 21ms

May 27 23:08:43 localhost systemd[1]: Starting PostgreSQL database server...
May 27 23:08:43 localhost postgresql-script[1576]:  Your database files were created by PostgreSQL version 13.
May 27 23:08:43 localhost postgresql-script[1576]:  Could not find executables for this version.
May 27 23:08:43 localhost postgresql-script[1576]:  Please install the PostgreSQL server package for version 13.
May 27 23:08:43 localhost systemd[1]: postgresql.service: Control process exited, code=exited, status=1/FAILURE
May 27 23:08:43 localhost systemd[1]: postgresql.service: Failed with result 'exit-code'.
May 27 23:08:43 localhost systemd[1]: Failed to start PostgreSQL database server.

由于某些原因,无论我尝试什么,我都无法消除以下状态错误:

您的数据库文件是由PostgreSQL版本13创建的。无法找到此版本的可执行文件。请安装版本13的PostgreSQL服务器包。

如何安装PostgreSQL 12并删除PostgreSQL 13数据库文件?

EN

回答 1

Unix & Linux用户

回答已采纳

发布于 2021-05-28 14:20:43

如@cas评论所示:

我决定放弃把评级从13降到12的想法,我重新安装了Pg 13并坚持执行。

我在一个平台上推荐Pg 12,但是,除非13出了什么问题,否则我不会回到12。

票数 1
EN
页面原文内容由Unix & Linux提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://unix.stackexchange.com/questions/651747

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档