Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

This seems like a really straightforward problem, but I haven't had much luck looking around the internet so far. (A couple message boards are talking about it, but they don't offer any solutions.)

The Problem

When I run sudo portsnap fetch, I get:

Looking up portsnap.FreeBSD.org mirrors... none found.
Fetching snapshot tag from portsnap.FreeBSD.org... failed.
No mirrors remaining, giving up.

Details

  • The internet connection appears to be working.
  • I've successfully used portsnap fetch on this machine before.

I'll obviously provide any other details you need, but I don't have any idea of what details would be relevant.

share|improve this question
    
Does it make a difference if you use su instead of sudo? –  Roland Smith Sep 2 '13 at 20:25

1 Answer 1

Do you perhaps have a proxy configured in your environment variables? In that case use the -E flag to sudo that passes through the complete environment (which it does not do by default for security reasons):

sudo -E portsnap fetch

An alternative is to 'keep' HTTP_PROXY (or whatever the relevant variable is called). Edit /usr/local/etc/sudoers and add a line like the following:

Defaults env_keep += "HTTP_PROXY"

You can further limit the scope of this potential security hole via configuring things in more detail, see sudoers(5).

share|improve this answer
    
Good thought, but nope, no proxy. –  Matthew Adams Jun 19 '13 at 19:44
    
Ok, but did you try it? Does portsnap fetch without sudo work; as in, it fetches a file and then fails? –  Coroos Jun 20 '13 at 8:19
    
I tried sudo -E portsnap fetch and it didn't work. Without sudo, it just tells me I don't have write permissions for /var/db/portsnap. (Thanks for following up!) –  Matthew Adams Jun 20 '13 at 18:37
    
Did you try to open up permissions to see whether portsnap does continue for a normal user? –  Coroos Jul 17 '13 at 9:33
    
You mean add write permissions for a normal user to /var/db/portsnap? –  Matthew Adams Jul 19 '13 at 5:52

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.