
每次我運行tlmgr
安裝包時,都會收到以下訊息:
$ sudo tlmgr install xetex
(running on Debian, switching to user mode!)
tlmgr: package repository http://ftp.gwdg.de/pub/ctan/systems/texlive/tlnet
Package luatex is not relocatable, cannot install it in user mode!
Package pdftex is not relocatable, cannot install it in user mode!
Package xetex is not relocatable, cannot install it in user mode!
因此,沒有安裝任何軟體包,儘管我已經使用了sudo
,tlmgr
但會自動切換回用戶模式,這是我什至不想要的(據我所知)。
如何修復此行為並安裝軟體包?
附加資訊
$ tlmgr --version
tlmgr revision 39298 (2016-01-07 03:44:29 +0100)
tlmgr using installation: /usr/local/texlive/2015
TeX Live (http://tug.org/texlive) version 2015
是使用以下腳本tlmgr
安裝的install-tl
這裡, 使用:
sudo ./install-tl-ubuntu
的輸出which
:
$ which tlmgr
/opt/texbin/tlmgr
的輸出sudo which
:
$ sudo which
/usr/bin/tlmgr
答案1
您安裝了兩個 TeX Live。一種來自發行版(在 /usr 中),另一種是透過 TUG 安裝程式安裝(在 /opt 中)。問題是,當您使用 sudo 時,路徑會被重置,並且會使用 /usr/bin 中的 tlmgr,因此在 TUG 安裝中不起作用。
您還需要為 root 用戶調整 PATH 變量,或者 - 我認為更好 - 如果它是單用戶系統,將 /opt/texlive 中文件的所有權更改為您的用戶 ID,然後您可以使用 tlmgr 而無需須藤。