Some reason 5-based WordPress installations does not not work properly in locahost installation (Apache 2, php 7.2, Ubuntu Mate 18.04), but somekind of fix is to replace /wp-includes/script-loader.php
file using 4.9.9 version file.
To use that file gets site front end working, but still there is some wp-includes/class-wp-hook.php on line 286
error. Not a perfect fix, but I belive that WP experts will fix version 5.xx errors soon.
Error and blank front page with 5.0.2 script-loader.php
The same page with 4.9.9 script-loader.php
Read also: To use WordPress into localhost installation