I created a site in Local, but I have a warning message : ‘Missing Hosts entry’. When I click on ‘Fix it’, I have a pop-up message : Uh-oh! Local ran into a problem when trying to update the hosts file. Please ensure that the hosts file is not locked by anti-virus.
I have unsintall local and reinstall it as a administrator.
I checked all the posts around hat subject.
I disabled my anti-virus and tried to fix the issue.
I included the line ‘127.0.0.1 example.local’ in the hosts file.
Nothing works!!
Here are the logs of local.local-lightning.log (94.7 KB)
Thanks for including the Local log @DomiRen! I’m seeing a line that looks like this:
{"thread":"main","class":"HostsFileService","error":{"code":1},"stdout":{},"stderr":{},"exitCode":1,"level":"error","message":"Could not update hosts.","timestamp":"2021-03-15T13:39:52.863Z"}
Which still seems to indicate that the hosts file is locked. Can you take a look at this FAQ in the forums to see if it get you pointed in the right direction?
That linked FAQ mentions Kaspersky, but the general idea should be the same for other Antivirus software as well.