Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Applications > MacPorts: fixing "fetch failed" by manual download

MacPorts: fixing "fetch failed" by manual download
Thread Tools
Dedicated MacNNer
Join Date: Nov 2005
Status: Offline
Reply With Quote
May 17, 2008, 06:40 PM
 
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.
Mac Pro Quad: 2.66GHz; 4 GB Ram; 4x500GB drives; Radeon X1900, 23" Cinema Screen, APC UPS
PowerBook G4: 1.33GHz; 768MB Ram; 60GB drive
     
Fresh-Faced Recruit
Join Date: May 2008
Status: Offline
Reply With Quote
May 18, 2008, 07:35 AM
 
Hmmm, I thought this post would save me a lot of time, but ...

1 - the checksum in the portfile and the md5 of the romanian copy of mpfr are, at least for me, the same. This is what I would expect if they were in fact the same file and so I think I trust it.

2 - I'm running 10.3.9 and the path isn't quite exactly the same (it's /opt/local/var/macports/distfiles/mpfr/2.3.1/ - there's an extra local in there, but local's the only dir in there so I feel good about that). But ... it's still trying to download the file. So, a bit more tinkering to come for me I guess, maybe I could hard-code the romanian address into the portfile ...

Yep, that did the trick for me ... now able to build gcc40 until I hit the next wall ..
     
rehoot  (op)
Dedicated MacNNer
Join Date: Nov 2005
Status: Offline
Reply With Quote
May 18, 2008, 08:14 AM
 
Originally Posted by piersg View Post
1 - the checksum in the portfile and the md5 of the romanian copy of mpfr are, at least for me, the same.
I had made a couple copies of the file, and I unzipped and rezipped one of them, so maybe that is why by md5 changed.

[QUOTE=piersg;365733
2 - I'm running 10.3.9 ...

Yep, that did the trick for me ... now able to build gcc40 until I hit the next wall ..[/QUOTE]

I had other problems yesterday when I was working on a 10.3.9 computer. It didn't like my (ancient) copy of XCode, and I couldn't install the newer version because it didn't like 10.3.9. Let me know if what you are able to compile. On my 10.5 computer, I compiled about 100 programs after I got over the hump.

thx
Mac Pro Quad: 2.66GHz; 4 GB Ram; 4x500GB drives; Radeon X1900, 23" Cinema Screen, APC UPS
PowerBook G4: 1.33GHz; 768MB Ram; 60GB drive
     
Fresh-Faced Recruit
Join Date: Sep 2008
Status: Offline
Reply With Quote
Sep 13, 2008, 01:45 AM
 
Nice post. My laptop required some additional work to find a solution for this fetching issue, which I have described at http://chipcastle.blogspot.com/2008/...411-fetch.html

HTH/chip
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 09:20 AM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2