kpsewhich:未找到命令。在 tlmgr 更新时,MacTex 安装

kpsewhich:未找到命令。在 tlmgr 更新时,MacTex 安装

我尝试使用 TexLive-Utility 更新 tlmgr,但找不到 kpsewhich。但我不确定为什么,因为它在我的 bash PATH 中

$which kpsewhich
/usr/texbin/kpsewhich

不仅如此,它位于 TeXLive-Utility 为其自身环境创建的 PATH 中,但日志文件显示两个不同的 PATH 变量……这是日志(删除了一些个人信息)

2014-12-26 02:38:24 +0000 Notice -[TLMAppController _checkSystemPythonVersion][3465]    Using Python interpreter at '/usr/bin/python'
Python version: 2.7.6 (default, Sep  9 2014, 15:04:36) 
[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.39)]
2014-12-26 02:38:24 +0000 Notice -[TLMAppController _checkProcessUmask][3465]   Process umask = 022
2014-12-26 02:38:24 +0000 Notice -[TLMAppController applicationDidFinishLaunching:][3465]   Welcome to TeX Live Utility 1.17, running under Mac OS X Version 10.10.1 (Build 14B25) with 4/4 processors active and 8.0 GB physical memory.
2014-12-26 02:38:24 +0000 Notice +[TLMEnvironment updateEnvironment][3465]  Setting up a new environment for /usr/local/texlive/2014…
2014-12-26 02:38:24 +0000 Notice +[TLMEnvironment updatePathEnvironment][3465]  Using PATH = "(
    "/usr/local/bin",
    "/usr/bin",
    "/bin",
    "/usr/sbin",
    "/sbin",
    "/usr/texbin"
)"
2014-12-26 02:38:24 +0000 Notice +[TLMEnvironment updatePathEnvironment][3465]  /usr/bin/env
PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/texbin
DISPLAY=/private/tmp/com.apple.launchd.EwTEw7Hhie/org.macosforge.xquartz:0
DBUS_LAUNCHD_SESSION_BUS_SOCKET=/private/tmp/com.apple.launchd.Mg3IUoeulu/unix_domain_listener
PATH=/usr/bin:/bin:/usr/sbin:/sbin
SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.pyOdcu5mIa/Listeners
Apple_PubSub_Socket_Render=/private/tmp/com.apple.launchd.UmmBWlY0EC/Render
SHELL=/bin/bash
__CF_USER_TEXT_ENCODING=0x1F5:0x0:0x0
TMPDIR=/var/folders/bh/xqbvhy9j1hg21kb0bh_mm8jc0000gn/T/
XPC_SERVICE_NAME=0
DISPLAY=/private/tmp/com.apple.launchd.EwTEw7Hhie/org.macosforge.xquartz:0
DBUS_LAUNCHD_SESSION_BUS_SOCKET=/private/tmp/com.apple.launchd.Mg3IUoeulu/unix_domain_listener
SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.pyOdcu5mIa/Listeners
Apple_PubSub_Socket_Render=/private/tmp/com.apple.launchd.UmmBWlY0EC/Render
XPC_FLAGS=0x0
SHELL=/bin/bash
TMPDIR=/var/folders/bh/xqbvhy9j1hg21kb0bh_mm8jc0000gn/T/

2014-12-26 02:38:25 +0000 Notice +[TLMEnvironment _getInstalledYear:isDevelopmentVersion:tlmgrVersion:][3465]   Looks like you're using TeX Live 2014
2014-12-26 02:38:25 +0000 Notice -[TLMEnvironment _checkForRootPrivileges][3465]    Root permission required for installation at /usr/local/texlive/2014
2014-12-26 02:38:25 +0000 Notice +[TLMEnvironment updateEnvironment][3465]  Nothing to update for /usr/local/texlive/2014
2014-12-26 02:38:25 +0000 Notice -[TLMLogWindowController awakeFromNib][3465]   Loaded log window controller
2014-12-26 02:38:25 +0000 Notice -[TLMDatabase _downloadDatabaseHead][3465] Checking the repository version.  Please be patient.
2014-12-26 02:38:25 +0000 Notice -[TLMDatabase _downloadDatabaseHead][3465] Downloading at least 2048 bytes of tlpdb for a version check…
2014-12-26 02:38:26 +0000 Notice -[TLMDatabase connection:willSendRequest:redirectResponse:][3465]  redirected request to http://mirror.ox.ac.uk/sites/ctan.org/systems/texlive/tlnet/tlpkg/texlive.tlpdb
2014-12-26 02:38:26 +0000 Notice -[TLMDatabase _downloadDatabaseHead][3465] Downloaded 130749 bytes of tlpdb for version check
2014-12-26 02:38:27 +0000 Notice -[TLMEnvironment _getValidServerURL:repositoryYear:][3465] Repository version appears to be 2014; a young TeX Live
2014-12-26 02:38:27 +0000 Notice -[TLMMainWindowController _refreshLocalDatabase][3465] Updating local package database
2014-12-26 02:38:27 +0000 Notice -[TLMMainWindowController _refreshUpdatedPackageListFromLocation:][3465]   Refreshing list of updated packages…
2014-12-26 02:38:34 +0000 Notice -[TLMMainWindowController _paperSizeCheckTerminated:][3465]    System paper size = a4, pdftex paper size = (null)
2014-12-26 02:38:39 +0000 Notice -[TLMOperation main][3465] Successfully executed `/usr/texbin/tlmgr --machine-readable --repository http://mirror.ox.ac.uk/sites/ctan.org/systems/texlive/tlnet/ update --list --all`
2014-12-26 02:38:39 +0000 Notice -[TLMOperation main][3465] tlmgr: package repository http://mirror.ox.ac.uk/sites/ctan.org/systems/texlive/tlnet/
===============================================================================
tlmgr itself needs to be updated.
Please do this via either
  tlmgr update --self
or by getting the latest updater for Unix-ish systems:
  http://mirror.ctan.org/systems/texlive/tlnet/update-tlmgr-latest.sh
and/or Windows systems:
  http://mirror.ctan.org/systems/texlive/tlnet/update-tlmgr-latest.exe
Then continue with other updates as usual.
===============================================================================
2014-12-26 02:38:42 +0000 Notice -[TLMMainWindowController _handleListUpdatesFinishedNotification:][3465]   Critical updates detected: (
    "texlive.infra"
)
2014-12-26 02:39:01 +0000 Notice -[TLMMainWindowController _isCorrectDatabaseVersionAtURL:][3465]   Checking database version in case preferences have been changed…
2014-12-26 02:39:01 +0000 Notice -[TLMMainWindowController _updateAllPackagesFromRepository:][3465] Beginning infrastructure update from http://mirror.ox.ac.uk/sites/ctan.org/systems/texlive/tlnet/
2014-12-26 02:39:01 +0000 Notice -[TLMInfraUpdateOperation _synchronouslyDownloadURL:toPath:][3465] Downloading URL: http://mirror.ox.ac.uk/sites/ctan.org/systems/texlive/tlnet/update-tlmgr-latest.sh
2014-12-26 02:39:01 +0000 Notice -[TLMInfraUpdateOperation download:willSendRequest:redirectResponse:][3465]    Download redirected to http://mirror.ox.ac.uk/sites/ctan.org/systems/texlive/tlnet/update-tlmgr-latest.sh, expecting 0 bytes.
2014-12-26 02:39:02 +0000 Notice -[TLMInfraUpdateOperation download:didReceiveResponse:][3465]  Will download 4794067 bytes…
2014-12-26 02:39:04 +0000 Notice -[TLMInfraUpdateOperation download:didReceiveDataOfLength:][3465]  Received 20% of 4794067 bytes…
2014-12-26 02:39:05 +0000 Notice -[TLMInfraUpdateOperation download:didReceiveDataOfLength:][3465]  Received 41% of 4794067 bytes…
2014-12-26 02:39:06 +0000 Notice -[TLMInfraUpdateOperation download:didReceiveDataOfLength:][3465]  Received 63% of 4794067 bytes…
2014-12-26 02:39:07 +0000 Notice -[TLMInfraUpdateOperation download:didReceiveDataOfLength:][3465]  Received 85% of 4794067 bytes…
2014-12-26 02:39:08 +0000 Notice -[TLMInfraUpdateOperation downloadDidFinish:][3465]    Download of 4794067 bytes complete
2014-12-26 02:39:08 +0000 Notice -[TLMInfraUpdateOperation _downloadUpdateScript][3465] First line of downloaded file is: "#!/bin/sh"…good!
2014-12-26 02:39:08 +0000 Notice -[TLMInfraUpdateOperation _synchronouslyDownloadURL:toPath:][3465] Downloading URL: http://mirror.ox.ac.uk/sites/ctan.org/systems/texlive/tlnet/update-tlmgr-latest.sh.sha256
2014-12-26 02:39:08 +0000 Notice -[TLMInfraUpdateOperation download:willSendRequest:redirectResponse:][3465]    Download redirected to http://mirror.ox.ac.uk/sites/ctan.org/systems/texlive/tlnet/update-tlmgr-latest.sh.sha256, expecting 0 bytes.
2014-12-26 02:39:08 +0000 Notice -[TLMInfraUpdateOperation download:didReceiveResponse:][3465]  Will download 89 bytes…
2014-12-26 02:39:08 +0000 Notice -[TLMInfraUpdateOperation download:didReceiveDataOfLength:][3465]  Received 100% of 89 bytes…
2014-12-26 02:39:08 +0000 Notice -[TLMInfraUpdateOperation downloadDidFinish:][3465]    Download of 89 bytes complete
2014-12-26 02:39:08 +0000 Notice -[TLMInfraUpdateOperation _downloadAndCheckHash][3465] SHA256 signature looks okay
2014-12-26 02:39:08 +0000 Notice -[TLMAuthorizedOperation main][3465]   Checking code signature before running tlu_ipctask as root…
2014-12-26 02:39:08 +0000 Notice /usr/bin/codesign[3465]    /Applications/TeX/TeX Live Utility.app/Contents/MacOS/tlu_ipctask: valid on disk
/Applications/TeX/TeX Live Utility.app/Contents/MacOS/tlu_ipctask: satisfies its Designated Requirement
2014-12-26 02:39:08 +0000 Notice -[TLMAuthorizedOperation main][3465]   Signature was valid, okay to run tlu_ipctask
2014-12-26 02:39:14 +0000 Notice -[TLMAuthorizedOperation main][3465]   Invoking privileged task via AuthorizationExecuteWithPrivileges
2014-12-26 02:39:14 +0000 Notice tlu_ipctask[3664]  dropped privileges to user nobody
2014-12-26 02:39:15 +0000 Notice -[TLMAuthorizedOperation setWrapperPID:][3465] tlu_ipctask checking in:  tlu_ipctask pid = 3664
2014-12-26 02:39:16 +0000 Notice -[TLMAuthorizedOperation setUnderlyingPID:][3465]  tlu_ipctask checking in: pid = 3665 (/var/folders/bh/xqbvhy9j1hg21kb0bh_mm8jc0000gn/T/TLMInfraUpdateOperation.LUkU1n/update-tlmgr-latest.sh --nox11)
2014-12-26 02:39:16 +0000 Notice tlu_ipctask[3664]  tlu_ipctask: child HOME = '/var/root'
2014-12-26 02:39:16 +0000 Notice tlu_ipctask[3664]  tlu_ipctask: current HOME = '/var/empty'
2014-12-26 02:39:16 +0000 Notice tlu_ipctask[3664]  Verifying archive integrity... All good.
2014-12-26 02:39:16 +0000 Notice tlu_ipctask[3664]  Uncompressing TeX Live Manager Updater......................................................................................................................................................................................

但主要问题出现在安装脚本“runme.sh”开始时。

2014-12-26 02:39:16 +0000 Warning tlu_ipctask[3664] ./runme.sh: line 11: kpsewhich: command not found
2014-12-26 02:39:16 +0000 Warning tlu_ipctask[3664] ./runme.sh: Cannot find TeX Live root using kpsewhich --var-value=SELFAUTOPARENT.
2014-12-26 02:39:16 +0000 Warning tlu_ipctask[3664] ./runme.sh: Please set your PATH as needed, otherwise it's hopeless.
2014-12-26 02:39:16 +0000 Notice -[TLMAuthorizedOperation _runUntilChildExit][3465] kqueue noted that pid 3665 exited (/var/folders/bh/xqbvhy9j1hg21kb0bh_mm8jc0000gn/T/TLMInfraUpdateOperation.LUkU1n/update-tlmgr-latest.sh --nox11)
2014-12-26 02:39:16 +0000 Notice tlu_ipctask[3664]  child process pid = 3665 exited
2014-12-26 02:39:17 +0000 Error tlu_ipctask[3664]   Value of errno is No such file or directory
2014-12-26 02:39:17 +0000 Error tlu_ipctask[3664]   *** ERROR *** exit status of pid = 3665 was 1
2014-12-26 02:39:17 +0000 Notice -[TLMAuthorizedOperation _runUntilChildExit][3465] waitpid returned 3664, WIFEXITED(256) = 1, errno = 93 (Attribute not found)
2014-12-26 02:39:17 +0000 Notice -[TLMAuthorizedOperation _runUntilChildExit][3465] kqueue noted that tlu_ipctask (pid = 3664) exited with status 1
2014-12-26 02:39:18 +0000 Notice -[TLMInfraUpdateOperation main][3465]  Removed temp directory "/var/folders/bh/xqbvhy9j1hg21kb0bh_mm8jc0000gn/T/TLMInfraUpdateOperation.LUkU1n"

问题是:TexLive-Utility 在这里使用什么 PATH 变量(请注意,它在环境中列出了两次),以及当它组成了自己的环境时,我如何像 TeXLive-Utility 建议的那样“设置它”?

答案1

这应该是一个暂时的问题,并且已向 TeX Live 上游报告。TeX Live Utility 使用更新-tlmgr-最新版.sh进行更新,因为 存在历史问题tlmgr update --self

作为 TLU 维护者,我建议用户等到服务器上修复它,但如果您急需某些包更新,您可以在终端中运行更新命令。

编辑:据 TeX Live 团队称,这个问题现已修复。修复版本现在应该在所有 CTAN 镜像上都有。

您可以通过按住 Option 键的同时选择“操作”菜单,然后选择“从关键存储库安装 TeX Live Manager”项来解决此问题。有些用户报告使用此方法下载失败。

现在应该将这个问题标记为非主题吗?大概比我得分高的人可以做到这一点……

相关内容