installation - 无法在 Homebrew 中安装 emacs
问题描述
$ brew install emacs
Updating Homebrew...
Warning: Treating emacs as a formula. For the cask, use homebrew/cask/emacs
==> Downloading https://homebrew.bintray.com/bottles/emacs-27.1.mojave.bottle.1.tar.gz
Already downloaded: /Users/xxx/Library/Caches/Homebrew/downloads/edc19e2cbf4d5136f0e31adfb9c57161b65dd8163f861a92e10bfd617d1d611c--emacs-27.1.mojave.bottle.1.tar.gz
==> Pouring emacs-27.1.mojave.bottle.1.tar.gz
==> emacs cask is installed, skipping link.
==> Caveats
To have launchd start emacs now and restart at login:
brew services start emacs
Or, if you don't want/need a background service you can just run:
emacs
==> Summary
/usr/local/Cellar/emacs/27.1: 4,009 files, 104.0MB
==> Upgrading 1 dependent:
cask 0.8.4 -> 0.8.5
==> Upgrading cask 0.8.4 -> 0.8.5
==> Downloading https://github.com/cask/cask/archive/v0.8.5.tar.gz
==> Downloading from https://codeload.github.com/cask/cask/tar.gz/v0.8.5
######################################################################## 100.0%
Error: An exception occurred within a child process:
RuntimeError: /usr/local/opt/emacs not present or broken
Please reinstall emacs. Sorry :(
如何解决这个问题?
解决方案
通过查看输出,似乎确实安装了 emacs:
==> Summary
/usr/local/Cellar/emacs/27.1: 4,009 files, 104.0MB
您应该可以立即使用它。
如果你喜欢GUI 版本,你可以安装它:
brew install --cask emacs
问题
Error: An exception occurred within a child process:
RuntimeError: /usr/local/opt/emacs not present or broken
Please reinstall emacs. Sorry :(
这是另一个工具 ,cask
无法安装:
- 它无法在
/usr/local/opt/emacs
. - Homebrew 将其安装在
/usr/local/Cellar/emacs/27.1
.
修复
您可以通过以下方式修复它:
/usr/local/opt/
(推荐)在emacs 目录中创建符号链接
$ brew link --overwrite emacs # if it complains about relinking, run brew unlink emacs && brew link emacs instead
$ brew install cask
- (替代)如果上一点没有帮助,安装时忽略依赖项
cask
$ brew install cask --ignore-dependencies
请让我知道它是否有帮助
推荐阅读
- html - HTML代码中的自动换行属性问题
- npm - 缺少依赖项详细调试信息nuxt.js编译错误
- python - 如何将 cls 传递给属性而不是 self
- android - 我可以随着 LinearLayout 内的 EditTextView 的增长而增加 LinearLayout 的高度吗?
- python-3.x - 如何在windows的python 3.7版本中安装paramiko
- ffmpeg - 让 Discord 机器人从直接 url 播放声音
- splunk - 根据 Session 过滤器 Splunk 获取 Previous Session 数据
- python - 在处理列表时,Python 中哪个更好 - reverse() 或 list[::-1] 还是有其他更有效的方法?
- c# - 如何将对象列表保存到 Firestore
- javascript - 动态设置选择选项的值