fixing kpathsea

Reinhard Kotucha reinhard.kotucha at web.de
Sat Nov 16 04:30:42 CET 2019


On 2019-11-15 at 12:20:13 +0100, N. Andrew Walsh wrote:

 > > Yes, look at the first line ... You have an env variable TEXMFCNF ...
 > >
 >
 > indeed I do. How do I find where this variable is set? I don't have it set
 > in .basrc or in /etc/texmf/texmf.d/05searchpaths.cnf.

Andrew, there is one thing you should fix first.  You obviously
installed TL from TUG as root.  This was wrong.  Suppose that you
update the system TL with "emerge --update" and TL from TUG with
"tlmgr --update", both as root, how can your computer distinguish
between the distros with one and the same setting of PATH?

No user can have two TL installations at the same time without further
precautions.  Two distinct TL installations need two distinct settings
of PATH.

Your first mistake was to install TL from TUG as root in your HOME
directory. You can get everything back with

  sudo chown -R andrew:users /home/andrew

Add your local TL to path in your local .bashrc in your personal HOME
directory and maintain it as a mortal user, not as root, in the
future.

In order to make your local TL accessible to root you somewhere added
it to PATH in either the /etc or /root directory and this breaks your
Gentoo installation.  Nothing in these directories is aware of local
users.  Thus you *must* have added your local installation to PATH
manually.  The TL installer never sets environment variables but makes
suggestestions after a successful installation.  I suppose that you
followed the instructions somehow.

In order to find out what you did, try

  grep -r tex-local /etc
  grep -r tex-local /root

Once you removed your local TL from root's PATH both distributions are
completely independent.  You can use and maintain Gentoo's TL as root
and your local installation otherwise.  If you want to *use* Gentoo's
TL temporarily you need a script like the one Alexander Grahn
submitted which prepends the system TL to PATH and starts a new shell.
In order to maintain it you have to log in as root, of course.

To summarize:

  1. Make sure that everything in your HOME is owned by you.

  2. Make root unaware of anything in your home directory.

  3. Never try to maintain your local TL or anything else in your HOME
     directory as root.

Then both distributions are completely independent and definitely
don't interfere.

BTW, it is never a good idea to install any software as root.  Some
people believe that everything installed as root is more secure but
actually the opposite is true.  It's also a bad idea to assign
/usr/local to root though the installer of your OS has no other choice
because it's not aware of any users and the decicision whom to grant
access can only be made by a human.  Whatever you do as root can break
your system.  Thus avoid beeing root whenever possible.  The only
thing you have to do as root is to run the maintenance tools provided
by your Linux distributor.

Norbert, I can't believe that there is something wrong with Gentoo.
I used Gentoo for many years and it was always reliable.  And bugs in
such important packages as TeX Live are certainly noticed and fixed
immediately.  I abandoned Gentoo two years ago mainly because system
updates consumed too much time, not because I was unsatisfied with
the distribution in general.

Regards,
  Reinhard

--
------------------------------------------------------------------
Reinhard Kotucha                            Phone: +49-511-3373112
Marschnerstr. 25
D-30167 Hannover                    mailto:reinhard.kotucha at web.de
------------------------------------------------------------------



More information about the tex-live mailing list