1

I am using ubnutu 14.04 os I tried to reistall apache but not able to achieve it, now I am getting the following error message

govind@govind-Inspiron-N5050:~$ sudo apt-get install apache2
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 apache2 : Depends: apache2-bin (= 2.4.7-1ubuntu4.5) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

I have tried the following commands based on searched results but no Luck :(

sudo apt-get --purge remove apache2 apache2-mpm-prefork apache2-utils apache2.2-common libapache2-mod-php5 
sudo apt-get autoremove  
sudo apt-get install -f    
sudo apt-get install lamp-server^ --reinstall    
sudo apt-get install apache2-bin:i386   
sudo apt-get upgrade   
sudo apt-get dist-upgrade    

The apache is been removed now, I am not seeing apache folder in my system. But I am unable to install the apache back again.

Posting the output of the command - apt-cache policy apache2 apache2-bin

govind@govind-Inspiron-N5050:~$ apt-cache policy apache2 apache2-bin
apache2:
  Installed: (none)
  Candidate: 2.4.7-1ubuntu4.5
  Version table:
     2.4.7-1ubuntu4.5 0
        500 http:// in.archive.ubuntu.com/ubuntu/ trusty-updates/main amd64 Packages
        500 http:// security.ubuntu.com/ubuntu/ trusty-security/main amd64 Packages
     2.4.7-1ubuntu4 0
        500 http:// in.archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages
apache2-bin:
  Installed: (none)
  Candidate: 2.4.7-1ubuntu4.5
  Version table:
     2.4.7-1ubuntu4.5 0
        500 http:// in.archive.ubuntu.com/ubuntu/ trusty-updates/main amd64 Packages
        500 http:// security.ubuntu.com/ubuntu/ trusty-security/main amd64 Packages
     2.4.7-1ubuntu4 0
        500 http:// in.archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages
govind@govind-Inspiron-N5050:~$ 

Posting the result of the command sudo apt-get install apache2=2.4.7-1ubuntu4.5 apache2-bin=2.4.7-1ubuntu4.5

govind@govind-Inspiron-N5050:~$ sudo apt-get install apache2=2.4.7-1ubuntu4.5 apache2-bin=2.4.7-1ubuntu4.5
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 apache2-bin : Depends: libaprutil1-dbd-sqlite3 but it is not going to be installed or
                        libaprutil1-dbd-mysql but it is not going to be installed or
                        libaprutil1-dbd-odbc but it is not going to be installed or
                        libaprutil1-dbd-pgsql but it is not going to be installed or
                        libaprutil1-dbd-freetds but it is not installable
               Depends: libaprutil1-ldap but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
govind@govind-Inspiron-N5050:~$ 

@A.B: Adding the output of sudo apt-get install apache-bin and apt-cache policy libaprutil1-dbd-sqlite3

govind@govind-Inspiron-N5050:~$ sudo apt-get install apache2-bin
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 apache2-bin : Depends: libaprutil1-dbd-sqlite3 but it is not going to be installed or
                        libaprutil1-dbd-mysql but it is not going to be installed or
                        libaprutil1-dbd-odbc but it is not going to be installed or
                        libaprutil1-dbd-pgsql but it is not going to be installed or
                        libaprutil1-dbd-freetds but it is not installable
               Depends: libaprutil1-ldap but it is not going to be installed
E: Unable to correct problems, you have held broken packages.


govind@govind-Inspiron-N5050:~$ apt-cache policy libaprutil1-dbd-sqlite3
libaprutil1-dbd-sqlite3:
  Installed: (none)
  Candidate: 1.5.3-1
  Version table:
     1.5.3-1 0
        500 http://archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages

govind@govind-Inspiron-N5050:~$ apt-cache policy libaprutil1-dbd-mysql
libaprutil1-dbd-mysql:
  Installed: (none)
  Candidate: 1.5.3-1
  Version table:
     1.5.3-1 0
        500 http://archive.ubuntu.com/ubuntu/ trusty/universe amd64 Packages
govind@govind-Inspiron-N5050:~$ apt-cache policy libaprutil1-dbd-odbc
libaprutil1-dbd-odbc:
  Installed: (none)
  Candidate: 1.5.3-1
  Version table:
     1.5.3-1 0
        500 http://archive.ubuntu.com/ubuntu/ trusty/universe amd64 Packages
govind@govind-Inspiron-N5050:~$ apt-cache policy libaprutil1-dbd-pgsql
libaprutil1-dbd-pgsql:
  Installed: (none)
  Candidate: 1.5.3-1
  Version table:
     1.5.3-1 0
        500 http://archive.ubuntu.com/ubuntu/ trusty/universe amd64 Packages
govind@govind-Inspiron-N5050:~$ apt-cache policy libaprutil1-dbd-freetds
libaprutil1-dbd-freetds:
  Installed: (none)
  Candidate: (none)
  Version table:
govind@govind-Inspiron-N5050:~$ apt-cache policy libaprutil1-ldap
libaprutil1-ldap:
  Installed: (none)
  Candidate: 1.5.3-1
  Version table:
     1.5.3-1 0
        500 http://archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages
  • please edit your question and add output of apt-cache policy apache2 apache2-bin – Ravan Sep 8 '15 at 12:40
  • @Ravan: Edited the post with the output of apt-cache policy apache2 apache2-bin – Govind Sep 8 '15 at 12:57
  • What does sudo apt-get install apache2=2.4.7-1ubuntu4.5 apache2-bin=2.4.7-1ubuntu4.5 do? – Byte Commander Sep 8 '15 at 12:58
  • @ByteCommander: Edited the Post with the result of above command. – Govind Sep 8 '15 at 13:05
  • Use the main server via sudo sed -i.bak 's/http:\/\/in./http:\/\//' /etc/apt/sources.list start sudo apt-get update and try it again – A.B. Sep 8 '15 at 13:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.