无法在Ubuntu上安装Postgresql 10

阿吉特·索曼(Ajit Soman)

我正在执行此命令以在我的ubuntu 14.04中安装postgesql

sudo apt-get install postgresql postgresql-contrib

安装过程中出现错误:

Failed to issue method call: Unit [email protected] failed to load: No such file or directory. See system logs and 'systemctl status [email protected]' for details

这是完整的日志:

Creating config file /etc/postgresql-common/createcluster.conf with new version
Building PostgreSQL dictionaries from installed myspell/hunspell packages...
  en_us
Removing obsolete dictionary files:
 * No PostgreSQL clusters exist; see "man pg_createcluster"
Processing triggers for ureadahead (0.100.0-16) ...
Setting up postgresql-10 (10.1-1.pgdg14.04+1) ...
Creating new PostgreSQL cluster 10/main ...
/usr/lib/postgresql/10/bin/initdb -D /var/lib/postgresql/10/main --auth-local peer --auth-host md5
The files belonging to this database system will be owned by user "postgres".
This user must also own the server process.

The database cluster will be initialized with locale "en_IN".
The default database encoding has accordingly been set to "UTF8".
The default text search configuration will be set to "english".

Data page checksums are disabled.

fixing permissions on existing directory /var/lib/postgresql/10/main ... ok
creating subdirectories ... ok
selecting default max_connections ... 100
selecting default shared_buffers ... 128MB
selecting dynamic shared memory implementation ... posix
creating configuration files ... ok
running bootstrap script ... ok
performing post-bootstrap initialization ... ok
syncing data to disk ... ok

Success. You can now start the database server using:

    /usr/lib/postgresql/10/bin/pg_ctl -D /var/lib/postgresql/10/main -l logfile start

Ver Cluster Port Status Owner    Data directory              Log file
10  main    5432 down   postgres /var/lib/postgresql/10/main /var/log/postgresql/postgresql-10-main.log
update-alternatives: using /usr/share/postgresql/10/man/man1/postmaster.1.gz to provide /usr/share/man/man1/postmaster.1.gz (postmaster.1.gz) in auto mode
 * Starting PostgreSQL 10 database server                                                                                                               * Failed to issue method call: Unit [email protected] failed to load: No such file or directory. See system logs and 'systemctl status [email protected]' for details.
                                                                                                                                                [fail]
invoke-rc.d: initscript postgresql, action "start" failed.
dpkg: error processing package postgresql-10 (--configure):
 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of postgresql:
 postgresql depends on postgresql-10; however:
  Package postgresql-10 is not configured yet.

dpkg: error processing package postgresql (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of postgresql-contrib:
 postgresql-contrib depends on postgresql-contrib-10; however:
  Package postgresql-contrib-10 is not installed.
  Package postgresql-10 which provides postgresql-contrib-10 is not configured yet.

dpkg: error processing package postgresql-contrib (--configure):
 dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
                                                                                                          No apport report written because the error message indicates its a followup error from a previous failure.
                                                             Errors were encountered while processing:
 postgresql-10
 postgresql
 postgresql-contrib

这是输出 systemctl status [email protected]

ajit@AjitSoman:~$ systemctl status [email protected]
Failed to issue method call: No such interface 'org.freedesktop.DBus.Properties' on object at path /org/freedesktop/systemd1/unit/postgresql_4010_2dmain_2eservice
用户名

postgresql-fails-to-reinstall-up-upgradeing-ubuntu-12-04-to-14-04中可接受的答案对我有用

为了便于参考,我在下面粘贴了该链接中的说明:

检查/etc/init.d/postgresql它使用的文件/usr/share/postgresql-common/init.d-functions执行该文件/usr/bin/pg_ctlcluster以启动和停止postgresql服务器。

if [ "$1" = "stop" ] || [ "$1" = "restart" ]; then
    ERRMSG=$(pg_ctlcluster --force "$2" "$name" $1 2>&1)
else
    ERRMSG=$(pg_ctlcluster "$2" "$name" $1 2>&1)
fi

/usr/bin/pg_ctlcluster文件接受--skip-systemctl-redirect选项来启动或停止不带systemctl的postgresql。所以,你需要添加--skip-systemctl-redirect/usr/share/postgresql-common/init.d-functionsdo_ctl_all()功能。因此它将看起来像这样。

if [ "$1" = "stop" ] || [ "$1" = "restart" ]; then
    ERRMSG=$(pg_ctlcluster --skip-systemctl-redirect --force "$2" "$name" $1 2>&1)
else
    ERRMSG=$(pg_ctlcluster --skip-systemctl-redirect "$2" "$name" $1 2>&1)
fi

或者您可以$skip_systemctl_redirect = 1;$skip_systemctl_redirect检入之前添加/usr/bin/pg_ctlcluster

原始答案的屏幕截图: 原始答案的屏幕截图

本文收集自互联网,转载请注明来源。

如有侵权,请联系[email protected] 删除。

编辑于
0

我来说两句

0条评论
登录后参与评论

相关文章

来自分类Dev

无法在Ubuntu 16.04上安装Postgresql-10?

来自分类Dev

无法在Windows 10上安装Ubuntu 14.04.3 LTS

来自分类Dev

在无法启动Windows 10的系统上安装Ubuntu!

来自分类Dev

无法在未分配的空间上安装 Ubuntu(Windows 10 的联想)

来自分类Dev

无法通过Ubuntu 16.04安装Windows 10

来自分类Dev

Windows 10安装使Ubuntu无法启动

来自分类Dev

在Ubuntu Bash Windows 10上安装Rails

来自分类Dev

在Windows 10上安装Ubuntu Server 18.04.1?

来自分类Dev

Windows 10上的Ubuntu安装失败

来自分类Dev

在Windows10上安装Ubuntu 15.10

来自分类Dev

无法在Windows 10上安装PIP

来自分类Dev

我无法在Windows 10上安装wingw

来自分类Dev

无法在Solaris 10上安装CDROM

来自分类Dev

无法在Windows 10上安装字体

来自分类Dev

无法在Windows 10上安装.net 3.5

来自分类Dev

无法在Windows 10上安装Cygwin

来自分类Dev

Firefox无法在Windows 10 FCU上安装

来自分类Dev

无法在VMWare Player上安装Windows 10

来自分类Dev

无法在Windows 10上安装Python 3.8

来自分类Dev

无法在Windows 10上安装Python 3.4.5

来自分类Dev

无法在 Windows 10 上安装 virtualbox

来自分类Dev

无法在 Windows 10 上安装 Eclipse

来自分类Dev

PostgreSQL 10无法在Ubuntu 18.04下启动

来自分类Dev

无法在Windows 10 Pro的VirtualBox 6上安装Ubuntu 18.04 Desktop

来自分类Dev

无法从Microsoft Store在Windows 10的Ubuntu上安装Bio :: SeqIO模块

来自分类Dev

安装Ubuntu 15.10后无法在Windows 10上使用互联网

来自分类Dev

无法在Windows10笔记本电脑上安装ubuntu

来自分类Dev

无法在Windows 10 Pro的VirtualBox 6上安装Ubuntu 18.04 Desktop

来自分类Dev

无法在Windows 10上安装双重启动ubuntu;大写锁定键保持闪烁

Related 相关文章

热门标签

归档