首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >每次我尝试安装软件包时,APT都会尝试配置PostgreSQL

每次我尝试安装软件包时,APT都会尝试配置PostgreSQL
EN

Ask Ubuntu用户
提问于 2013-11-03 19:25:30
回答 2查看 8.4K关注 0票数 4

我最近遇到了一些奇怪的错误,每当我想要安装任何东西。这里有一个安装fluidsynth的例子。

代码语言:javascript
复制
$ sudo apt-get install libfluidsynth1
Reading package lists... Done
Building dependency tree       
Reading state information... Done
libfluidsynth1 is already the newest version.
libfluidsynth1 set to manually installed.
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
2 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue [Y/n]? y
Setting up postgresql-9.1 (9.1.10-0ubuntu12.04) ...
 * Starting PostgreSQL 9.1 database server                                                                                                                     * The PostgreSQL server failed to start. Please check the log output:
2013-11-03 14:21:42 EST FATAL:  could not access private key file "server.key": No such file or directory
                                                                                                                                                       [fail]
invoke-rc.d: initscript postgresql, action "start" failed.
dpkg: error processing postgresql-9.1 (--configure):
 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of postgresql:
 postgresql depends on postgresql-9.1; however:
  Package postgresql-9.1 is not configured yet.
dpkg: error processing postgresql (--configure):
 dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
                                                                                                          Errors were encountered while processing:
 postgresql-9.1
 postgresql
E: Sub-process /usr/bin/dpkg returned an error code (1)

我要跑12.04。是什么导致了这件事,我该怎么处理呢?这种情况发生在安装很多东西上,似乎意味着我需要初始化postgresql或什么的。我不记得和postgres玩过花招,所以我不知道为什么这会突然变成问题。

EN

回答 2

Ask Ubuntu用户

回答已采纳

发布于 2013-11-03 19:47:12

删除/清除postgresql-9.1并重新安装它们:

代码语言:javascript
复制
sudo apt-get --purge autoremove postgresql-9.1 postgresql

如果您真的使用postgresql,或者其他包依赖于它,您可以再次安装它。

代码语言:javascript
复制
sudo apt-get install postgresql the-other-program-that-got-removed

顺便说一下,libfluidsynth1已经安装好了,您不需要再安装它了。

票数 5
EN

Ask Ubuntu用户

发布于 2014-04-27 02:34:40

还有一个更简单的解决方案: Postgresql需要存在"snakeoil“证书才能运行:/etc/ssl/私有/ssl-cert-snakeoil。如果从系统中删除了该证书,则可以用以下方式生成一个新证书

代码语言:javascript
复制
# make-ssl-cert generate-default-snakeoil
票数 0
EN
页面原文内容由Ask Ubuntu提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://askubuntu.com/questions/370612

复制
相关文章

相似问题

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