我使用add-apt-repository ppa:pitti/postgresql使用apt-get install postgresql-9.2安装PostgreSQL9.2
在安装结束时,每次我尝试使用以下命令启动postgresql时
/etc/init.d/postgresql start或
service postgresql start我知道这个错误:
Error: could not exec /usr/lib/postgresql/9.2/bin/pg_ctl
/usr/lib/postgresql/9.2/bin/pg_ctl start -D /var/lib/postgresql/9.2/main -l
/var/log/postgresql/postgresql-9.2-main.log -s -o -c
config_file="/etc/postgresql/9.2/main/postgresql.conf" :
[fail]
invoke-rc.d: initscript postgresql, action "start" failed.
dpkg: error processing postgresql-9.2 (--configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
postgresql-9.2
E: Sub-process /usr/bin/dpkg returned an error code (1)我试过这里找到的所有东西:如何彻底清除和重新安装ubuntu上的postgresql和消除ubuntu 10-04上的非工作postgresql安装并启动af。
我也做过
dpkg -P --force-remove-reinstreq postgresql-client-9.2在试图从服务器删除与postgres相关的所有内容时。
删除postgresql之后,我使用了
dpkg --get-selections | grep postg为了确保没有什么剩下的,我可以做一个干净的安装。
我还确保错误消息中提到的文件和文件夹具有正确的权限。/var/log/postgresql/postgresql-9.2-main.log文件为空。我尝试过从8.3到9.2安装每个postgresql版本,每次都会遇到相同的错误。我曾经设法从他们的网站上提供的源代码编译postgresql,但是我在psycopg2中遇到了奇怪的错误,所以我想我应该以这种方式安装postgresql,并避免这些错误。此外,当我键入apt-get install postgresql时,它默认情况下会尝试安装8.3版本,即使我可以通过键入apt-get install postgresql-9.2找到包。
发布于 2012-10-16 17:52:41
我找到了我自己问题的答案。我在服务器上安装了Zend,这会干扰安装过程并导致错误。由于我不需要Zend,所以我删除了它,并通过键入以下方法确保任何与Zend相关的内容都被删除:
"rm -r /usr/local/zend"之后,Postgresql安装和启动顺利。我不能推荐这个解决方案,如果你需要你的Zend,但对我来说,它是有效的。我希望这会对处于类似情况的人有所帮助。
https://askubuntu.com/questions/201638
复制相似问题