I did a fresh install of NetBSD 5.1.2 and tried to install emacs:
# pkg_add emacs pkg_add: Error: package `emacs-22.214.171.12410821' was built with a newer pkg_install version pkg_add: 1 package addition failed
So I installed pkgsrc and did a
make install in
Then I added
/usr/pkg/sbin:/usr/pkg/bin to the front of my path,
and tried again. That seemed to work.