我最近遇到了一些奇怪的错误,每当我想要安装任何东西。这里有一个安装fluidsynth的例子。
$ 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玩过花招,所以我不知道为什么这会突然变成问题。
发布于 2013-11-03 19:47:12
删除/清除postgresql-9.1并重新安装它们:
sudo apt-get --purge autoremove postgresql-9.1 postgresql如果您真的使用postgresql,或者其他包依赖于它,您可以再次安装它。
sudo apt-get install postgresql the-other-program-that-got-removed顺便说一下,libfluidsynth1已经安装好了,您不需要再安装它了。
发布于 2014-04-27 02:34:40
还有一个更简单的解决方案: Postgresql需要存在"snakeoil“证书才能运行:/etc/ssl/私有/ssl-cert-snakeoil。如果从系统中删除了该证书,则可以用以下方式生成一个新证书
# make-ssl-cert generate-default-snakeoilhttps://askubuntu.com/questions/370612
复制相似问题