Use macports and https://trac.macports.org/ticket/38834
— Solution!! —
Deactivate Kerberos5 in MacPort. To do that open the terminal and run this command.
sudo port -f -d deactivate kerberos5
Then clean up samba4 corrupted installation files, resync the MacPort database and install samba4 again use:
sudo port clean –all samba4
sudo port -d sync
sudo port install -sv samba4