Search code examples
apache2raspbianraspberry-pi2owncloud

Can't install Apache2 on Raspbian


I'm trying to install Apache2 on my Raspberry Pi running Raspbian so I could run OwnCloud using sudo apt-get install apache2. When I try to install it, I keep getting this error:

The following packages have unmet dependencies: apache2 : Depends: apache2-bin (= 2.4.10-10+deb8u4) but it is not going to be installed Depends: apache2-utils (>= 2.4) but it is not going to be installed Depends: apache2-data (= 2.4.10-10+deb8u4) but it is not going to be installed Recommends: ssl-cert but it is not going to be installed mysql-server : Depends: mysql-server-5.5 but it is not going to be installed E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

sudo apt-get -f install apache2 will not work either. I updated Raspbian and also made a clean install of Raspbian, but I still have the same error. I'm pretty new to programming and only know Arduino and a bit of Swift, so thanks for the help!


Solution

  • This process worked for me on a RPi 2 with NOOBS:

    First, restore RPi to factory settings by holding down the space key when it boots and selecting Raspbian from the menu.

    Then:

    sudo apt-get update
    
    sudo apt-get upgrade
    
    sudo apt-get install apache2 -y