package apache2 2.2.22-1ubuntu1.7 failed to install/upgrade: error setting ownership of `./etc/apache2/sites-available/000-default.conf': Invalid argument

Asked by Dan

The overall upgrade completed, but these failed.

ProblemType: Package
DistroRelease: Ubuntu 14.04
Package: apache2 2.2.22-1ubuntu1.7
ProcVersionSignature: Ubuntu 3.13.0-39.66-generic 3.13.11.8
Uname: Linux 3.13.0-39-generic i686
Apache2ConfdDirListing: ['localized-error-pages', 'security', 'gitweb-old', 'charset', 'other-vhosts-access-log']
Apache2Modules: Error: [Errno 2] No such file or directory: '/usr/sbin/apachectl'
ApportVersion: 2.14.1-0ubuntu3.5
Architecture: i386
Date: Tue Nov 18 12:59:03 2014
Dependencies:

DuplicateSignature: package:apache2:2.2.22-1ubuntu1.7:error setting ownership of `./etc/apache2/sites-available/000-default.conf': Invalid argument
ErrorMessage: error setting ownership of `./etc/apache2/sites-available/000-default.conf': Invalid argument
InstallationDate: Installed on 2013-02-25 (630 days ago)
InstallationMedia: Ubuntu-Server 10.04.1 LTS "Lucid Lynx" - Release i386 (20100816.2)
SourcePackage: apache2
Title: package apache2 2.2.22-1ubuntu1.7 failed to install/upgrade: error setting ownership of `./etc/apache2/sites-available/000-default.conf': Invalid argument
UpgradeStatus: Upgraded to trusty on 2014-11-18 (0 days ago)

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu apache2 Edit question
Assignee:
No assignee Edit question
Solved by:
Dan
Solved:
Last query:
Last reply:
Revision history for this message
Dan (dan-pdxrevolution) said :
#1
Revision history for this message
actionparsnip (andrew-woodhead666) said :
#2

What is the output of:

apt-cache policy apache2

Thanks

Revision history for this message
Dan (dan-pdxrevolution) said :
#3

apache2:
  Installed: 2.2.22-1ubuntu1.7
  Candidate: 2.2.22-1ubuntu1.7
  Version table:
 *** 2.2.22-1ubuntu1.7 0
        500 http://us.archive.ubuntu.com/ubuntu/ precise-updates/main i386 Packages
        500 http://security.ubuntu.com/ubuntu/ precise-security/main i386 Packages
        100 /var/lib/dpkg/status
     2.2.22-1ubuntu1 0
        500 http://us.archive.ubuntu.com/ubuntu/ precise/main i386 Packages

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#4

Try:

cd /; sudo apt-get install apache2

Revision history for this message
Dan (dan-pdxrevolution) said :
#5

# cd /; sudo apt-get install apache2
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
  apache2
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
4 not fully installed or removed.
Need to get 0 B/87.6 kB of archives.
After this operation, 473 kB of additional disk space will be used.
(Reading database ... 718789 files and directories currently installed.)
Preparing to unpack .../apache2_2.4.7-1ubuntu4.1_i386.deb ...
Unpacking apache2 (2.4.7-1ubuntu4.1) ...
dpkg: error processing archive /var/cache/apt/archives/apache2_2.4.7-1ubuntu4.1_i386.deb (--unpack):
 error setting ownership of `./etc/apache2/sites-available/000-default.conf': Invalid argument
Processing triggers for ureadahead (0.100.0-16) ...
Processing triggers for ufw (0.34~rc-0ubuntu2) ...
Errors were encountered while processing:
 /var/cache/apt/archives/apache2_2.4.7-1ubuntu4.1_i386.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

Revision history for this message
Dan (dan-pdxrevolution) said :
#6

So, I actually figured it out. I had to nuke /etc/apache2/* in order to get past the error. for some reason the system was hung up on it. Not entirely sure why that happened. but everything appears to be working correctly now.