# Pkg_add yields No address record error



## ThomasG33K (Nov 21, 2008)

Hi guys,

I am new to freebsd. I read the manual really hard and I installed freebsd without much hassle. 

Now I go to install packages. I do

```
pkg_add -r sudo
```
as root and I get this error:

```
Error: FTP Unable to get ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-7.0-release/Latest/sudo.tbz: No address record
pkg_add: unable to fetch 'ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-7.0-release/Latest/sudo.tbz' by URL
```

Internet works. I did ping and all is well with the internet but when installing ports and packages I get this frustrating error. 

Thanks for the help!


----------



## Mel_Flynn (Nov 21, 2008)

Hmm, two weird things:

1) if PACKAGESITE and PACKAGEROOT are both unset, the default is ftp.freebsd.org not freebsd.org.

2) No address record suggests failing DNS, so ping (by hostname) shouldn't work either.

Could you post output of:

```
echo $PACKAGESITE $PACKAGEROOT
cat /etc/resolv.conf
host ftp.freebsd.org
```


----------



## ThomasG33K (Nov 21, 2008)

Sorry I just edited my error message for the typo. I didnt copy and paste. It is already pointed to ftp.freebsd.org.

Here is the output:

```
PACKAGESITE: Undefined variable.
cat /etc/resolv.conf
search localdomain
nameserver #My IP Address#
host ftp.freebsd.org
;; conection timed out; no servers could be reached
```


----------



## brd@ (Nov 21, 2008)

Fix the /etc/resolv.conf entry to point to a working nameserver, such as one provided by your ISP.


----------



## ThomasG33K (Nov 21, 2008)

I am having trouble figuring out how to get the nameserver to work. I type in the nameserver I have on one computer I have in my house but it does not work.


----------



## anomie (Nov 21, 2008)

```
# echo '208.67.222.222' > /etc/resolv.conf
```

... and try it again. That's an opendns.org nameserver, BTW.


----------

