0

I run unsuccessfully the following and get strange output 404 first and then unknown hash from wget:

root@masi:/home/masi/Documents/# tlmgr update --self

output

(running on Debian, switching to user mode!)
TLDownload::get_file: response error: 404 File 'texlive.tlpdb.xz' not found (for ftp://ftp.funet.fi/pub/TeX/CTAN/systems/texlive/tlnet/tlpkg/texlive.tlpdb.xz)
TLUtils::download_file: persistent connection ok, but download failed: ftp://ftp.funet.fi/pub/TeX/CTAN/systems/texlive/tlnet/tlpkg/texlive.tlpdb.xz
TLUtils::download_file: retrying with wget.
TLUtils::download_file: retry with wget succeeded: ftp://ftp.funet.fi/pub/TeX/CTAN/systems/texlive/tlnet/tlpkg/texlive.tlpdb.xz
Unknown directive ...containerchecksum c59200574a316416a23695c258edf3a32531fbda43ccdc09360ee105c3f07f9fb77df17c4ba4c2ea4f3a5ea6667e064b51e3d8c2fe6c984ba3e71b4e32716955... , please fix it! at /usr/share/texlive/tlpkg/TeXLive/TLPOBJ.pm line 210, <$retfh> line 5579.

Problem has occurred 27th Nov and 30th Dec 2016.

Confusion about TeXLive version

I do the following which indicates TeXLive 2015 as root:

root@masi:/home/masi# tex -version
TeX 3.14159265 (TeX Live 2015/dev/Debian)
kpathsea version 6.2.1dev
Copyright 2014 D.E. Knuth.
There is NO warranty.  Redistribution of this software is
covered by the terms of both the TeX copyright and
the Lesser GNU General Public License.
For more information about these matters, see the file
named COPYING and the TeX source.
Primary author of TeX: D.E. Knuth.

I run as masi

masi@masi:~$ tex --version
TeX 3.14159265 (TeX Live 2016)
kpathsea version 6.2.2
Copyright 2016 D.E. Knuth.
There is NO warranty.  Redistribution of this software is
covered by the terms of both the TeX copyright and
the Lesser GNU General Public License.
For more information about these matters, see the file
named COPYING and the TeX source.
Primary author of TeX: D.E. Knuth.

I run xelatex on any document which indicates TeXLive 2016 as masi

(/usr/local/texlive/2016/texmf-dist/tex/latex/l3experimental/l3str/l3flag.sty)

Also as masi

command -v tlmgr
/usr/local/texlive/2016/bin/x86_64-linux/tlmgr

Also as masi

command -v tex
/usr/local/texlive/2016/bin/x86_64-linux/tex

TeXLive: 2016, 2015
OS: Debian 8.5
Instructions: How do I update my TeX distribution?

  • 1
    I had the same problem when I tried to use tlmgr with texlive 2015. When I looked around, they told me that the repositories that tlmgr tried to use are not available anymore, they gave me this command to change the default repository tlmgr option repository ftp://tug.org/historic/systems/texlive/2015/tlnet-final. Since you are with texlive 2016, try to change the repositories to this for example tlmgr option repository http://mirror.ctan.org/systems/texlive/tlnet (found it here) – Sidahmed Dec 31 '16 at 16:34
  • 1
    Sorry for this question, but are you sure you are using texlive 2016, can you give the first line of the output tex --version here in comments. – Sidahmed Dec 31 '16 at 16:40
  • If you wanna just tlmgr, use this command tlmgr option repository ftp://tug.org/historic/systems/texlive/2015/tlnet-final. If you wanna update to texlive 2016, you can see here http://tex.stackexchange.com/questions/1092/how-to-install-vanilla-texlive-on-debian-or-ubuntu – Sidahmed Dec 31 '16 at 16:44
  • May be you installed the two versions (somehow), but tlmgr is using the 2015 version. – Sidahmed Dec 31 '16 at 16:45
  • Ah okay. I guess that the 2015 version was installed before, and when you type tlmgr (or tex) he is using tlmgr of the 2015 version. You can manually search for the tlmgr of the 2016 version by going to the folder where you installed texlive 2016, and execute this command find . -name "tlmgr". Then you can use it by typing it's absolute path. – Sidahmed Dec 31 '16 at 16:50
0

Problem: different PATH in masi and root so use su -p not to change the PATH when going to root. My proposal for workaround

su -p
tlmgr update --self

Output

tlmgr: package repository http://mirror.datacenter.by/pub/mirrors/CTAN/systems/texlive/tlnet (verified)
tlmgr: saving backups to /usr/local/texlive/2016/tlpkg/backups
tlmgr: no self-updates for tlmgr available.
0
+50

Solution

When you go root, use this sudo -sE or this su -p to preserve the environment variables in the current session.

Explanation

Your system is using different texlive versions for different users, and that's because of the environment variable PATH.

When you are in terminal, and you type a command, the shell will look for the corresponding program in your PATH directories. But the thing is, there is different priority when the shell looks for a program in the PATH. For example, I have this PATH variable :

/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin:/snap/bin:/snap/bin

If I type date in the terminal, the shell will look for the program date in the directory /usr/local/sbin, if not found he will look in /usr/local/bin, if not found ... until he look into all the directories.

When you installed manually texlive 2016, at some point you used the instruction PATH=/usr/local/texlive/2016/bin/x86_64-linux/:$PATH. This way, you made your shell look first in the directory /usr/local/texlive/bin/x86_64-linux/ if you type any command. The only problem is that the instruction below wasn't applied to all the users, so when you go root, your PATH variable will be restored to its original content.

That's why when executing the same command from masi and root gives you two different programs. The solution is to use sudo -sE or su -p to preserve the environment variables of the previous user.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.