I'm trying to fix an APT setup in an Ubuntu server to which I only have SSH access and can't make head or tail of the dependency errors.
I've run sudo apt-get install -f
, and get the following:
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
4 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up ssl-cert (1.0.23ubuntu2) ...
dpkg: error processing ssl-cert (--configure):
subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of postgresql-common:
postgresql-common depends on ssl-cert (>= 1.0.11); however:
Package ssl-cert is not configured yet.
dpkg: error processing postgresql-common (--configure):
dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
dpkg: dependency problems prevent configuration of postgresql-8.4:
postgresql-8.4 depends on postgresql-common (>= 104~); however:
Package postgresql-common is not configured yet.
postgresql-8.4 depends on ssl-cert; however:
Package ssl-cert is not configured yet.
dpkg: error processing postgresql-8.4 (--configure):
dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
dpkg: dependency problems prevent configuration of postgresql:
postgresql depends on postgresql-8.4; however:
Package postgresql-8.4 is not configured yet.
dpkg: error processing postgresql (--configure):
dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
Errors were encountered while processing:
ssl-cert
postgresql-common
postgresql-8.4
postgresql
E: Sub-process /usr/bin/dpkg returned an error code (1)
What exactly does this mean? Is there a circular dependency?
I've tried installing the required dependency ssl-cert
but it doesn't work either.
I can't use dpkg
directly either.
Any tips on how to resolve this, or could someone help me to better understand the problem? Is there any additional information that I should provide?
===
EDIT:
Running sudo sh -x /path/to/config.postinst configure
yields the following output:
+ . /usr/share/debconf/confmodule
+ [ ! ]
+ PERL_DL_NONLAZY=1
+ export PERL_DL_NONLAZY
+ [ ]
+ exec /usr/share/debconf/frontend /var/lib/dpkg/info/ssl-cert.postinst configure
Does that mean that the script fails to execute the last line?
Running sudo /usr/share/debconf/frontend /var/lib/dpkg/info/ssl-cert.postinst configure
completes silently but a subsequent echo $?
yields 1
, indicating that an error did occur.
When I add set -x
to the top of the file, and then run the sudo ... frontend ... configure
command, it fails at:
make-ssl-cert generate-default-snakeoil
set -x
ing this file as well fails at:
openssl req -config /tmp/tmp.wPl6nkzKYm -new -x509 -days 3650 -nodes -out /etc/ssl/certs/ssl-cert-snakeoil.pem -keyout /etc/ssl/private/ssl-cert-snakeoil.key
Running this command with sudo
gives:
Generating a 1024 bit RSA private key
.....................++++++
.......................++++++
writing new private key to '/etc/ssl/private/ssl-cert-snakeoil.key'
-----
problems making Certificate Request
53829:error:0D07A097:asn1 encoding routines:ASN1_mbstring_ncopy:string too long:a_mbstr.c:154:maxsize=64
I'm not familiar with OpenSSL; what's going on here?
(Also, should I fork this to a new question? Has this question's scope been exceeded?)