我试图用这个运行服务器 - https://www.digitalocean.com/community/tutorials/how-to-set-up-django-with-postgres-nginx-and-gunicorn-on-ubuntu-16-04#create-a-gunicorn-systemd-service-file
当我尝试运行一些命令时,我收到此错误 - sudo: unable to resolve host giver.local
可能是什么问题?
该错误表明您的 /etc/hosts 或 etc/hostname 出现了问题
/etc/hosts
etc/hostname
见https://askubuntu.com/questions/59458/error-message-when-i-run-sudo-unable-to-resolve-host-none .
检查此行的 /etc/hosts 文件:
127.0.0.1 localhost
假设它正确打印错误, giver.local 代替 localhost .
giver.local
localhost
如果这不起作用,我建议删除该Droplet并重新开始,因为此错误并不常见(据我或Google知道) .
2 回答
该错误表明您的
/etc/hosts
或etc/hostname
出现了问题见https://askubuntu.com/questions/59458/error-message-when-i-run-sudo-unable-to-resolve-host-none .
检查此行的
/etc/hosts
文件:假设它正确打印错误,
giver.local
代替localhost
.如果这不起作用,我建议删除该Droplet并重新开始,因为此错误并不常见(据我或Google知道) .