Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

In short: I am trying to install spamassassin but dpkg returns only with:

dpkg: error processing spamassassin (--configure):
subprocess installed post-installation script returned error exit status 1

I have tried to find more information about what is going wrong but I cannot find anywhere any useful logging.

In /var/crash a spamassassin crashreport is generated but this gives only old dpkg errors and:

 Start-Date: 2014-02-17  19:18:13
 Commandline: apt-get install spamassassin
AptOrdering:
 spamassassin: Configure
 amavisd-new-postfix: Configure

Followed by dmesg logging from startup. Amavis gives an error because dependency spamassassin is not configured.

I checked the log files:

apt history.log
apt term.log
dpkg.log
syslog.log

but no additional information.

I tried dpkg -D with all possible octals but I find nothing useful about what could go wrong.

Lots of questions and possible solutions have been written about dpkg errors and many I have tried, but with no additional information I do not have the feeling I am getting anywhere.

Surely there must be somewhere a possibility to read what is going wrong or to crank up some logging so it will be logged?

share|improve this question
    
You have to scroll up in your terminal and see the specific error, in the message you saw. To debug these, you have to see what the exact error was that triggered this. –  Thomas W. Feb 17 at 19:05
    
there should be a description in the terminal, have you looked into /var/log/spamassassin/spamd.log ? –  kamil Feb 17 at 19:06
    
I have plowed through all logs, purged, redone installation in many different ways. All to find a bit more information about the error, but I can not find any. Spamd.log is not being made yet. –  Requist Feb 17 at 19:26

1 Answer 1

up vote 1 down vote accepted

Ok, I have found the solution for this problem. Thought I was unable to crank up the logging to get more data, the data already presented had the clue to the problem.

dpkg: error processing spamassassin (--configure):
subprocess installed post-installation script returned error exit status 1

says dpkg encountered an error processing spamassassin while running configure. Next line tels us the post-installation script did not finish correct.

In the /var/lib/dpkg/info dir we can locate the script files of dpkg, the file: spamassassin.postinst gives us the script file which generated the error.

Within this file we know we have to look at the code runned by configure:

if [ "$1" = "configure" ]; then

and after some debugging I found out the line:

su debian-spamd -c "sa-update --gpghomedir /var/lib/spamassassin/sa-update-keys \ --import /usr/share/spamassassin/GPG.KEY"

returned exit code 1 (run command @commandline and use echo $? next to get the exit code)

The problem was that the user debian-spamd already existed on my system but its login shell was /bin/false. Su-ing with /bin/false returns without any message but exitcode 1.

Adding -s /bin/sh to the command solved the problem though in the end I did alter the login shell of the user to stay in sync with future updates.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.