wiki:MisbehavingServers

Checksum mismatches due to misbehaving DNS or web servers

You were probably directed to this page due to a checksum mismatch where the downloaded distfile appeared to contain HTML. There are a few reasons this can happen:

  • Your ISP's DNS servers redirect lookups of nonexistent host names to a search page. Some ISPs have decided that instead of returning the correct error code when a hostname does not exist, they will pretend that it does and say that its IP address is one that actually belongs to a web server they run. The idea is to be convenient for users, since it gives them a search page when they try to visit a nonexistent site in a browser. However, as well as violating the relevant Internet standards, this behaviour breaks many programs (such as MacPorts) that need to know whether a hostname exists or not.

Ask your ISP to correct the behaviour of their servers. Until they do, you will probably need to use different DNS servers. Information about using a number of public DNS services is readily available on the web.

Of course, having mirrors that no longer exist listed in a portfile is not useful (even if it doesn't cause problems when using working DNS servers), so the maintainer should remove them.

  • You are using a free or paid public wi-fi hotspot that requires you to log in, but you have not logged in. Many public wi-fi hotspots at coffee shops, airports and hotels require you to log in before you are allowed to access arbitrary Internet resources, and before you've done so, will serve up a web page telling you this when you attempt to visit any address. Open a web browser and access any web page; if you are prompted to log in to such a system, do so, and ensure you're able to view e.g. the MacPorts web site.
  • You are behind a proxy that is denying access to the download site. Many proxies serve an HTML error page in this case, and some do not use the correct HTTP response code. Ask your network administrator to allow access to the relevant site, and to configure the proxy to use the correct response code when serving error pages.
  • The download site no longer has the file, and does not indicate this with the correct response code. Usually such mirrors should be removed from portfiles, so feel free to ask the maintainer to do so. You could also ask the owner of the mirror to fix their server configuration.

In order to retry downloading the distfile after resolving your problem you must first delete the old download:

sudo port clean --dist <portname>

If fetch issues persist, you may have to download the distfiles manually.

See Also

  • FAQ — for general information about checksum mismatches.
  • Problem Hotlist — for information on downloading distfiles from a different site.
Last modified 3 years ago Last modified on Jan 19, 2014, 3:52:09 AM