Newbie Alert : pkg_add and packages Q (do not want to compile)

Kevin Kinsey kdk at
Wed Feb 22 19:03:21 PST 2006

Ow Mun Heng wrote:

>I've googled. I've read the handbook, I've read "Absolute BSD" and still
>I can't understand FreeBSD Ports/Packages esp when it comes to upgrading
>via packages. I'm from a Linux (gentoo linux) background so I'm not a
>rough diamond.

"rough diamond"  ... I like that idea. :D

>Problem statement.
>Install from minimal cd (and packages added via FTP)
>i've done cvsup (cvsup -L2 -h
> /usr/share/examples/ports-supfile)
>pkg_version -v states that I have a few packages which can be upgraded.
>xterm-203      <   needs updating (port has 206_1)
>$pkg_add -vr xterm
>pkg_add: unable to fetch
>'' by URL
>$pkg_add -vr  x11/xterm
>pkg_add: unable to fetch 
>' by URL
>ftp into it, it's listed via with it's suffix. (google found that "for
>some odd reason, pkg_add doesn't add the suffix")

Hmm, haven't read that one.  IIRC, pkg_add can take a complete
URI for a package, e.g. :


So, that's one possible workaround.  Another would be to fetch
the package via FTP and add it directly.

>$pkg_add -vr x11/xterm-206_1
>pkg_add: package 'xterm-206_1' or its older version already installed
>So.. How do I install it?
>$pkg_delete xterm-203
>pkg_delete: package 'xterm-203' is required by these other packages
>So.. That can't be done. What can I do to upgrade my packages?

As mentioned by one other poster, "-f" will force the deinstall.

>I've even tried sysinstall but that only lists xterm-203 as the package
>to install. (I suspect this is because its packagesite is

Yes. IIRC, you can change "RELEASE_NAME" with sysinstall and
this would likely cause sysinstall to give you a different list of

Another workaround, that.

I think that PACKAGESITE could also be redefined
either in your {login} environment, or in /etc/make.conf, but
don't hold me to that, because I'm not RTFMing at the moment ;-)

>$export | grep -i pack
>declare -x

Isn't there a "latest" dir at ?

>In gentoo, it's a simple "emerge xterm" and all will be done
>automatically. (Granted, this is compile from source and not from binary
>packages, which I know can do "cd /usr/ports/x11/xterm && make install
>clean", but since FreeBSD has binary packages, I rather use that)

I'd look into installing and using one of the more advanced
package management tools; perhaps portupgrade.  portupgrade
can be told to utilize binary packages instead of building from
source, and would be pretty automagic, a la "emerge" in Gentoo,
I suspect (though I've not used Gentoo and therefore can't say
for certain).

It's probable that other package management tools can do this,
also.  It might be worth mentioning that Colin Percival is working
rather hard on various means of doing binary upgrades for both
the system ("FreeBSDUpdate", IIRC) and the Ports Tree (PortSnap?)

You're welcome; HTH.

Kevin Kinsey

Sex: the thing that takes up the least amount of time and causes the
most amount of trouble.
		-- John Barrymore

More information about the freebsd-questions mailing list