[英]Xcode error: failed to launch [directory] - invalid host string: 'localhost'
I'm trying to run a C++ project, but I get this "invalid host string: localhost" error. 我正在尝试运行C ++项目,但出现此“无效的主机字符串:localhost”错误。
here is my /ect/hosts file: 这是我的/ ect / hosts文件:
##
# Host Database
#
# localhost is used to configure the loopback interface
# when the system is booting. Do not change this entry.
##
127.0.0.1 localhost
255.255.255.255 broadcasthost
::1 localhost
fe80::1%lo0 localhost
Even though, I'm still getting the error. 即使,我仍然遇到错误。 Thanks in advance.
提前致谢。
I have the same problem. 我也有同样的问题。
I have found these solutions online that worked for other people, maybe it will work for you. 我在网上找到了适用于其他人的解决方案,也许对您有用。
Link: http://ubuntuforums.org/showthread.php?t=1896148 链接: http : //ubuntuforums.org/showthread.php?t = 1896148
https://superuser.com/questions/354902/etc-hosts-getting-reset-in-lion/379560#379560 https://superuser.com/questions/354902/etc-hosts-getting-reset-in-lion/379560#379560
If anyone else has another other suggestions, I am all ears too because I am still facing this exact same issue. 如果其他任何人还有其他建议,我也将全神贯注,因为我仍然面临着同样的问题。
Edit: 编辑:
I found my solution to the issue. 我找到了解决该问题的方法。 My host file was saved as a .rtf file instead of .txt format.
我的主机文件另存为.rtf文件,而不是.txt格式。 After I made the correction, everything worked.
我进行更正后,一切正常。 Maybe this will help you.
也许这会对您有所帮助。 Good luck!
祝好运!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.