為什麼會出現此錯誤 tlmgr 未知指令?

為什麼會出現此錯誤 tlmgr 未知指令?

tlmgr我已經有一段時間沒有使用了,但是當我今天嘗試使用它安裝任何軟體包時,它返回了以下訊息:

(在 Debian 上運行,切換到用戶模式!)未知指令 ...containerchecksum c59200574a316416a23695c258edf3a32531fbda43ccdc09360ee105c3f07f9ea681843ccdc09360ee105c3f07f9ea6417f964602564b 8 4ba3e71b4e32716955...,請修復它!位於 /usr/share/texlive/tlpkg/TeXLive/TLPOBJ.pm 第 210 行、第 5579 行。

我嘗試使用指定的修復https://www.tug.org/pipermail/tex-live/2016-April/038058.html:

您必須從 tlpretest 儲存庫下載 update-tlmgr-latest.sh 並執行它。之後您將能夠像往常一樣使用 tlmgr(由 Norbert 幾個小時前宣布)。

我已經從那裡下載了https://www.tug.org/texlive/tlmgr.html,但它返回了另一個錯誤:

Verifying archive integrity... All good.
Uncompressing TeX Live Manager Updater............................................................................................................................................................................
./runme.sh: Cannot find TeX Live root using kpsewhich --var-value=SELFAUTOPARENT.
./runme.sh: Please set your PATH as needed, otherwise it's hopeless.

最小範例

在系統中成功安裝舊 TeXLive 後,乾淨地安裝普通 TeXLive 2016 tmlgr: 中沒有錯誤/警告/usr/local/texlive/2016/*.log,完整的日誌範例這裡
執行以下命令,但在嘗試更新系統時您會得到與上面相同的輸出

root@masi:/home/masi/Downloads/t/install-tl-20161019# tlmgr update --self
(running on Debian, switching to user mode!)
Unknown directive ...containerchecksum c59200574a316416a23695c258edf3a32531fbda43ccdc09360ee105c3f07f9fb77df17c4ba4c2ea4f3a5ea6667e064b51e3d8c2fe6c984ba3e71b4e32716955... , please fix it! at /usr/share/texlive/tlpkg/TeXLive/TLPOBJ.pm line 210, <$retfh> line 5579.

答案1

如果您想繼續使用 2015 版本,您應該使用以下命令將儲存庫設定為存檔版本:

tlmgr option repository ftp://tug.org/historic/systems/texlive/2015/tlnet-final 

正如這裡所解釋的如何從舊版的 TeXLive 安裝軟體套件?

答案2

您使用的tlmgr是 TeX Live/Debian,即打包版本。這個版本確實不是使用目前(2016)版本,沒有辦法解決這個問題。

您有兩個選擇:

  • 安裝上游 TeX Live
  • tlmgr停止使用Debian安裝除非您找到 TL 2015 版本的檔案。

當我們(TeX Live Team)需要更改資料庫格式時,這種情況應該很少發生(過去 5 年左右沒有發生過,希望不會超過 5 年)。

答案3

您無法將 TeXLive 2015 升級至 TeXLive 2016。

這裡:

從 TeX Live 2015 升級到 2016

由於基礎設施的變化,從 TL'15 版本升級到 TL'16 是不可行的。 (MacTeX 同上。)請重新安裝。

答案4

Unknown directive ...containerchecksum我在 Docker 上使用 Debian 時遇到了同樣的問題。為了克服這個問題,我使用以下命令查找了所有乳膠包:

apt-get install -y apt-file
apt-file update
apt-file search <name-of-latex-package>

其中大多數都在texlive-latex-base和中texlive-latex-base,而我唯一需要的另一個是texlive-latex-extra。使用:

apt-get install -y texlive-latex-extra

然後我可以在不使用tlmgr.

請注意,此方法僅安裝舊版的 texlive,因為 apt-get 只維護舊版本。

相關內容