1

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.

3
  • Does it make a difference if you use su instead of sudo? Sep 2, 2013 at 20:25
  • What version of FreeBSD is it? If it is a version that is not supported anymore the ports are not available anymore after a while.
    – Lexib0y
    Sep 23, 2016 at 14:45
  • I don't remember, but it was almost certainly the most recent release at the time. Sep 26, 2016 at 19:15

1 Answer 1

-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).

5
  • Good thought, but nope, no proxy. Jun 19, 2013 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, 2013 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!) Jun 20, 2013 at 18:37
  • Did you try to open up permissions to see whether portsnap does continue for a normal user?
    – Coroos
    Jul 17, 2013 at 9:33
  • You mean add write permissions for a normal user to /var/db/portsnap? Jul 19, 2013 at 5:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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