Answers:
libapache2-mod已从Ubuntu 17.04中的libapache2-mod-php7.0升级到Ubuntu 17.10和Ubuntu 18.04中的libapache2-mod-php7.1。打开终端并输入:
sudo apt install libapache2-mod-php7.1 # install PHP7 module for Apache2 webserver
sudo a2enmod php7.1 # enable the PHP7 module
sudo systemctl restart apache2.service # restart apache
libapache2-mod-php
metapackage,以便在7.2出现时您无需做任何事情。;)
<?php phpinfo(); ?>