#986042 texlive-base: Post-installation script fails with exit status 1

#986042#5
Date:
2021-03-28 13:58:21 UTC
From:
To:
Dear Maintainer,

All tex packages were working fine for me until a couple of days ago,
when I did an apt update. I realised that texlive-base could not
configure itself. Unfortunately, no logs on that.

I did however purge and remove any stray files/directories belonging to
anything tex on my machine. I then proceeded to apt install texlive-base
to see if I can rectify the issue with a reinstall. I get the following
output:

[TRUNCATED]
Setting up texlive-binaries (2020.20200327.54578-7) ...
update-alternatives: using /usr/bin/xdvi-xaw to provide /usr/bin/xdvi.bin (xdvi.bin) in auto mode
update-alternatives: using /usr/bin/bibtex.original to provide /usr/bin/bibtex (bibtex) in auto mode
Setting up lmodern (2.004.5-6.1) ...
Setting up texlive-base (2020.20210202-3) ...
mktexlsr: Updating /var/lib/texmf/ls-R-TEXLIVEDIST...
mktexlsr: Updating /var/lib/texmf/ls-R-TEXMFMAIN...
mktexlsr: Updating /var/lib/texmf/ls-R...
mktexlsr: Done.
Can't use string ("2") as an ARRAY ref while "strict refs" in use at /usr/bin/tl-paper line 112.
Can't use string ("2") as an ARRAY ref while "strict refs" in use at /usr/bin/tl-paper line 112.
Can't use string ("2") as an ARRAY ref while "strict refs" in use at /usr/bin/tl-paper line 112.
Can't use string ("2") as an ARRAY ref while "strict refs" in use at /usr/bin/tl-paper line 112.
Can't use string ("2") as an ARRAY ref while "strict refs" in use at /usr/bin/tl-paper line 112.
dpkg: error processing package texlive-base (--configure):
 installed texlive-base package post-installation script subprocess returned error exit status 1
Processing triggers for desktop-file-utils (0.26-1) ...
Processing triggers for gnome-menus (3.36.0-1) ...
Processing triggers for libc-bin (2.31-10) ...
Processing triggers for man-db (2.9.4-2) ...
Processing triggers for install-info (6.7.0.dfsg.2-6) ...
Processing triggers for mailcap (3.69) ...
Processing triggers for fontconfig (2.13.1-4.2) ...
Processing triggers for tex-common (6.16) ...
texlive-base is not ready, delaying updmap-sys call
update-language: texlive-base not installed and configured, doing nothing!
texlive-base is not ready, skipping fmtutil --all call
Errors were encountered while processing:
 texlive-base
E: Sub-process /usr/bin/dpkg returned an error code (1)

I am not quite sure what is going on here. I also attempted to remove
this package and install the texlive-full metapackage, however that
fails due to the cascading issue relating to texlive-base not being
configured & failing.

Any help and suggestions is much appreciated. I am not sure if this is
related to the package or not - it seems to be with the postinst script.
I am currently running on a system where sources.list is set to
bullseye.

Please feel free to write back if you require any further information,
or if there is something trivial and non-package related, to which I
understand this bug report being closed.



##################################
minimal input file


##################################
other files

######################################
 List of ls-R files

lrwxrwxrwx 31 root 17 Feb 20:30 /usr/share/texlive/texmf-dist/ls-R -> /var/lib/texmf/ls-R-TEXLIVEDIST
######################################
 Config files
.rw-r--r-- 475 root 28 Mar 14:47 /etc/texmf/web2c/texmf.cnf
Warning: fmtutil.cnf cannot be found with kpsewhich!
Warning: updmap.cfg cannot be found with kpsewhich!
Warning: language.dat cannot be found with kpsewhich!
######################################
 Files in /etc/texmf/web2c/
.rw-r--r-- 283 root 12 Feb 22:13 mktex.cnf
.rw-r--r-- 475 root 28 Mar 14:47 texmf.cnf
######################################
 md5sums of texmf.d
ca40c66f144b4bafc3e59a2dd32ecb9c  /etc/texmf/texmf.d/00debian.cnf

#986042#10
Date:
2021-03-28 14:53:56 UTC
From:
To:
Am 28.03.2021 um 15:58 teilte Shayan Doust mit:

Hi,
What is the content of /etc/papersize? Does running "dpkg-reconfigure
libpaper1" and then try again solve your issue?

Hilmar

#986042#15
Date:
2021-03-28 15:50:15 UTC
From:
To:
Hello Hilmar,

The content of /etc/papersize is a4.

Running "dpkg-reconfigure libpaper1" again, and then trying again for texlive-base, spits out the
same issue I've reported.

Kind regards

#986042#20
Date:
2021-03-29 00:28:32 UTC
From:
To:
Interesting, I don't see that in my case ...

$ pkg-reconfigure libpaper1
Replacing config file /etc/papersize with new version
tl-paper: setting paper size for context to letter: /var/lib/texmf/tex/context/user/cont-sys-paper.tex
tl-paper: setting paper size for dvipdfmx to letter: /var/lib/texmf/dvipdfmx/dvipdfmx-paper.cfg
tl-paper: setting paper size for dvips to letter: /var/lib/texmf/dvips/config/config-paper.ps
tl-paper: setting paper size for pdftex to letter: /var/lib/texmf/tex/generic/tex-ini-files/pdftexconfig.tex
tl-paper: setting paper size for xdvi to letter: /var/lib/texmf/xdvi/XDvi-paper
Running mktexlsr. This may take some time... done.
Building format(s) --refresh.
        This may take some time...
...
$

Can you please do
	for i in xdvi|pdftex|dvips|dvipdfmx|context ; do
		echo "=== $i ==="
		tl-paper get $i
	done
and send the output? And then we continue debugging. It fails in
	tl-paper get $prg
calls and thus it seems something in your configurations files for one
of these programs (or all) seem to be broken.

Best

Norbert

#986042#25
Date:
2021-03-29 13:11:05 UTC
From:
To:
Hello Norbert,

Thanks for your prompt reply.

In fact, running dpkg-reconfigure libpaper1, I get the "system defaults paper size" selection menu, to which I select a4.
I do not get the extra tl-paper output after this. Perhaps this is a side-effect to my unconfigured texlive-base installation.

Running the script you gave me, I get:

=== xdvi ===
Can't use string ("2") as an ARRAY ref while "strict refs" in use at /usr/bin/tl-paper line 112.
=== pdftex ===
Can't use string ("2") as an ARRAY ref while "strict refs" in use at /usr/bin/tl-paper line 112.
=== dvips ===
Can't use string ("2") as an ARRAY ref while "strict refs" in use at /usr/bin/tl-paper line 112.
=== dvipdfmx ===
Can't use string ("2") as an ARRAY ref while "strict refs" in use at /usr/bin/tl-paper line 112.
=== context ===
Can't use string ("2") as an ARRAY ref while "strict refs" in use at /usr/bin/tl-paper line 112.

There is currently no urgency with getting this figured out quickly - texlive-base and all the needed components
work perfectly fine in my chroot environment. It's just very odd, and I'm not sure what is broken on my system.

Kind regards.