# Weird: for each package - first call to pkg_add -r fails



## sim (Jun 22, 2012)

Hi all

I'm seeing something odd when using pkg_add -r to fetch (mainly) php5 packages.  For each package, the first call immediately fails, then if I repeat the command it works:


```
root@dev_php54:/root # pkg_add -r php5-ctype
Error: Unable to get ftp://ftp.freebsd.org/pub/FreeBSD/ports/amd64/packages-9-stable/Latest/php5-ctype.tbz:
 File unavailable (e.g., file not found, no access)
pkg_add: unable to fetch 'ftp://ftp.freebsd.org/pub/FreeBSD/ports/amd64/packages-9-stable/Latest/php5-ctype.tbz'
 by URL

root@dev_php54:/root # pkg_add -r php5-ctype
Fetching ftp://ftp.freebsd.org/pub/FreeBSD/ports/amd64/packages-9-stable/Latest/php5-ctype.tbz... Done.


root@dev_php54:/root # pkg_add -r php5-curl
Error: Unable to get ftp://ftp.freebsd.org/pub/FreeBSD/ports/amd64/packages-9-stable/Latest/php5-curl.tbz:
 File unavailable (e.g., file not found, no access)
pkg_add: unable to fetch 'ftp://ftp.freebsd.org/pub/FreeBSD/ports/amd64/packages-9-stable/Latest/php5-curl.tbz'
 by URL

root@dev_php54:/root # pkg_add -r php5-curl
Fetching ftp://ftp.freebsd.org/pub/FreeBSD/ports/amd64/packages-9-stable/Latest/php5-curl.tbz... Done.
Fetching ftp://ftp.freebsd.org/pub/FreeBSD/ports/amd64/packages-9-stable/All/ca_root_nss-3.13.5.tbz... Done.
Fetching ftp://ftp.freebsd.org/pub/FreeBSD/ports/amd64/packages-9-stable/All/curl-7.24.0.tbz... Done.


[root@dev_php54 ~]# pkg_add -r php5-hash
Error: Unable to get ftp://ftp.freebsd.org/pub/FreeBSD/ports/amd64/packages-9-stable/Latest/php5-hash.tbz:
 File unavailable (e.g., file not found, no access)
pkg_add: unable to fetch 'ftp://ftp.freebsd.org/pub/FreeBSD/ports/amd64/packages-9-stable/Latest/php5-hash.tbz'
 by URL

[root@dev_php54 ~]# pkg_add -r php5-hash
Fetching ftp://ftp.freebsd.org/pub/FreeBSD/ports/amd64/packages-9-stable/Latest/php5-hash.tbz... Done.


[root@dev_php54 ~]# pkg_add -r php5-iconv
Error: Unable to get ftp://ftp.freebsd.org/pub/FreeBSD/ports/amd64/packages-9-stable/Latest/php5-iconv.tbz:
 File unavailable (e.g., file not found, no access)
pkg_add: unable to fetch 'ftp://ftp.freebsd.org/pub/FreeBSD/ports/amd64/packages-9-stable/Latest/php5-iconv.tbz'
 by URL

[root@dev_php54 ~]# pkg_add -r php5-iconv
Fetching ftp://ftp.freebsd.org/pub/FreeBSD/ports/amd64/packages-9-stable/Latest/php5-iconv.tbz... Done.


[root@dev_php54 ~]# pkg_add -r php5-mbstring
Error: Unable to get ftp://ftp.freebsd.org/pub/FreeBSD/ports/amd64/packages-9-stable/Latest/php5-mbstring.tbz:
 File unavailable (e.g., file not found, no access)
pkg_add: unable to fetch 'ftp://ftp.freebsd.org/pub/FreeBSD/ports/amd64/packages-9-stable/Latest/php5-mbstring.tbz'
 by URL

[root@dev_php54 ~]# pkg_add -r php5-mbstring
Fetching ftp://ftp.freebsd.org/pub/FreeBSD/ports/amd64/packages-9-stable/Latest/php5-mbstring.tbz... Done.
Fetching ftp://ftp.freebsd.org/pub/FreeBSD/ports/amd64/packages-9-stable/All/oniguruma-4.7.1.tbz... Done.


[root@dev_php54 ~]# pkg_add -r php5-ldap    
Error: Unable to get ftp://ftp.freebsd.org/pub/FreeBSD/ports/amd64/packages-9-stable/Latest/php5-ldap.tbz:
 File unavailable (e.g., file not found, no access)
pkg_add: unable to fetch 'ftp://ftp.freebsd.org/pub/FreeBSD/ports/amd64/packages-9-stable/Latest/php5-ldap.tbz'
 by URL

[root@dev_php54 ~]# pkg_add -r php5-ldap
Fetching ftp://ftp.freebsd.org/pub/FreeBSD/ports/amd64/packages-9-stable/Latest/php5-ldap.tbz... Done.
Fetching ftp://ftp.freebsd.org/pub/FreeBSD/ports/amd64/packages-9-stable/All/openldap-client-2.4.31_1.tbz... Done.
```

etc etc.

It's not the end of the world, but it is getting a bit tedious.  This is from a jail, through pf (on the same machine, configured to nat the jail and to allow outbound connections for passive ftp (not using ftp-proxy)).

Just wondered if anyone had any ideas...

sim


----------

