MacTex 新 brew 安装中出现 LaTeXiT 问题

MacTex 新 brew 安装中出现 LaTeXiT 问题

刚刚用 brew 安装了 MacTex,然后在我儿子的 MacBook 上更新了 MacTex。

打开 LaTeXiT 并立即看到两个错误:

1.

ghostscript 未找到或无法按预期工作 LaTeXiT 的当前配置需要 ghostscript 才能工作。除非您已安装 X11,否则应确保使用不需要它的 ghostscript 版本(通常是 gs-nox11 而不是 gs)。查找 ghostscript...那是什么?取消

ps2pdf 未找到或无法按预期工作 LaTeXiT 的当前配置需要 ps2pdf 才能工作。查找 ps2pdf...那是什么?取消

然后我使用 homebrew 安装了 XQuartz。问题仍然存在。

Brew 说它已安装。

john@MacBook1415 ~ % brew search ghostscript
==> Formulae
ghostscript ✔  

从另一台 Mac 上查看 brew 实现:

12:38:46.642 at iMac191 ~ brew info mactex
==> mactex: 2023.0314
https://www.tug.org/mactex/
Not installed
From: https://github.com/Homebrew/homebrew-cask/blob/HEAD/Casks/m/mactex.rb
==> Name
MacTeX
==> Description
Full TeX Live distribution with GUI applications
==> Artifacts
mactex-20230314.pkg (Pkg)
==> Caveats
You must restart your terminal window for the installation of MacTeX CLI
tools to take effect.

Alternatively, Bash and Zsh users can run the command:

  eval "$(/usr/libexec/path_helper)"

==> Analytics
install: 2,518 (30 days), 7,385 (90 days), 18,382 (365 days)

答案1

二进制文件已安装...我只需指向正确的目录。可能是因为我们使用的是 Apple Silicon M1+ 而不是 Intel - 自制软件的安装路径不同。这应该由包管理器查看。

英特尔:
/usr/local/bin
Apple Silicon M1+:
/opt/homebrew

同样重要的是要知道我们正在搜索术语“gs”而不是“ghostscript”!

这两个二进制文件均位于 Apple Silicon M1+ 上的以下路径中:

john@MacBook1415 ghostscript % echo $PATH
/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/opt/X11/bin:/Library/TeX/texbin
john@MacBook1415 ghostscript % which gs
/opt/homebrew/bin/gs
john@MacBook1415 ghostscript % which ps2pdf
/opt/homebrew/bin/ps2pdf

相关内容