Installing apache2 fails in apache2.preinst when a previous version was in removed state

Bug #1312533 reported by mithereal
40
This bug affects 8 people
Affects Status Importance Assigned to Milestone
apache2 (Debian)
Fix Released
Unknown
apache2 (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

crashes on install

ProblemType: Package
DistroRelease: Ubuntu 14.04
Package: apache2 (not installed)
ProcVersionSignature: Ubuntu 3.13.0-24.46-generic 3.13.9
Uname: Linux 3.13.0-24-generic x86_64
Apache2ConfdDirListing: ['phpmyadmin.conf', 'bugzilla.conf', 'laravel.conf']
Apache2Modules: Error: [Errno 2] No such file or directory: '/usr/sbin/apachectl'
ApportVersion: 2.14.1-0ubuntu3
AptOrdering:
 apache2: Install
 apache2: Configure
Architecture: amd64
Date: Thu Apr 24 21:24:30 2014
DpkgTerminalLog:
 Preparing to unpack .../apache2_2.4.7-1ubuntu4_amd64.deb ...
 /var/lib/dpkg/tmp.ci/preinst: line 118: a2query: command not found
 dpkg: error processing archive /var/cache/apt/archives/apache2_2.4.7-1ubuntu4_amd64.deb (--unpack):
  subprocess new pre-installation script returned error exit status 1
DuplicateSignature: package:apache2:(not installed):subprocess new pre-installation script returned error exit status 1
ErrorMessage: subprocess new pre-installation script returned error exit status 1
InstallationDate: Installed on 2013-06-02 (326 days ago)
InstallationMedia: Xubuntu 13.04 "Raring Ringtail" - Release amd64 (20130423.1)
SourcePackage: apache2
Title: package apache2 (not installed) failed to install/upgrade: subprocess new pre-installation script returned error exit status 1
UpgradeStatus: Upgraded to trusty on 2014-04-25 (0 days ago)
error.log:
 [Thu Apr 24 13:47:18 2014] [notice] Apache/2.2.22 (Ubuntu) PHP/5.4.9-4ubuntu2.4 proxy_html/3.0.1 mod_perl/2.0.7 Perl/v5.14.2 configured -- resuming normal operations
 [Thu Apr 24 15:34:47 2014] [notice] caught SIGTERM, shutting down
modified.conffile..etc.apache2.mods.available.proxy.load: [modified]
modified.conffile..etc.apache2.sites.available.000.default.conf: [modified]
mtime.conffile..etc.apache2.mods.available.proxy.load: 2014-04-04T12:27:18.819161
mtime.conffile..etc.apache2.sites.available.000.default.conf: 2014-04-04T12:36:55.991138

Revision history for this message
mithereal (mithereal) wrote :
tags: removed: need-duplicate-check
Revision history for this message
Robie Basak (racb) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better.

Reproduced. I installed apache2 on Saucy, removed it (without purging), and then installed the apache2 package from Trusty.

summary: - package apache2 (not installed) failed to install/upgrade: subprocess
- new pre-installation script returned error exit status 1
+ Installing apache2 fails in apache2.preinst when a previous version was
+ in removed state
Robie Basak (racb)
Changed in apache2 (Ubuntu):
status: New → Triaged
importance: Undecided → Medium
Changed in apache2 (Debian):
status: Unknown → New
Revision history for this message
wlx (wangliangxu) wrote :
Revision history for this message
Bruno Ricardo Siqueira (brunoric) wrote :

Same problem here.

    vagrant@vagrant-ubuntu-trusty-64:~$ sudo apt-get install apache2
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    Suggested packages:
      apache2-doc apache2-suexec-pristine apache2-suexec-custom apache2-utils
    The following NEW packages will be installed:
      apache2
    0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
    13 not fully installed or removed.
    Need to get 0 B/87.7 kB of archives.
    After this operation, 473 kB of additional disk space will be used.
    (Reading database ... 61450 files and directories currently installed.)
    Preparing to unpack .../apache2_2.4.7-1ubuntu4_amd64.deb ...
    Unpacking apache2 (2.4.7-1ubuntu4) ...
    dpkg: error processing archive /var/cache/apt/archives/apache2_2.4.7-1ubuntu4_amd64.deb (--unpack):
     error setting ownership of `/var/www/html.dpkg-new': Operation not permitted
    Processing triggers for man-db (2.6.7.1-1) ...
    Errors were encountered while processing:
     /var/cache/apt/archives/apache2_2.4.7-1ubuntu4_amd64.deb
    E: Sub-process /usr/bin/dpkg returned an error code (1)
    vagrant@vagrant-ubuntu-trusty-64:~$

Also, the temporal solution didn't worked for me... =(

Changed in apache2 (Debian):
status: New → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package apache2 - 2.4.10-8ubuntu2

---------------
apache2 (2.4.10-8ubuntu2) vivid; urgency=medium

  * Allow "triggers-awaited" and "triggers-pending" states in addition to
    "installed" when determining whether to defer actions or process
    deferred actions (LP: #1393832).
 -- Colin Watson <email address hidden> Wed, 26 Nov 2014 11:31:44 +0000

Changed in apache2 (Ubuntu):
status: Triaged → Fix Released
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.