[SOLVED]Problems when installing apache2

Questions about applications and software
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
grivusag

[SOLVED]Problems when installing apache2

Post by grivusag »

When i running this code in the terminal:

Code: Select all

sudo apt-get install apache2
I'm getting this error:

Code: Select all

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Suggested packages:
  apache2-doc apache2-suexec-pristine | apache2-suexec-custom
The following NEW packages will be installed:
  apache2
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 95.1 kB of archives.
After this operation, 534 kB of additional disk space will be used.
Get:1 http://ubuntu.mirrors.linux.ro/archive bionic-updates/main amd64 apache2 amd64 2.4.29-1ubuntu4.5 [95.1 kB]
Fetched 95.1 kB in 0s (1,518 kB/s) 
(Reading database ... 741928 files and directories currently installed.)
Preparing to unpack .../apache2_2.4.29-1ubuntu4.5_amd64.deb ...
Restoring lost conffile /etc/apache2/mods-available/cern_meta.load.
/var/lib/dpkg/tmp.ci/preinst: line 149: /etc/apache2/mods-available/cern_meta.load: No such file or directory
dpkg: error processing archive /var/cache/apt/archives/apache2_2.4.29-1ubuntu4.5_amd64.deb (--unpack):
 new apache2 package pre-installation script subprocess returned error exit status 1
Errors were encountered while processing:
 /var/cache/apt/archives/apache2_2.4.29-1ubuntu4.5_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
grivusag

Re: Problems when installing apache2

Post by grivusag »

You can resolve the problem in this way:

Code: Select all

sudo apt-get purge apache2
sudo apt-get install apache2
Locked

Return to “Software & Applications”