错误:“brew install --cask mactex”

错误:“brew install --cask mactex”

输入

brew install --cask mactex

输出

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)"

==> Downloading https://mirror.ctan.org/systems/mac/mactex/mactex-20220321.pkg
Already downloaded: /Users/iamthelabhras/Library/Caches/Homebrew/downloads/b4a8f6bffbfd2af819208c808eda31fdbb959295674dd63f1d0797d4f94d37d3--mactex-20220321.pkg
All formula dependencies satisfied.
==> Installing Cask mactex
==> Running installer for mactex; your password may be necessary.
Package installers may write to any location; options such as `--appdir` are ignored.
Password:
installer: Package name is MacTeX
installer: choices changes file '/private/tmp/choices20220904-3519-19ami42.xml' applied
installer: Installing at base path /
installer: The install failed..
==> Purging files for version 2022.0321 of Cask mactex
Error: Failure while executing; `/usr/bin/sudo -E -- /usr/bin/env LOGNAME=iamthelabhras USER=iamthelabhras USERNAME=iamthelabhras /usr/sbin/installer -pkg /usr/local/Caskroom/mactex/2022.0321/mactex-20220321.pkg -target / -applyChoiceChangesXML /private/tmp/choices20220904-3519-19ami42.xml` exited with 1. Here's the output:
installer: Package name is MacTeX
installer: choices changes file '/private/tmp/choices20220904-3519-19ami42.xml' applied
installer: Installing at base path /
installer: The install failed..

这确实超出了我的理解范围。我安装 MacTeX 是为了学习使用 LaTeX 做笔记,虽然我熟悉命令行,但这些错误对我来说就像希腊文一样难懂。

非常感谢社区提供的任何帮助!

再去一次!

答案1

我不会用 Homebrew 安装 MacTeX。它只是

https://www.tug.org/mactex

点击明显的链接并下载安装程序。下载完成后双击它以安装磁盘映像(如果您的浏览器尚未执行此步骤)。启动安装程序,提供管理员密码并等待安装完成。

就这样:卸载映像并丢弃(大的)下载文件。

现在你有了一个目录

/usr/local/texlive/2022

包含完整发行版。明年,当 TeX Live 2023 发布时,您可以再次执行这些步骤,新的安装程序将不是覆盖或者以任何方式更改旧目录。

使用提供的 TeX Live 实用程序(您可以在“应用程序”文件夹中找到它),您甚至可以在机器上的所有可用发行版之间进行选择。这可能会带来救星:有时某些关键工作无法使用新发行版正确编译,而您的时间紧迫。不要惊慌!切换到较旧的发行版来完成工作。您可以在提交作业并有空闲时间后研究该问题。

“配置菜单”有一个条目“更改默认 TeX Live 版本…”。如果你选择它,会打开一个如下窗口

在此处输入图片描述

最好定期运行 TeX Live Utility 以更新发行版。

仅供参考,在我目前使用的机器上,我有从 2012 年到 2022 年的所有 TeX Live 版本(我办公室的一台机器上有从 2007 年到 2011 年的版本)。由于技术原因,无法通过这种方式选择从 2012 年到 2016 年的年份,但在其中运行程序很容易。

如果您使用 Homebrew 进行安装,我很确定旧的发行版将被删除!

您不需要保留所有旧版本。我保留它们是为了调试:有时我可以通过查看发行版之间的软件包变化来解决问题。但保留去年的版本更好。

如何删除发布?只需打开 Finder 窗口,转到要/usr/local/texlive删除的年份文件夹并将其删除。在要求时提供管理员密码并清空垃圾箱。

相关内容