Hi all,
I’ve installed the latest version for the first time, but every time I try to
start a site Local complains about /etc/hosts.
This is the output, when I start Local from the terminal:
$ /opt/Local/local
info: Loading Add-on: /opt/Local/resources/extraResources/lightning-services/mailhog-1.0.0+3/lib/main.js {"thread":"main","class":"AddonLoaderService","timestamp":"2020-05-04T22:07:14.703Z"}
info: Successfully Loaded Add-on: /opt/Local/resources/extraResources/lightning-services/mailhog-1.0.0+3/lib/main.js {"thread":"main","class":"AddonLoaderService","timestamp":"2020-05-04T22:07:14.710Z"}
info: Loading Add-on: /opt/Local/resources/extraResources/lightning-services/mariadb-10.4.10+3/lib/main.js {"thread":"main","class":"AddonLoaderService","timestamp":"2020-05-04T22:07:14.711Z"}
info: Successfully Loaded Add-on: /opt/Local/resources/extraResources/lightning-services/mariadb-10.4.10+3/lib/main.js {"thread":"main","class":"AddonLoaderService","timestamp":"2020-05-04T22:07:14.741Z"}
info: Loading Add-on: /opt/Local/resources/extraResources/lightning-services/mysql-8.0.16+3/lib/main.js {"thread":"main","class":"AddonLoaderService","timestamp":"2020-05-04T22:07:14.742Z"}
info: Successfully Loaded Add-on: /opt/Local/resources/extraResources/lightning-services/mysql-8.0.16+3/lib/main.js {"thread":"main","class":"AddonLoaderService","timestamp":"2020-05-04T22:07:14.763Z"}
info: Loading Add-on: /opt/Local/resources/extraResources/lightning-services/nginx-1.16.0+3/lib/main.js {"thread":"main","class":"AddonLoaderService","timestamp":"2020-05-04T22:07:14.764Z"}
info: Successfully Loaded Add-on: /opt/Local/resources/extraResources/lightning-services/nginx-1.16.0+3/lib/main.js {"thread":"main","class":"AddonLoaderService","timestamp":"2020-05-04T22:07:14.785Z"}
info: Loading Add-on: /opt/Local/resources/extraResources/lightning-services/php-7.3.5+6/lib/main.js {"thread":"main","class":"AddonLoaderService","timestamp":"2020-05-04T22:07:14.786Z"}
info: Successfully Loaded Add-on: /opt/Local/resources/extraResources/lightning-services/php-7.3.5+6/lib/main.js {"thread":"main","class":"AddonLoaderService","timestamp":"2020-05-04T22:07:14.813Z"}
info: Updating hosts with {"thread":"main","class":"HostsFileService","timestamp":"2020-05-04T22:07:37.888Z"}
error: Could not update hosts. {"thread":"main","class":"HostsFileService","error":{"killed":false,"code":127,"signal":null,"cmd":"cd \"/home/user\"; export ELECTRON_RUN_AS_NODE=\"1\"; \"/usr/bin/pkexec\" --disable-internal-agent /bin/bash -c \"echo SUDOPROMPT; export ELECTRON_RUN_AS_NODE=\\\"1\\\";/opt/Local/local /opt/Local/resources/app.asar/main/dns/workers/updateHostsFileWorker.js mysite.local www.mysite.local\""},"stdout":"","stderr":"Error executing command as another user: No authentication agent found.\n","exitCode":127,"timestamp":"2020-05-04T22:07:37.936Z"}
info: Updating hosts with {"thread":"main","class":"HostsFileService","timestamp":"2020-05-04T22:09:41.502Z"}
error: Could not update hosts. {"thread":"main","class":"HostsFileService","error":{"killed":false,"code":127,"signal":null,"cmd":"cd \"/home/user\"; export ELECTRON_RUN_AS_NODE=\"1\"; \"/usr/bin/pkexec\" --disable-internal-agent /bin/bash -c \"echo SUDOPROMPT; export ELECTRON_RUN_AS_NODE=\\\"1\\\";/opt/Local/local /opt/Local/resources/app.asar/main/dns/workers/updateHostsFileWorker.js mysite.local www.mysite.local\""},"stdout":"","stderr":"Error executing command as another user: No authentication agent found.\n","exitCode":127,"timestamp":"2020-05-04T22:09:41.543Z"}
I have found similar threads here about similar error, but no solution.
Modifying the permissions of the /etc/hosts file didn’t help.
Is it a bug or something I can fix?
OS: Arch Linux
EDIT:
I was able to start a site without the error after I started the gnome authentication agent.