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!!
.htaccesfile frompub/static; once I restored the.htaccessfile inpub/staticthe next request regenerated all symlinks; hope it helps. – Alessandro Ronchi Mar 22 '16 at 11:12.htaccess-file (I run nginx, so I didn't think it would do much), and as expected, it didn't work. Previously my symlinks were created, but now not anymore ... – Giel Berkers May 25 '16 at 09:41pub/staticis autogenerated anyways we also deleted it manually at one point and ran into the same problem. Looks like in our apache2/php7 setup the now missing .htaccess file is really responsible for this. After recreating the original .htaccess developer mode was working fine again. Here the link to the recent .htacces: https://github.com/magento/magento2/blob/develop/pub/static/.htaccess – Jey DWork May 25 '16 at 17:40staticfolder manually also didn't help. Only flush static content from admin works. I confirm I have enabled dev mode. – Adarsh Khatri Jul 04 '19 at 01:51