Error: Unable to get ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-9.0-release/Latest/vim.tbz
This was my first encounter with problem while working in freebsd after doing fresh install.I was trying to install vim in freebsd by using the command
pkg_add -r vim
I got this below given Error:
Error: Unable to get ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-9.0-release/Latest/vim.tbz: File unavailable (e.g., file not found, no access) pkg_add: unable to fetch 'ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-9.0-release/Latest/vim.tbz' by URL pkg_add: 1 package addition(s) failed
If we read the above given Error message,”File unavailable (e.g., file not found, no access)” . The error itself says there is problem in site or site path.
So I checked it by opening the web browser and found the given below Page Not found error
To fix this issue I set the environment variable
The correct URL I am using for repo is ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-9-stable/Latest/.
freebsd# echo $SHELL /bin/csh (Because it is C shell, I am using command setenv , if it is bash then we have to use export command) setenv PACKAGESITE ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-9-stable/Latest/ echo $PACKAGESITE
Now install the package
pkg_add -r -v vim