Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

With Ubuntu 13.04, I'm unable to install any parts of the LAMP stack due to broken packages. I've tried

sudo apt-get -f install php5
sudo apt-get --purge remove php5 
sudo apt-get autoremove 

as well as trying to install all the dependencies listed in all permutations of the order

sudo apt-get --fix-broken --ignore-hold install php5
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:
 php5 : Depends: libapache2-mod-php5 (>= 5.4.9-4ubuntu2) but it is not going to be installed or
             libapache2-mod-php5filter (>= 5.4.9-4ubuntu2) but it is not going to be installed or
             php5-cgi (>= 5.4.9-4ubuntu2) but it is not going to be installed or
             php5-fpm (>= 5.4.9-4ubuntu2) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

would love some insight, I think it has to do with distro upgrade

edit: some more output form apt

root@ascension:/home/kevin# dpkg --configure -a
root@ascension:/home/kevin# apt-get install -f
Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
root@ascension:/home/kevin# apt-get install php5
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:
 php5 : Depends: libapache2-mod-php5 (>= 5.4.9-4ubuntu2) but it is not going to be     installed or
             libapache2-mod-php5filter (>= 5.4.9-4ubuntu2) but it is not going to be installed or
             php5-cgi (>= 5.4.9-4ubuntu2) but it is not going to be installed or
             php5-fpm (>= 5.4.9-4ubuntu2) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
root@ascension:/home/kevin# apt-get remove php5-fpm
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package 'php5-fpm' is not installed, so not removed
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
root@ascension:/home/kevin# apt-get remove php5-cgi
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package 'php5-cgi' is not installed, so not removed
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
root@ascension:/home/kevin# apt-get remove libapache2-mod-php5filter
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package 'libapache2-mod-php5filter' is not installed, so not removed
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
root@ascension:/home/kevin# 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-mpm-worker (= 2.2.22-6ubuntu5) but it is not going to be     installed or
                apache2-mpm-prefork (= 2.2.22-6ubuntu5) but it is not going to be installed or
                apache2-mpm-event (= 2.2.22-6ubuntu5) but it is not going to be installed or
                apache2-mpm-itk (= 2.2.22-6ubuntu5) but it is not going to be installed
       Depends: apache2.2-common (= 2.2.22-6ubuntu5) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

Edit, per @Braiam

apt-cache output:

php5:
Installed: (none)
Candidate: 5.4.9-4ubuntu2
Version table:
 5.4.9-4ubuntu2 0
    500 http://us.archive.ubuntu.com/ubuntu/ raring/main amd64 Packages
libapache2-mod-php5:
Installed: (none)
Candidate: 5.4.9-4ubuntu2
Version table:
 5.4.9-4ubuntu2 0
    500 http://us.archive.ubuntu.com/ubuntu/ raring/main amd64 Packages
php5-cgi:
Installed: (none)
Candidate: 5.4.9-4ubuntu2
Version table:
 5.4.9-4ubuntu2 0
    500 http://us.archive.ubuntu.com/ubuntu/ raring/main amd64 Packages
php5-fpm:
Installed: (none)
Candidate: 5.4.9-4ubuntu2
Version table:
 5.4.9-4ubuntu2 0
    500 http://us.archive.ubuntu.com/ubuntu/ raring/universe amd64 Packages

cat of sources.list & /etc/apt/sources.list.d/*.list

# deb cdrom:[Ubuntu 12.10 _Quantal Quetzal_ - Release amd64 (20121017.5)]/ .Trashes/501/dists/raring/main/binary-i386/

# deb cdrom:[Ubuntu 12.10 _Quantal Quetzal_ - Release amd64 (20121017.5)]/ .Trashes/501/dists/raring/restricted/binary-i386/
# deb cdrom:[Ubuntu 12.10 _Quantal Quetzal_ - Release amd64 (20121017.5)]/ quantal main restricted
# deb cdrom:[Ubuntu 12.10 _Quantal Quetzal_ - Release amd64 (20121017.5)]/.Trashes/501/ raring main restricted

# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://us.archive.ubuntu.com/ubuntu/ raring main restricted
deb-src http://us.archive.ubuntu.com/ubuntu/ raring main restricted

## Major bug fix updates produced after the final release of the
## distribution.

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb http://us.archive.ubuntu.com/ubuntu/ raring universe
deb-src http://us.archive.ubuntu.com/ubuntu/ raring universe

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu 
## team, and may not be under a free licence. Please satisfy yourself as to 
## your rights to use the software. Also, please note that software in 
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://us.archive.ubuntu.com/ubuntu/ raring multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ raring multiverse

## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.


## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
# deb http://archive.canonical.com/ubuntu quantal partner
# deb-src http://archive.canonical.com/ubuntu quantal partner

## This software is not part of Ubuntu, but is offered by third-party
## developers who want to ship their latest software.
# deb http://extras.ubuntu.com/ubuntu raring main
# deb-src http://extras.ubuntu.com/ubuntu raring main

#spotify yo
# deb http://repository.spotify.com stable non-free
deb http://us.archive.ubuntu.com/ubuntu/ raring-updates universe main restricted multiverse
deb http://security.ubuntu.com/ubuntu/ raring-security universe main restricted multiverse

As you can see, all the entries are raring, and there doesn't seem to be any other issues. Fresh out of ideas.

share|improve this question
    
Is anyone able to share some insight? I've tried everything I can think of –  Kevin Qualters Oct 10 '13 at 23:49
    
Can you provide the output of apt-cache policy php5 libapache2-mod-php5 php5-cgi php5-fmp also the output of cat /etc/apt/sources.list /etc/apt/sources.list.d/*.list. –  Braiam Oct 15 '13 at 14:04
add comment

1 Answer

Install php5:

sudo apt-get install php5

Install apache:

sudo apt-get install apache2

For using php5 with apache2, install:

sudo apt-get install libapache2-mod-php5

Install mysql client and server:

sudo apt-get install mysql-client mysql-server

And that's it, you have your LAMP stack installed!

one liner:

sudo apt-get install php5 apache2 libapache2-mod-php5 mysql-client mysql-server
share|improve this answer
    
I don't think you understand, trying to install any of these tells me I have broken packages, no matter the order. –  Kevin Qualters Oct 10 '13 at 22:18
    
I have done some search and found this link. This could solve your problem... –  Luka Klarić Oct 11 '13 at 7:33
    
Still didn't work unfortunately, something strange definitely happened, and I'll likely have to compile a few things myself. Thanks for the effort on your part, I'll go ahead and accept the answer. –  Kevin Qualters Oct 14 '13 at 23:59
    
@KevinQualters if it doesn't answer your problem please don't mark a answer as solved. –  Braiam Oct 15 '13 at 14:02
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.