1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

pkg_add -r not working

Discussion in 'Installation and Maintenance of Ports or Packages' started by harishankar, May 5, 2010.

  1. harishankar

    harishankar New Member

    Messages:
    128
    Thanks Received:
    2
    I have installed FreeBSD 8.0-Release and the following error is what I get when I try to install a package through pkg_add:

    Code:
    harishankar# pkg_add -r firefox
    Error: Unable to get ftp://ftp.freebsd.org/pub/FreeBSD/ports/amd64/packages-8.0-release/Latest/firefox.tbz: No route to host
    pkg_add: unable to fetch 'ftp://ftp.freebsd.org/pub/FreeBSD/ports/amd64/packages-8.0-release/Latest/firefox.tbz' by URL
    


    I am able to connect to the internet and otherwise browse the web, but pkg_add always has trouble resolving the server. Is there any further configuration required? The handbook says something about setting the PACKAGESITE environment variable, but surely it should be able to fetch from the default server?
     
  2. sverreh

    sverreh New Member

    Messages:
    124
    Thanks Received:
    15
    There probably is no package called just firefox. Try this command from /usr/ports and see what you get:

    Code:
     make search name=firefox display=name,path,info keylim=1


    Then pick the one you want from the list.

    Or, you can use your browser and go to ftp://ftp.freebsd.org/pub/FreeBSD/ports/amd64/packages-8.0-release/Latest/ and see which packages are available for firefox.
     
  3. riku

    riku New Member

    Messages:
    14
    Thanks Received:
    1
    Code:
    pkg_add -rv firefox3
     
  4. graudeejs

    graudeejs Well-Known Member

    Messages:
    4,594
    Thanks Received:
    633
    your network is not configured properly
    you need to add
    Code:
    defaultrouter="123.123.132.123"

    to your /etc/rc.conf
    where 123.123.123.123 is your default router address

    if this doesn't fix the problem, the you probably have more network related problems
     
  5. harishankar

    harishankar New Member

    Messages:
    128
    Thanks Received:
    2
    Hi, everybody, I found the issue.

    I (probably) had to set the FTP to passive mode FTP_PASSIVE_MODE=YES. Also I was having intermittent trouble with my internet connection earlier so I'm not sure which was causing the issue.

    I installed he firefox35 package fine and it works now. Adding a whole lot of apps now as I speak. :D