I just had this issue too!
It turns out in my case it was a permission issue.
cat /etc/apache2/logs/error_log | grep static
and
tail -f /etc/apache2/logs/error_log | grep static
gave me interesting info (maybe your log file might be named differently)
first I saw:
[Wed Oct 30 12:19:34.287356 2019] [core:crit] [pid 27633] (13)Permission denied: [client 24.48.87.7:16680] AH00529: /home/[datuser]/public_html/pub/static/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable and that '/home/[datuser]/public_html/pub/static/' is executable
it turned out my pub/static
folder was not executable. Then after fixing that I got
[Wed Oct 30 12:22:46.490759 2019] [:error] [pid 27290] [client ipremoved] SoftException in Application.cpp:267: File "/home/[datuser]/public_html/pub/static.php" is writeable by group, referer: [url removed]
[Wed Oct 30 12:22:46.490961 2019] [core:error] [pid 27290] [client ipremoved] End of script output before headers: static.php, referer: [url removed]
On our server apache cant serve files that are writable by group for some reason, some Cpanel security stuff I believe. So I had to set 644
on all files under pub
and finally my symlinks started to get created!!