2

I'm running into a problem similar to this one.

I'm running Arch Linux and have installed TexLive from their repository. I noticed that I had some configuration files (texmf.cnf and updmap.cfg) that needed to be updated, so I diffed them and updated the relevant sections. In the case of updmap, it was simply adding some kanji font maps to the file.

Then, I thought I should run updmap since I changed the config. I got this:

$ updmap
Can't locate TeXLive/TLUtils.pm in @INC (@INC contains: /tlpkg /usr/lib/perl5/site_perl /usr/share/perl5/site_perl /usr/lib/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib/perl5/core_perl /usr/share/perl5/core_perl .) at /usr/bin/updmap line 18.
BEGIN failed--compilation aborted at /usr/bin/updmap line 18.

I checked for TLUtils.pm and found it:

$ locate TLUtils.pm
/usr/share/tlpkg/TeXLive/TLUtils.pm
/var/lib/texmf/arch/tlpkg/TeXLive/TLUtils.pm

I don't know where @INC (sounds like the TL path?) is defined and thus don't know where it gets told where to look for TLUtils.pm.

The line 18 referenced is this:

use TeXLive::TLUtils qw(mkdirhier mktexupd win32);

I'm guessing some things got moved around during some update and perhaps some path is still referencing some now non-location. How might I correct this?

Hendy
  • 824

1 Answers1

2

Ok, after your answer I understand what is going on.

TL binaries use their locations to search for their libraries. If you installed TL in /usr/local/texlive, they are in /usr/local/texlive/YEAR/bin/ARCH, and look for their libraries in locations like ../../tlpkg etc. However, your updmap is from the system vendor installation (or maybe you copied it there instead of symlinking), and its location is /usr/bin/, so ../../tlpkg gives the directory where nothing is found.

Add the path to TL2011 binaries in the head of the search path, like export PATH=/usr/local/texlive/2011/bin/i386-linux:$PATH. Or just symlink the new binaries to /usr/local/bin: usually this directory is searched before /usr/bin.

Boris
  • 38,129
  • I don't have a /usr/local/texlive directory... Should I? Arch Linux provides the Arch Build System so you can build from source. Here's the default build script for texlive-core (how the binary installs from the repo by default. No references to /usr/local that I see. – Hendy Mar 24 '12 at 17:37
  • I might be muddying waters since Arch does this differently than the TL default or other distros... I posted on Arch forums as well and will post the answer here if I get it. My apologies if this is a source of confusion. – Hendy Mar 24 '12 at 17:41
  • Well, you can either take the fresh binaries from TL and install them using tlmgr, or patch the build script for Arch linux. I'm afraid in the latter case the question belongs to an Arch linux forum since it covers a specific vendor-related topic. – Boris Mar 24 '12 at 17:43
  • Using symlinks requires to reset them all when there's a major update of TeX Live (2011->2012, for instance). With the PATH method only that needs to be updated. – egreg Mar 24 '12 at 18:11
  • I'll look into just installing via tlmgr. Out of curiosity... where does the @INC path get defined? Perhaps I can at least try and track down a config that might be out of date and point it to the right place? – Hendy Mar 24 '12 at 18:22
  • Well, if you say perl -V, you get the default @INC. On my machine it is @INC: /etc/perl /usr/local/lib/perl/5.10.0 /usr/local/share/perl/5.10.0 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.10 /usr/share/perl/5.10 /usr/local/lib/site_perl . However, if you look into updmap, you can see there the lines, that add directories to @INC: BEGIN { $^W=1; chomp($TEXMFROOT = kpsewhich -var-value=TEXMFROOT); unshift (@INC, "$TEXMFROOT/tlpkg"); } – Boris Mar 24 '12 at 19:00
  • @egreg tlmgr takes care of updating symlinks if this option is chosen. – Boris Mar 24 '12 at 19:03
  • @Boris But in /usr/bin, IIRC (which is not very good, as the system package manager may have different ideas when installing something that requires TeX). – egreg Mar 24 '12 at 19:04
  • @egreg The usual idea is that /usr/bin is for system binaries, while /usr/local/bin/ is for something your sysadmin installed from the Internet. Accordingly TeXLive can be compiled "as TL" (binaries in /usr/local/texlive/YEAR/bin/ARCH with optional symlinks to /usr/local/bin) or as a part of a system distro (binaries in /usr/bin, TEXMFROOT defined in a special way). Nobody but system integrators should use the second option - and they should know what they are doing. – Boris Mar 24 '12 at 19:26