从源 Build 安装 Emacs 支持 OS X 及 Linux 平台

Mac OS X

brew install emacs --with-imagemagick --with-gnutls --with-cocoa 

更多信息可以通过 brew info emacs 来获取,

$ brew info emacs
emacs: stable 24.5 (bottled), devel 25.0.92, HEAD
GNU Emacs text editor
/usr/local/Cellar/emacs/25.0.92 (4,054 files, 118.9M) *
  Built from source with: --with-imagemagick --with-gnutls --with-cocoa
From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/emacs.rb
==> Dependencies
Build: xz ✔, pkg-config ✔
Optional: d-bus ✘, gnutls ✔, librsvg ✘, imagemagick ✔, mailutils ✘, glib ✘
==> Options
	Build a Cocoa version of emacs
	Don't remove the ctags executable that emacs provides
	Build with d-bus support
	Build with glib support
	Build with gnutls support
	Build with imagemagick support
	Build with librsvg support
	Build with mailutils support
	Build with x11 support
	Don't build with libxml2 support
	Install development version 25.0.92
	Install HEAD version
==> Caveats
A command line wrapper for the cocoa app was installed to:

To have launchd start emacs at login:
  ln -sfv /usr/local/opt/emacs/*.plist ~/Library/LaunchAgents
Then to load emacs now:
  launchctl load ~/Library/LaunchAgents/homebrew.mxcl.emacs.plist

.app bundles were installed.
Run `brew linkapps emacs` to symlink these to /Applications.


最简单的方式就是安装 LinuxBrew 后使用和 Mac 相同的方式进行安装!(感谢 jiegec 的推荐)

上面方法安装出来的是命令行版本的 Emacs。



信息来源于 codefalling

2 个赞

安利一下Linuxbrew: http://linuxbrew.sh/

2 个赞

@xcodebuild 杀哥的网站并没有如何 build 时候添加 imagemagick 的方法诶。还是不会。。。 (摊手

我正在跟着教程安装 Emacs ,今天遇到了个解决不了的 Bug。


1 个赞

我现在装 ./configure 一直过不了 libpng 这个包 用了 apt-get install build-dep emacs24 还是过不了。明天早上我再发一个具体问题。现在在家了。


is it possible to build GUI version of emacs using linuxbrew ?

–with-x11 Build with x11 support