# Portupgrade can't find packages on server



## RogerRoger (Oct 15, 2011)

Hi

I'm running FreeBSD 8.2-RELEASE-p3, and now I'm trying to upgrade all programs installed via ports on my system. I have done `portsnap fetch && portsnap update` without problem. When I try to run `portupgrade -aPc` I eventually get this error: 


```
--->  Checking for the latest package of 'security/openvpn'
--->  Fetching the package(s) for 'openvpn-2.2.1_1' (security/openvpn)
--->  Fetching openvpn-2.2.1_1
fetch: ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/i386/packages-8.2-release/All/openvpn-2.2.1_1.tbz: Syntax error, command unrecognized
** The command returned a non-zero exit status: 1
** Failed to fetch ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/i386/packages-8.2-release/All/openvpn-2.2.1_1.tbz
fetch: ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/i386/packages-8.2-release/All/openvpn-2.2.1_1.txz: Syntax error, command unrecognized
** The command returned a non-zero exit status: 1
```

Portupgrade will continue but it takes a very long time to compile all packages so I'd rather find binary packages. 

Browsing ftp.freebsd.org I find the binary package that portupgrade is looking for in:
/pub/FreeBSD/ports/i386/packages-9-current/All
I then try to set both PACKAGESITE and PKG_PATH to: 
ftp://ftp.freebsd.org//pub/FreeBSD/ports/i386/packages-9-current/All
but this doesn't change anything. Portupgrade still looks in 8.2 directory.

Is my ports directory somehow synced to the version 9 of FreeBSD? Can I sync it back to 8.2? Or can I somehow make portupgrade look in the version 9 directory?

Thanks in advance.


----------



## DutchDaemon (Oct 15, 2011)

You don't want to run FreeBSD 9 packages on a FreeBSD 8 system. They're compiled against system libraries you don't have.


----------



## RogerRoger (Oct 15, 2011)

Makes sense. 

Any idea how to downgrade the port tree to version 8.2? I looked through the man page for portsnap and /etc/portsnap.conf but couldn't find any info on changing versions.


----------



## DutchDaemon (Oct 16, 2011)

The ports tree is the same for every version of FreeBSD, i.e. there is only one. Since ports are compiled, you're compiling them on the FreeBSD you currently have. against the libraries you currently have, which is why the ports tree itself can be "version-less". In other words, a [cmd=]portsnap fetch extract[/cmd] will check out and installl a perfectly usable ports tree, and [cmd=]portsnap fetch update[/cmd] will keep it up to date thereafter.


----------



## RogerRoger (Oct 16, 2011)

Does that mean that two packages (.tbz files) can be different because they are compiled on different BSD versions but still have the same version number and thus the exact same name?


----------



## DutchDaemon (Oct 16, 2011)

Yes.

E.g.

ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-8-stable/dns/bind98-9.8.1.tbz
ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-9-current/dns/bind98-9.8.1.tbz


----------

