0

I have no idea of whether this tlmgr problem has anything to do with my arara problem, but they seem to have arisen at the same time (see ...run ConTeXt with Arara...). I solved a convoluted problem with tlmgr just a couple of months ago (tlmgr_1and tlmgr_2), after which tlmgrworked seamlessly. I tried to run tlmgr today, and this was the dialog from the terminal:

username@computername:~$ sudo tlmgr gui
[sudo] password for username:            
(running on Debian, switching to user mode!)
(see /usr/share/doc/texlive-base/README.tlmgr-on-Debian.md)
Loading local TeX Live database
  (/root/texmf/tlpkg/texlive.tlpdb)

>>NB>>> this file actually exists; BUT it's at /home/username/texmf/tlpkg/texlive.tlpdb !!

This may take some time, please be patient ... TLPDB: not a directory, not loading: /root/texmf tlmgr: user mode not initialized, please read the documentation! Compilation failed in require at /usr/bin/tlmgr line 5285.

For convenience, the tlmgr code lines 5279 thru 5296 are:

See https://tug.org/texlive/distro.html#perltk for more details.
Goodbye.
";
      }
    } else {
      printf STDERR "$prg: unexpected problem loading Tk: $@\n";
    }                       <this is line 5285<<<<<<
    exit 1;
  }

now check that we can actually create a top level window,

on darwin the X server might not be started, or on unix we are working

on a console, or whatever.

eval { my $foo = Tk::MainWindow->new; $foo->destroy; }; if ($@) { printf STDERR "perl/Tk unusable, cannot create main windows. That could be a consequence of not having X Windows installed or started! Error message from creating MainWindow:


at request of Dai Bowen, the $PATH is:

/home/*username*/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/usr/share/ImageMagick-7.1.1-2:/usr/sbin/apache2:/usr/lib/apache2:/etc/apache2:/usr/share/apache2:/usr/share/man/man8/apache2.8.gz:/usr/local/texlive/2022/bin/x86_64-linux:/usr/local/texlive/2022/texmf-dist/scripts/arara/:/usr/bin/inkscape:/usr/lib/x86_64-linux-gnu/inkscape:/usr/share/inkscape:/usr/share/man/man1/inkscape.1.gz:/opt/Zotero-6.0.22_linux-x86_64:/usr/bin/context:/usr/local/texlive/2022/bin/x86_64-linux/context:/usr/share/man/man1/context.1.gz:/usr/sbin/apache2:/usr/lib/apache2:/etc/apache2:/usr/share/apache2:/usr/share/man/man8/apache2.8.gz:/usr/local/texlive/2022/bin/x86_64-linux:/usr/bin/inkscape:/usr/lib/x86_64-linux-gnu/inkscape:/usr/share/inkscape:/usr/share/man/man1/inkscape.1.gz:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/opt/Zotero-6.0.22_linux-x86_64:/usr/bin/context:/usr/local/texlive/2022/bin/x86_64-linux/context:/usr/share/man/man1/context.1.gz:/usr/local/texlive/2022/bin/x86_64-linux/tlmgr:/usr/local/texlive/2022/bin/x86_64-linux/:/usr/local/texlive/2022/texmf-dist/scripts/arara:/opt/Zotero-6.0.22_linux-x86_64:/usr/bin/context:/usr/local/texlive/2022/bin/x86_64-linux/context:/usr/share/man/man1/context.1.gz:/usr/sbin/apache2:/usr/lib/apache2:/etc/apache2:/usr/share/apache2:/usr/share/man/man8/apache2.8.gz

After adding the symbolic links as suggested by Dai Bowen, I ran the commands $tlmgr gui which worked fine, but it brought me to the GUI for Texlive 2021 version. With the symbolic links in the path as suggested, I ran $sudo tlmgr gui which yielded this response:

username@username-ComputerName:~$ sudo tlmgr gui
[sudo] password for username:            
(running on Debian, switching to user mode!)
(see /usr/share/doc/texlive-base/README.tlmgr-on-Debian.md)
Loading local TeX Live database
  (/root/texmf/tlpkg/texlive.tlpdb)
This may take some time, please be patient ...
TLPDB: Cannot determine type of tlpdb from /root/texmf!
tlmgr: user mode not initialized, please read the documentation!
Compilation failed in require at /usr/bin/tlmgr line 5285.
username@username-ComputerName:~$ 

I looked at (/root/texmf/tlpkg/texlive.tlpdb) which generated the error. I found that only /root/texmf existed, not the tlpkg folder and the file texlive.tlpdb

But I did find the desired file at /usr/local/texlive/2022/tlpkg/texlive.plpdb.

As a classic example of "a little knowledge is a dangerous thing", I then created a symbolic link inside /root/texmf to the latter directory. I then tested it, and it was of no help whatsoever. Rather than leave this rather large collection of symbolic links in the /root/texmf/ directory, I deleted them all. Before I did that, though, I did take the precautionary step of checking in the target directory and all of the original files were still there. So, I followed through and deleted the symbolic links.

UNFORTUNATELY, don't ask me how -- all of the files and folders at /usr/local/texlive/2022/tlpkg/ are now GONE and I've got this error message:

username@username-ComputerName:~$ sudo /usr/local/texlive/2022/bin/x86_64-linux/tlmgr gui
[sudo] password for username:            
Can't locate TeXLive/TLConfig.pm in @INC
(you may need to install the TeXLive::TLConfig module)
(@INC contains: /usr/local/texlive/2022/texmf-dist/scripts/texlive     /usr/local/texlive/2022/tlpkg /etc/perl     /usr/local/lib/x86_64-linux-gnu/perl/5.34.0    /usr/local/share/perl/5.34.0     /usr/lib/x86_64-linux-gnu/perl5/5.34 /usr/share/perl5     /usr/lib/x86_64-linux-gnu/perl-base    /usr/lib/x86_64-linux-gnu/perl/5.34       /usr/share/perl/5.34 /usr/local/lib/site_perl)
at
/usr/local/texlive/2022/bin/x86_64-linux/tlmgr line 91.
BEGIN failed--compilation aborted at /usr/local/texlive/2022/bin/x86_64-linux/tlmgr line 91
username@username-ComputerName:~$

I did a quick look on CTAN and TUG, but there doesn't seem to be a clear instruction set on how to (re-)install the TLConfig module. Ironically, TLMGR is not going to be of any use for the re-installation :( Is there perhaps a "repair" method from the TeXLive 2022 DVD? I found this tidbit TUG TeXlive installation instructionswherein it does appear that you can run the installer from the DVD with the command install -tl -in-place; it sounds like the installer will look at what you've got, and create the tlpkg/texlive.tlpdb files and folders

Birdman
  • 135
  • The running on Debian and those paths (/usr/bin/tlmgr, /usr/share/doc/texlive-base/) means you're back on the Debian-packaged texlive. Did you follow the previous suggestion of pre-pending the /usr/local-based texlive path? What does $PATH show? – Dai Bowen Apr 03 '23 at 23:56
  • D'oh. Thanks for spotting that so quickly. I've had so much computer-related stuff going on these few days that I must've over-written those synapses formed last month. So to answer your questions 1) Yes, it works if I pre-pend; and 2) I edited my question to show the (verbose!) $PATH. Also, it doesn't help at all if I change the sudoers default path to include the path to the non-Debian tlmgr ---- it still picks up the Debian version if I run from $ sudo tlmgr gui – Birdman Apr 04 '23 at 05:30
  • PS--I tried to get some help at SUPERUSER.COM regarding my $PATH, which has repeated entries, because I over-zealously appended the export PATH=... in several bash and profile files. My question was shut down by the moderator. I was trying to find out what sequence is followed in building the $PATH, and the effect (if any) of having those repeated entries, so that I could go back and prune the export PATH=... commands. – Birdman Apr 04 '23 at 05:38
  • Your $PATH shows /usr/bin before /usr/local/texlive/2022/bin/x86_64-linux, so it's going to find the wrong tlmgr first. You could add symlinks to the texlive binaries in /home/<user>/bin or /usr/local/bin as they appear earlier rather than further modify PATH. – Dai Bowen Apr 04 '23 at 13:02
  • I've added the symbolic link to the directory ~/<username>/bin but it doesn;t seem to make a difference. It may need a re-start. I will let you know if that changes. – Birdman Apr 05 '23 at 04:38
  • No, restarting did not change the results; from terminal $ tlmgr gui till took me to the 2021 version, not the 2022 version. – Birdman Apr 05 '23 at 05:41
  • But, I extrapolated your comment about using symbolic links and this led me to make a big mistake, which is entirely my own. I will have to Edit the original question to add sufficient details---please see.... – Birdman Apr 05 '23 at 05:44
  • First: see edits of main question. I need some advice on the possibility of using the TeXLive DVD, which may work for repair – Birdman Apr 05 '23 at 06:31
  • A possibility: As long as the PATH is acceptable for binaries, you may be able to correct where TeX looks for its internals, by defining them in your ~.bashrc file. So if you define TeX internal export TEXMFROOT=/path/to/texlive/year then reboot, TeX will look in there. Some other TeX internals are derived from TEXMFROOT but may also be defined individually. – rallg Apr 05 '23 at 16:00
  • Update re: lost files: I had upgraded to a larger HDD about 2 weeks ago, and it was untouched, so I had the not-so-brilliant idea that I could restore the lost tlpkg files from there; tlmgr now works (so long as I use the full path to it) – Birdman Apr 05 '23 at 16:58
  • rallg: thanks for taking the time to make that suggestion; I added export TEXMFROOT=/usr/local/texlive/2022, then ran source ~/.bashrc, then $ tlmgr gui and $ sudo tlmgr gui. In both cases, it still picked up the 2021 version. – Birdman Apr 05 '23 at 17:09

0 Answers0