0

I want to install complete LAMP stack on my Ubuntu 14.04 in order to install Wordpress.

sudo apt-get install apache2

I am trying to install APACHE with the above and here's the error I am getting

dpkg: error processing package libapache2-mod-php5 (--configure):
subprocess installed post-installation script returned error exit status 1
E: Sub-process /usr/bin/dpkg returned an error code (1)

Can anyone recommend the best method to get the up and running.

Thanks

Suraj
  • 189

2 Answers2

1

There are some packages missing. Install everything needed by running :

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

If you need phpmyadmin afterwards, install it :

sudo apt-get install phpmyadmin
hg8
  • 13,462
  • I already tried this but it returns another error.

    `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: mysql-server : Depends: mysql-server-5.5 but it is not going to be installed E: Unable to correct problems, you have held broken packages.`

    This is what I get after I run this command

    – Suraj Dec 14 '15 at 09:40
  • @Suraj , try apt-get update first, then apt-get -f install. Option -f should fix your problems , then install your LAMP stack – Nikolay Nikolov Dec 14 '15 at 09:42
  • `W: Failed to fetch http://ppa.launchpad.net/langdalepl/gvfs-mtp/ubuntu/dists/trusty/main/binary-amd64/Packages 404 Not Found

    W: Failed to fetch http://ppa.launchpad.net/langdalepl/gvfs-mtp/ubuntu/dists/trusty/main/binary-i386/Packages 404 Not Found

    E: Some index files failed to download. They have been ignored, or old ones used instead. `

    Get this error on sudo apt-get update

    – Suraj Dec 14 '15 at 09:51
  • For this error, please refer here. – hg8 Dec 14 '15 at 09:52
  • tried these answers but getting those erros after that too – Suraj Dec 14 '15 at 09:56
  • Okay, So I am have the apt-get-update, but when I run sudo apt-get install apache2 I am getting the same erros as the question – Suraj Dec 14 '15 at 10:06
  • Is your distro 32bit or 64bit ? Run uname -a and paste. – Nikolay Nikolov Dec 14 '15 at 10:07
  • x86_64 x86_64 x86_64 GNU/Linux – Suraj Dec 14 '15 at 10:08
0

Run: sudo rm /etc/apt/sources.list.d/langdalepl-gvfs-mtp-trusty.list sudo apt-get update

The run again sudo apt-get install apache2

Your have not working repository called "gvfs"

  • dpkg: error processing package libapache2-mod-php5 (--configure): subprocess installed post-installation script returned error exit status 1 E: Sub-process /usr/bin/dpkg returned an error code (1) The same error – Suraj Dec 14 '15 at 10:12
  • Run : sudo dpkg -l |grep apache and sudo dpkg -l |grep php and paste the results here. – Nikolay Nikolov Dec 14 '15 at 10:13
  • grep: and: No such file or directory grep: sudo: No such file or directory grep: dpkg: No such file or directory – Suraj Dec 14 '15 at 10:13
  • You got something wrong with copy/paste . The results shoudl be like mine: root@ac:~# dpkg -l |grep apache ii apache2 2.4.16-4+deb.sury.org~trusty+4 amd64 Apache HTTP Server .... root@ac:~# dpkg -l |grep php ... ii php5 5.6.16+dfsg-2+deb.sury.org~trusty+1 all – Nikolay Nikolov Dec 14 '15 at 10:20
  • here's the first command result. And second command result. – Suraj Dec 14 '15 at 10:23
  • Ok, so remove zlangdalepl-gvfs-mtprepo. Then be sure that there is no more gvfs files in your apt configuration bygrep gvfs /etc/apt/* -r, then remove yourlibapache2-mod-php5byapt-get remove --purge libapache2-mod-php5` and install it again. I hope this helps. – Nikolay Nikolov Dec 14 '15 at 10:38