0

I am trying to install apache2 on Ubuntu 16.04. The command used is:

sudo apt-get install apache2 

Following errors are reported :

Setting up linux-image-4.4.0-66-generic (4.4.0-66.87) ...
Running depmod.
Failed to run depmod
dpkg: error processing package linux-image-4.4.0-66-generic (--configure):
 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of linux-image-extra-4.4.0-66-generic:
 linux-image-extra-4.4.0-66-generic depends on linux-image-4.4.0-66-generic; however:
  Package linux-image-4.4.0-66-generic is not configured yet.

dpkg: error processing package linux-image-extra-4.4.0-66-generic (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of linux-image-generic:
 linux-image-generic depends on linux-image-4.4.0-66-generic; however:
  Package linux-image-4.4.0-66-generic is not configured yet.
 linux-image-generic depends on linux-image-extra-4.4.0-66-generic; however:
  Package linux-image-extra-4.4.0-66-generic is not configured yet.

No apport report written because the error message indicates its a followup error from a previous failure.
                                                                                                          dpkg: error processing package linux-image-generic (--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 linux-generic:
 linux-generic depends on linux-image-generic (= 4.4.0.66.70); however:
  Package linux-image-generic is not configured yet.

dpkg: error processing package linux-generic (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
                                                              Errors were encountered while processing:
 linux-image-4.4.0-66-generic
 linux-image-extra-4.4.0-66-generic
 linux-image-generic
 linux-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)

I am new user of Ubuntu. Please let me know how to resolve this issue ?

Thanks
Sakshi

Thomas
  • 6,223
sakshi
  • 101

1 Answers1

2

Apache2 depends on another package (linux-generic), which wasn't configured properly. Run the command

sudo dpkg --configure -a

and it should be able to correct itself.

What this command does: Sudo (execute this command with root privileges, because regular users aren't allowed to use dpkg) Dpkg (the program for interacting with software packages) --configure (an argument passed to dpkg, e.g. "here's what i want you to do, dpkg: configure some package) -a (automatic: instead of configuring a specific package, configure whichever packages need configuring)

If it doesn't work, try running

sudo apt-get install -f
(to fix broken packages) and then try running
sudo dpkg --configure -a
again.
Rik
  • 21