Sorry to reactivate this old post but there was no correct answer.
The message :
(running on Debian, switching to user mode!) cannot setup TLPDB in /home/USER/texmf at /usr/bin/tlmgr line 5308.
is generated when tlmgr
was not initialized. In most cases, launching the following command (as a normal user) solves the problem :
$ tlmgr init-usertree
This command will create few folders inside your home directory. See the man page for explanation :
Before using tlmgr in user mode, you have to set up the user tree with the init-usertree action. This creates usertree/web2c and usertree/tlpkg/tlpobj, and a minimal usertree/tlpkg/texlive.tlpdb. At that point, you can tell tlmgr to do the (supported) actions by adding the --usermode command line option.
If you have both a GNU/Linux distribution provided TeX Live and a manually installed one, you'll have two different tlmgr
.
The one in /usr/bin
will not update packages, but just change configuration parameters.
The one in /usr/local/texlive/<YEAR>/bin/<ARCH>
, instead, will do updates to the manually installed TeX Live. Here <YEAR>
stands for the version you have, probably 2014
, while <ARCH>
is the standard symbolic name for the processor, say x86_64-linux
or i386-linux
.
The correct call, if your data is as above, is
sudo /usr/local/texlive/2014/bin/x86_64-linux/tlmgr --gui
When doing a manual installation of TeX Live, I recommend doing
sudo ln -s /usr/local/texlive/2014/bin/x86_64-linux /opt/texbin
so you just need to add to your PATH the simpler /opt/texbin
and have another benefit: when TeX Live 2015 is released and you install it, you just have to do
sudo rm /opt/texbin
sudo ln -s /usr/local/texlive/2015/bin/x86_64-linux /opt/texbin
and do no other change to your setup, because your PATH variable will already point to the correct location. If you create this symbolic link, then
sudo /opt/texbin/tlmgr --gui
will become the correct call.
See this article on TUGboat which explains the installation procedure I recommend and that's still valid provided you just change the year from 2010 to the current release year.
Best Answer
As mentioned in the comments,
tlmgr
in Debian/Ubuntu switches automatically into user mode. This is also issued every timetlmgr
is started.In user mode, only packages that are located completely in
texmf-dist
can be installed, since there is no way to know where to install binaries/scripts.A future version of
tlmgr
might cater to this, but this is far from complete.Solutions are now as follows:
texonthefly
package and copy the files manually intoTEXMFHOME
and the scripts into~/bin
Hope that helps