I finally fixed a problem that plagued me for a couple days...
I was trying to use MacPorts (
The MacPorts Project -- Home) to download several different programs. I kept getting errors that said something about "fetch failed." If you can find the distribution file (i.e., .tar, tgz, .zip, or .bz2) somewhere on the internet, and if you think it is safe to use, this is what you can do.
I was trying to install a file called mpfr (which is needed for gcc43), and the error message said:
Attempting to fetch mpfr-2.3.1.tar.bz2 from http://www.mpfr.org/mpfr-2.3.1/
and then it said:
Error: Target org.macports.fetch returned: fetch failed
I tried to open the web page that was listed, and I got no response from the server. I searched the internet and found a file in:
http://mirrors.evolva.ro/pub/FreeBSD/distfiles/mpfr/mpfr-2.3.1.tar.bz2
and downloaded the version that I wanted (file name
mpfr-2.3.1.tar.bz2) and put a copy of it in:
/opt/var/macports/distfiles/mpfr/2.3.1/
I HAVE NO IDEA IF THIS IS A RELIABLE SOURCE for, SO PROCEED AT YOUR OWN RISK. At this point, you might want to run some comparisons to prior versions of the distribution file to see if anything looks fishy, but I didn't have prior versions from the official source. Look on this page for more details (look for the FAQ on checksum errors)
FAQ - MacPorts - Trac
I then ran the Terminal command
sudo port sync to be sure that I had the latest Portfiles in my macports distribution (if you don't know what the
sudo command is, read about it in this forum or post a question here and maybe somebody will give you a link). I then edited the portfile for the problem distribution (
mpfr):
/opt/local/var/macports/sources/rsync.macports.org/release/ports/devel/mpfr/Portfile
I put # signs in front of the lines related to the checksum, then I went to
/opt/var/macports/distfiles/mpfr/2.3.1/ where I put the
mpfr-2.3.1.tar.bz2 file that I just downloaded and got the checksum by typing:
md5 mpfr-2.3.1.tar.bz2. I copied that information to the Portfile following the format for the md5 line that was already in the file. I did not get checksums for the other formats, so the new checksum lines had only one entry for the md5 format.
I then installed mpfr using the command:
sudo port install mpfr and it worked. I was then able to install gcc43 and other programs.