Skip to content

Cannot run Apache2 server in ubuntu [closed]

I’ve installed pgAdmin4 in Ubuntu 18.04 by doing:

$ curl | sudo apt-key add

$ sudo sh -c ‘echo “deb$(lsb_release -cs) pgadmin4 main” > /etc/apt/sources.list.d/pgadmin4.list && apt update’

$ sudo apt install pgadmin4

$ sudo /usr/pgadmin4/bin/

After creating an account and before adding the Postgresql server in pgAdmin4 I got this message displayed: [1]:

Since I was having problems with systemd, I’ve used Sysvinit system to start the apache2 by doing:

$ service apache2 start


  • Starting Apache httpd web server apache2 *
  • The apache2 configtest failed. Output of config test was: mkdir: cannot create directory ‘/var/run/apache2’: Permission denied chown: changing ownership of ‘/var/lock/apache2.Y3B3u6svcJ’: Operation not permitted

not sure what to do next.



You should run apache as root:

sudo service apache2 start
7 People found this is helpful