preinst: line 118: a2query: command not found

L'Antre du Tryphon

schedule
2014-05-04 | 17:45h
update
2014-05-04 | 17:45h
person
www.ctheroux.com
domain
www.ctheroux.com

preinst: line 118: a2query: command not found

If you are getting the following errors while trying to install Apache on Trusty (Ubuntu 14.04), execute the commands below and try to re-install it.


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
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)

Advertisement

The commands to resolve this issue are:

dpkg --fsys-tarfile /var/cache/apt/archives/apache2_2.4.7-1ubuntu4_amd64.deb | tar xOf - ./usr/sbin/a2query > /usr/sbin/a2query

chmod 755 /usr/sbin/a2query

Replace /var/cache/apt/archives/apache2_2.4.7-1ubuntu4_amd64.deb with the name of the file given in the error messages. Note that the first command is splitted on two lines in the above. So, copy both lines at once before pasting it in a terminal window.

Advertisement

Imprint
Responsible for the content:
www.ctheroux.com
Privacy & Terms of Use:
www.ctheroux.com
Mobile website via:
WordPress AMP Plugin
Last AMPHTML update:
10.04.2024 - 06:47:56
Privacy-Data & cookie usage: