PostgreSQL 8.4无法启动Ubuntu 10.10 Bug?

时间:2011-12-17 15:55:06

标签: postgresql ubuntu-10.10

PostgreSQL 8.4无法在Ubuntu 10.10上启动

sudo /etc/init.d/postgresql start
  * Starting PostgreSQL 8.4 database server                                                                                                                                                     
  * Error: could not exec /usr/lib/postgresql/8.4/bin/pg_ctl /usr/lib/postgresql/8.4/bin/pg_ctl start -D /var/lib/postgresql/8.4/main -l /var/log/postgresql/postgresql-8.4-main.log -s -o  -c config_file="/etc/postgresql/8.4/main/postgresql.conf" :

ldd

上运行/usr/lib/postgresql/8.4/bin/pg_ctl
ldd /usr/lib/postgresql/8.4/bin/pg_ctl
    linux-gate.so.1 =>  (0xb77e4000)
    libpq.so.5 => /usr/lib/libpq.so.5 (0xb77a2000)
    libc.so.6 => /lib/libc.so.6 (0xb7645000)
    libssl.so.0.9.8 => /lib/libssl.so.0.9.8 (0xb75fb000)
    libcrypto.so.0.9.8 => /lib/libcrypto.so.0.9.8 (0xb74ac000)
    libkrb5.so.3 => /usr/lib/libkrb5.so.3 (0xb73fd000)
    libcom_err.so.2 => /lib/libcom_err.so.2 (0xb73f9000)
    libgssapi_krb5.so.2 => /usr/lib/libgssapi_krb5.so.2 (0xb73ca000)
    libcrypt.so.1 => /lib/libcrypt.so.1 (0xb7398000)
    libldap_r-2.4.so.2 => /usr/lib/libldap_r-2.4.so.2 (0xb7351000)
    libpthread.so.0 => /lib/libpthread.so.0 (0xb7337000)
    /lib/ld-linux.so.2 (0xb77e5000)
    libdl.so.2 => /lib/libdl.so.2 (0xb7333000)
    libz.so.1 => /lib/libz.so.1 (0xb731e000)
    libk5crypto.so.3 => /usr/lib/libk5crypto.so.3 (0xb72fa000)
    libkrb5support.so.0 => /usr/lib/libkrb5support.so.0 (0xb72f1000)
    libkeyutils.so.1 => /lib/libkeyutils.so.1 (0xb72ed000)
    libresolv.so.2 => /lib/libresolv.so.2 (0xb72d9000)
    liblber-2.4.so.2 => /usr/lib/liblber-2.4.so.2 (0xb72cc000)
    libsasl2.so.2 => /usr/lib/libsasl2.so.2 (0xb72b4000)
    libgnutls.so.26 => /usr/lib/libgnutls.so.26 (0xb7218000)
    libtasn1.so.3 => /usr/lib/libtasn1.so.3 (0xb7207000)
    libgcrypt.so.11 => /lib/libgcrypt.so.11 (0xb7193000)
    libgpg-error.so.0 => /lib/libgpg-error.so.0 (0xb718e000)

我已经检查了权限并给了root相应的权限,我试图以root身份运行postgresql。

1 个答案:

答案 0 :(得分:1)

PostgreSQL拒绝以root身份运行。这样,后端的错误,以及用不可信语言编写的函数中的错误,不能用于在整个系统上执行任意操作。 PostgreSQL必须以相对有限的用户身份运行,通常是postgres用户和启动脚本通常会强制执行此操作。

postgres用户而不是root用户授予权限。然后一切都应该正常。