pkg_add failing to get or fetch a package
Trish's latest blog post all about awesome skinning and git was amazing; however she was having problems with pkg_add -r git, FreeBSD 7.1 was looking fore new packages in a non existent directory on freebsd.org.
when she ran the command
pgk_add -r git
- pkg_add - this is the command to add a package
- -r - the flag to check the interweb for the package if there is no local copy
- git - the name of the package we want to add
the output would be
# pkg_add -r git Error: FTP Unable to get ftp://ftp.freebsd.org/pub/FreeBSD/ports/amd64/packages-7.2-release/Latest/git.tbz: File unavailable (e.g., file not found, no access) pkg_add: unable to fetch 'ftp://ftp.freebsd.org/pub/FreeBSD/ports/amd64/packages-7.2-release/Latest/git.tbz' by URL #
The url is wrong and it should be checking in ftp://ftp.freebsd.org/pub/FreeBSD/ports/amd64/packages-7-stable/Latest/. We need to set the value of the system's package site to the correct url. Here is the command to do just that:
setenv PACKAGESITE ftp://ftp.freebsd.org/pub/FreeBSD/ports/amd64/packages-7-stable/Latest/
That is all folks! I hope this helps!