package roundcube-core 1.2~beta+dfsg.1-0ubuntu1 failed to install/upgrade: subprocess installed post-installation script returned error exit status 1

Bug #1607705 reported by Robert Cates
28
This bug affects 6 people
Affects Status Importance Assigned to Milestone
roundcube (Ubuntu)
Confirmed
Medium
Unassigned

Bug Description

A "simple" dist-upgrade from 14.04.x to 16.04.1 caused this error/problem.

ProblemType: Package
DistroRelease: Ubuntu 16.04
Package: roundcube-core 1.2~beta+dfsg.1-0ubuntu1
ProcVersionSignature: Ubuntu 4.4.0-31.50-generic 4.4.13
Uname: Linux 4.4.0-31-generic x86_64
ApportVersion: 2.20.1-0ubuntu2.1
Architecture: amd64
Date: Fri Jul 29 05:09:23 2016
ErrorMessage: subprocess installed post-installation script returned error exit status 1
InstallationDate: Installed on 2015-11-09 (262 days ago)
InstallationMedia: Xubuntu 14.04.3 LTS "Trusty Tahr" - Beta amd64 (20150805)
PackageArchitecture: all
RelatedPackageVersions:
 dpkg 1.18.4ubuntu1.1
 apt 1.2.12~ubuntu16.04.1
SourcePackage: roundcube
Title: package roundcube-core 1.2~beta+dfsg.1-0ubuntu1 failed to install/upgrade: subprocess installed post-installation script returned error exit status 1
UpgradeStatus: Upgraded to xenial on 2016-07-29 (0 days ago)

Revision history for this message
Robert Cates (robert-cates) wrote :
tags: removed: need-duplicate-check
Revision history for this message
Jun Inquig (juninquig) wrote :

I have the same problem when I upgraded from 14.04 to 16.04. The instruction is to run apt-get -f install and I got this error which obviously is very alien for me as a newbie. Any help will be appreciated. Thank you.

The following packages will be upgraded:
  roundcube roundcube-core
2 upgraded, 0 newly installed, 0 to remove and 18 not upgraded.
2 not fully installed or removed.
Need to get 0 B/1,930 kB of archives.
After this operation, 5,036 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Preconfiguring packages ...
(Reading database ... 324894 files and directories currently installed.)
Preparing to unpack .../roundcube-core_1.2~beta+dfsg.1-0ubuntu1_all.deb ...
dpkg-maintscript-helper: error: directory '/var/lib/roundcube/config' contains files not owned by package roundcube-core:all, cannot switch to symlink
dpkg: error processing archive /var/cache/apt/archives/roundcube-core_1.2~beta+dfsg.1-0ubuntu1_all.deb (--unpack):
 subprocess new pre-installation script returned error exit status 1
Reinstalling /etc/roundcube/db.inc.php that was moved away
dbconfig-common: flushing administrative password
dpkg: considering deconfiguration of roundcube-core, which would be broken by installation of roundcube ...
dpkg: yes, will deconfigure roundcube-core (broken by roundcube)
Preparing to unpack .../roundcube_1.2~beta+dfsg.1-0ubuntu1_all.deb ...
De-configuring roundcube-core (0.9.5-4) ...
dpkg-maintscript-helper: error: directory '/usr/share/doc/roundcube' contains files not owned by package roundcube:all, cannot switch to symlink
dpkg: error processing archive /var/cache/apt/archives/roundcube_1.2~beta+dfsg.1-0ubuntu1_all.deb (--unpack):
 subprocess new pre-installation script returned error exit status 1
dbconfig-common: flushing administrative password
Errors were encountered while processing:
 /var/cache/apt/archives/roundcube-core_1.2~beta+dfsg.1-0ubuntu1_all.deb
 /var/cache/apt/archives/roundcube_1.2~beta+dfsg.1-0ubuntu1_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in roundcube (Ubuntu):
status: New → Confirmed
Changed in roundcube (Ubuntu):
importance: Undecided → Medium
Revision history for this message
Martin Brunner (mbrunner1337) wrote :

Hi,
I experienced the exact same issue as described above.
Likewise it suggested to run apt-get -f install after which I ended up with the same error as described above.

The following did the trick for me:

1) make sure that the files in the directories it is complaining about have either the correct permissions and owner (e.g., "www-data") or move them temporarily such that the folders are empty:

the 2 relevant messages / directories are :
dpkg-maintscript-helper: error: directory '/var/lib/roundcube/config' contains files not owned by package roundcube-core:all, cannot switch to symlink

dpkg-maintscript-helper: error: directory '/usr/share/doc/roundcube' contains files not owned by package roundcube:all, cannot switch to symlink

2)Manually (re)install the roundcube-core package as follwos (order is important due to dependencies):

dpkg --auto-deconfigure -i /var/cache/apt/archives/roundcube-core_1.2~beta+dfsg.1-0ubuntu1_all.deb

3)Manually (re)install the roundcube package as follows:
 dpkg --auto-deconfigure -i /var/cache/apt/archives/roundcube_1.2~beta+dfsg.1-0ubuntu1_all.deb

4) adapt / overwrite your (pre-)existing configs if necessary/appropriate,
 enter your data / credentials in the subsequent dialog, reload services and be (hopefully) happy again :-)

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.