unexpected return value from verify_checksum: -5

Axel E. Retif axel.retif at gmail.com
Thu Sep 23 04:37:11 CEST 2021

> I'm a very new ubuntu user and im trying to download a basic-scheme 
> texlive install however I've run into problems when trying to use tlmgr 
> to download packages I get the message "/usr/bin/tlmgr:unexpected return 
> value from verify_checksum: -5"
> After a bit of searching online i found this post
> https://tex.stackexchange.com/questions/528634/tlmgr-unexpected-return-value-from-verify-checksum-5 
> however even after adding the lines
> export PATH=$PATH:/usr/local/texlive/2021/bin/x86_64-linux export 
> MANPATH=/usr/local/texlive/2021/texmf-dist/doc/man export 
> INFOPATH=/usr/local/texlive/2021/texmf-dist/doc/info
> to .bashrc

> when using
> $ echo $PATH
> It returns
> /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/usr/local/texlive/2021/bin/x86_64-linux:/usr/local/texlive/2021/bin/x86_64-linux

 From what I see ("/usr/bin/tlmgr:unexpected return...") you also have 
an installation of TeX from the repositories, and as you see in your 
line above /usr/bin comes before 
/usr/local/texlive/2021/bin/x86_64-linux (I don't know why it appears 
twice). So if the system finds a tlmgr in /usr/bin it selects that and 
simply ignores what comes after.

That is to say, you have *appended* the PATH 
/usr/local/texlive/2021/bin/x86_64-linux; but in order for the system to 
select tlmgr from .../texlive/2021 you have to *prepend* it, so it comes 
first in the search path.

For that I've been using in general the instructions from «Gilles 'SO- 
stop being evil'» in


(it's the replay that starts with the title «The simple stuff»; I know 
it's “old”, but it works for me). So it would be


I say that I follow said instructions “in general” because they say to 
put the PATH in ~/.profile, but I do it in ~/.bashrc, and I source 
~/.bashrc in ~/.profile with these lines:

# if running bash
if [ -n "$BASH_VERSION" ]; then
     # include .bashrc if it exists
     if [ -f "$HOME/.bashrc" ]; then
	. "$HOME/.bashrc"



More information about the tex-live mailing list.