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.

I have installed php and apache2 server before but I'm getting bogged down with errors.

The process so far is as follows:

sudo apt-get install tasknet
sudo apt-get install lamp-server

During the installation, tasksel stops with

tasksel: aptitude failed (100)

I tried:

sudo tasksel remove lamp-server
sudo apt-get install lamp-server

With the same error

Next I tried

sudo apt-get update && sudo apt-get upgrade

with the following result:

Setting up mysql-server-5.5 (5.5.31-0ubuntu0.13.04.1) ...
start: Job failed to start
invoke-rc.d: initscript mysql, action "start" failed.
dpkg: error processing mysql-server-5.5 (--configure):
 subprocess installed post-installation script returned error exit status 1
Setting up php5-common (5.4.9-4ubuntu2.1) ...
Not replacing deleted config file /etc/php5/mods-available/pdo.ini
ERROR: /etc/php5/mods-available/pdo.ini does not exist
dpkg: error processing php5-common (--configure):
 subprocess installed post-installation script returned error exit status 2
dpkg: dependency problems prevent configuration of php5-cli:
 php5-cli depends on php5-common (= 5.4.9-4ubuntu2.1); however:
  Package php5-common is not configured yet.

dpkg: error processing php5-cli (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of libapache2-mod-php5:
 libapache2-mod-php5 depends on php5-common (= 5.4.9-4ubuntu2.1); however:
  Package php5-common is not configured yet.

dpkg: error processing libapache2-mod-php5 (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of php5-mysql:
 php5-mysql depends on phpapi-20100525; however:
  Package phpapi-20100525 is not installed.
  Package libapache2-mod-php5filter which provides phpapi-20100525 is not installed.
  Package libapache2-mod-php5 which provides phpapi-20100525 is not configured yet.
  Package php5-cli which provides phpapi-20100525 is not configured yet.
 php5-mysql depends on php5-common (= 5.4.9-4ubuntuNo apport report written because the error message indicates it's a follow-up error from a previous failure.
No apport report written because MaxReports has already been reached
No apport report written because MaxReports has already been reached
No apport report written because MaxReports has already been reached
2.1); however:
  Package php5-common is not configured yet.

dpkg: error processing php5-mysql (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of mysql-server:
 mysql-server depends on mysql-server-5.5; however:
  Package mysql-server-5.5 is not configured yet.

dpkg: error processing mysql-server (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 mysql-server-5.5
 php5-common
 php5-cli
 libapache2-mod-php5
 php5-mysql
 mysql-server
E: Sub-process /usr/bin/dpkg returned an error code (1)

So I tried:

sudo dpkg --configure -a

and got the following:

Setting up php5-common (5.4.9-4ubuntu2.1) ...
Not replacing deleted config file /etc/php5/mods-available/pdo.ini
ERROR: /etc/php5/mods-available/pdo.ini does not exist
dpkg: error processing php5-common (--configure):
 subprocess installed post-installation script returned error exit status 2
Setting up mysql-server-5.5 (5.5.31-0ubuntu0.13.04.1) ...
start: Job failed to start
invoke-rc.d: initscript mysql, action "start" failed.
dpkg: error processing mysql-server-5.5 (--configure):
 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of php5-cli:
 php5-cli depends on php5-common (= 5.4.9-4ubuntu2.1); however:
  Package php5-common is not configured yet.

dpkg: error processing php5-cli (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of libapache2-mod-php5:
 libapache2-mod-php5 depends on php5-common (= 5.4.9-4ubuntu2.1); however:
  Package php5-common is not configured yet.

dpkg: error processing libapache2-mod-php5 (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of mysql-server:
 mysql-server depends on mysql-server-5.5; however:
  Package mysql-server-5.5 is not configured yet.

dpkg: error processing mysql-server (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of php5-mysql:
 php5-mysql depends on phpapi-20100525; however:
  Package phpapi-20100525 is not installed.
  Package libapache2-mod-php5filter which provides phpapi-20100525 is not installed.
  Package libapache2-mod-php5 which provides phpapi-20100525 is not configured yet.
  Package php5-cli which provides phpapi-20100525 is not configured yet.
 php5-mysql depends on php5-common (= 5.4.9-4ubuntu2.1); however:
  Package php5-common is not configured yet.

dpkg: error processing php5-mysql (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 php5-common
 mysql-server-5.5
 php5-cli
 libapache2-mod-php5
 mysql-server
 php5-mysql

After looking through these errors, I tried installing mySQL server again manually with

sudo apt-get install mysql-server-5.5

but got the same errors as I recieved in the last set of errors.

I ran

 sudo tasksel --test

with the following result:

debconf-apt-progress -- apt-get -q -y install lamp-server^

so I ran this command with sudo and at 15% it said installing mysql-server then on to mysql-com at 18% where it stopped.

Ran through a few of the commands I had already tried with the same results.

The Question.

Please can you advise what I should do next?

UPDATE

I entered sudo apt-get update && sudo apt-get upgrade and after downloading and checking the packages the following report was given:

0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
6 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 mysql-server-5.5 (5.5.31-0ubuntu0.13.04.1) ...
start: Job failed to start
invoke-rc.d: initscript mysql, action "start" failed.

etc. etc. etc.

share|improve this question
add comment

2 Answers

up vote 1 down vote accepted

Instead of using lamp-server and tasksel, I recommend people to install apache and mysql the normal way, which is how they are usually setup on servers.

sudo apt-get install apache2 php5 libapache2-mod-php5 mysql-server php5-mysql
sudo service apache2 restart

This is compatible with how many other packages that are installed. For instance, you can do

sudo apt-get install phpmyadmin

and browse it on http://localhost/phpmyadmin/

share|improve this answer
    
should I run sudo tasksel remove lamp-server and sudo apt-get purge tasksel first? –  SimplySimon Jun 13 '13 at 15:05
    
Yes, you'd need to remove these before trying my method. –  Capt.Nemo Jun 13 '13 at 15:07
    
Just done that and get the same results. How do I completely remove everything I have tried to install over the past couple of days? as I think that previous attempts may have blocked further installations :( –  SimplySimon Jun 13 '13 at 15:12
    
Try apt-get with the purge option. sudo apt-get remove --purge tasknet –  Capt.Nemo Jun 13 '13 at 15:14
    
After doing this for each of the packages, I'm going to try your answer again... –  SimplySimon Jun 13 '13 at 15:23
show 1 more comment

I used to do:

$ sudo tasksel install lamp-server

Rather than using apt-get - that always worked for me. However, I recommend installing as per Capt.Nemo's instructions.

share|improve this answer
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.