postgresql@10-无法加载main.service
我在这个问题上绞尽脑汁,可能已经尝试了所有可能的解决方案(修复、清除、重新安装),但postgresql并没有启动postgresql@10-无法加载main.service,postgresql,ubuntu,Postgresql,Ubuntu,我在这个问题上绞尽脑汁,可能已经尝试了所有可能的解决方案(修复、清除、重新安装),但postgresql并没有启动 rupin@linuxbox:~$ sudo /etc/init.d/postgresql restart [sudo] password for rupin: Restarting PostgreSQL 10 database server Failed to issue method call: Unit postgresql@10-main.service faile
rupin@linuxbox:~$ sudo /etc/init.d/postgresql restart
[sudo] password for rupin:
Restarting PostgreSQL 10 database server
Failed to issue method call: Unit postgresql@10-main.service failed to load: No such file or directory. See system logs and 'systemctl status postgresql@10-main.service' for details.
日志文件为空。没有postmaster.pid文件可能是罪魁祸首
我的Ubuntu笔记本电脑崩溃,系统崩溃时DB处于活动状态
有人能告诉我如何解决这个问题并再次启动服务器吗
**更新**
rupin@linuxbox:~$ systemctl status postgresql@10-main.service
Failed to issue method call: No such interface 'org.freedesktop.DBus.Properties' on object at path /org/freedesktop/systemd1/unit/postgresql_4010_2dmain_2eservice
成为操作系统用户
postgres
尝试用以下命令启动PostgreSQL
pg_ctl start -D /etc/postgres/10/main
(使用postgresql.conf
所在的路径。)
然后您将看到错误,您将知道如何处理它。我按照 我最终删除了systemd
sudo apt-get purge systemd && sudo apt-get autoremove
我能够重新安装postgres。不幸的是,我丢失了数据/无法跟踪它。这对我来说没关系,因为这是我的本地数据库,我似乎找不到配置文件。根据这篇文章,我使用了locate postgresql.conf,但是位置/usr/lib/tmpfiles.d/postgresql.confI处的文件是空的,我在原来的问题中添加了更多信息。我还查看了路径/usr/share/postgresql common/init.d-functions,但没有看到文件。然后您可能删除了数据库。