Git Product home page Git Product logo

Comments (9)

huhamhire avatar huhamhire commented on July 18, 2024

在root权限下,使用任意编辑器修改/etc/hosts文件,将其内容替换成以下条目即可:
127.0.0.1 localhost
255.255.255.255 broadcasthost
::1 localhost
fe80::1%lo0 localhost

from huhamhire-hosts.

phonehold avatar phonehold commented on July 18, 2024

。。我知道在这里改。。不过最大的问题不在这里。。。。。真悲剧啊。。 我把你程序备份的配置重新弄到/etc/hosts下面都不成。。然后我删除/etc/hosts。接着再新建一个hosts 就神奇的成功了。。。。
不应是编码的问题吧。。。

from huhamhire-hosts.

huhamhire avatar huhamhire commented on July 18, 2024

在今年年初的项目整合的时候的确出现了一些编码问题,不过后来应该都解决了~~您后来自己建的hosts文件是空文件吗?

from huhamhire-hosts.

phonehold avatar phonehold commented on July 18, 2024

是的。把之前的hosts删除。再vim 新建一个,再接着写127.0.0.1 www.a.com 就可以了。。

from huhamhire-hosts.

huhamhire avatar huhamhire commented on July 18, 2024

如果是这样的话,未必是编码问题~您有看过原先hosts文件的编码及换行符没?

from huhamhire-hosts.

phonehold avatar phonehold commented on July 18, 2024

我之前的一直在用。没有问题。安装后,再改就不生效了。。。。

from huhamhire-hosts.

huhamhire avatar huhamhire commented on July 18, 2024

那使用的是有线网还是无线网呢?最近我发现Mountain Lion在有线网的环境下可能会优先访问DNS而不是hosts文件的问题,原因暂时木有查明

from huhamhire-hosts.

huhamhire avatar huhamhire commented on July 18, 2024

还有个办法是使用我们提供的utf8格式的纯hosts文件直接替换,其实用CLI的话要比图形界面方便不少

from huhamhire-hosts.

phonehold avatar phonehold commented on July 18, 2024

无线哦。最新的系统。10.8.3 我刚开始用的就是命令行的,我一看有dmg 的心想就下来试试,结果遇到这个情况。不过好再知道问题了,非常感谢。

from huhamhire-hosts.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.