First thing I would try is making sure you have all of the PHP deps for the director package:
https://icinga.com/docs/icinga-director/latest/doc/02-Installation/
ipl
incubator
and reactbundle
could be missed, but also make sure that the php-*
packages match your version of PHP
Second thing I would check, make sure you don’t have the master
branch checked out for the director. git checkout v1.8.1
PS you can format your code with triple back-ticks. See this post for some formatting tips