Install of Emacs fails to work

Hello,
I’m using FreeBSD 11.0-RELEASE-p1. I only want to run a few programs in console as I am using my machine for learning c++. So I need to install Emacs as this is my preferred editor.

Today I did
pkg install emacs25-25.3_1,3

I thought everything went smoothly as no error messages were displayed.

When I tried to test emacs I get this error message:


$ emacs
/lib/libz.so.6: version ZLIB_1.2.9 required by /usr/local/lib/libpng16.so.16 not found


And emacs fails to execute.

Has anyone else experienced a similar problem? I have searched the forum but not found this problem posted before. Please can you help me to fix this.

Thank you.
 
/lib/libz.so.6 is part of the base system, and editors/emacs is a port. These errors usually happen when one upgrades his system and the ports haven't been rebuilt yet, so the port cannot find the new library. But as 11.0-RELEASE is old already I suggest upgrading FreeBSD to 11.1-RELEASE first and then reinstall emacs.
 
This sort of thing sometimes happens, especially if you've mixed ports and packages. You may be better off reinstalling emacs from ports which will probably fix the issue.

EDIT: I missed that it was 11.0--my eye just overlooked the 0 part. I agree with MarcoB, upgrade to 11.1 and try again. (Then I think packages will work.)
 
Yes, you need to update to 11.1-RELEASE. 11.0 is not supported anymore since 2017-11-30 and packages on pkg.FreeBSD.org are now built on 11.1-RELEASE and are incompatible with 11.0-RELEASE.

pkg should warn you, but it currently doesn't. But I hope that with https://github.com/freebsd/pkg/issues/1627 fixed this sort of problem will not happen again with future releases.
 
Back
Top