8

I was trying to reinstall my apache 2 after un-installing it. But on installing it using command-

sudo apt-get install apache2

i am getting error-

rahul@rahulpc:~$ sudo apt-get install apache2
[sudo] password for rahul: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
apache2 is already the newest version.
The following packages were automatically installed and are no longer required:
  libblas3 liblinear-tools liblinear1
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 474 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Setting up javascript-common (11) ...
dpkg: error processing package javascript-common (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 javascript-common
E: Sub-process /usr/bin/dpkg returned an error code (1)

i think i have removed some essential directories while un-installing apache 2 . Anybody please help me to recover the files and to install apache 2.

3
  • For the javascript-common issue run sudo apt-get clean && sudo apt-get autoclean..now reinstall apache2 with sudo apt-get --reinstall install apache2
    – heemayl
    Mar 23, 2015 at 22:11
  • Thanks for answer @heemayl, your first command runs fine but on running 2nd command ie reinstalling apache2 it again gives same error. Mar 25, 2015 at 13:59
  • @RahulSatal Have you found a solution? I have the same problem. Thank you
    – stuzzo
    Jun 9, 2015 at 14:40

3 Answers 3

9

Remove javascript common and reinstall again :

sudo apt-get purge javascript-common 

sudo apt-get install javascript-common

And then install packages.

Source : http://ubuntuforums.org/showthread.php?t=2232128

1
3

i uninstall it , and the dpkg reconfigure

apt-get --purge remove javascript-common

sudo dpkg --configure -a

if you need it , install it again

sudo apt-get update

sudo apt-get install javascript-common

2

My problem was with javascript-common (I use Dedian) not being configured. My solution was to remove it and to install apache2 before installing javascript-common. It seems that javascript-common expects some configuration files to be exitent before being able to configure it.

sudo touch /etc/apache2/conf-available/javascript-common.conf

sudo apt-get install apache2

Download the javascript-common_11_all.deb package manually and instaled it with

dpkg -i  javascript-common_11_all.deb --force-all

good luck

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .