Use different texlive installation

Zelphir Kaltstahl zelphirkaltstahl at posteo.de
Thu Mar 26 08:58:54 UTC 2020


On 25.03.20 22:35, lyx-users-request at lists.lyx.org wrote:
> Am Wed, 25 Mar 2020 21:49:45 +0100
> schrieb Zelphir Kaltstahl <zelphirkaltstahl at posteo.de>:
>
>> Hello LyX users!
>>
>> I've searched the mailing list archives and found some instructions on
>> how to change the texlive installation, which LyX uses and added the
>> following to my `.profile`:
>>
>> ~~~~START~~~~
>> ###################
>> # texlive manager #
>> ###################
>> export MY_TEXLIVE_LOCATION="/usr/local/texlive"
>> export PATH="${MY_TEXLIVE_LOCATION}/2019/bin/x86_64-linux:${PATH}"
>>
>> #######
>> # LYX #
>> #######
>>
>> # LYX must know where texlive is installed, otherwise it will have limited
>> functionality. # prepend web2c path
>> export TEXMFCNF="${MY_TEXLIVE_LOCATION}/2019/texmf-dist/web2c" # ":${TEXMFCNF}"
>> # export MANPATH="${MY_TEXLIVE_LOCATION}/2019/texmf-dist/doc/man:${MANPATH}"
>> # export INFOPATH="${MY_TEXLIVE_LOCATION}/2019/texmf-dist/doc/info:${INFOPATH}"
>> ~~~~~END~~~~~
>>
>> And it worked great for a day, I got lots of writing done. Then the next
>> day I restarted my machine and LyX complained about not finding any
>> textclasses and that it would have limitations.
>>
>> Whenever I hit Tools > Reconfigure, I get an error on command line output:
>>
>> ~~~~START~~~~
>> +checking list of textclasses... 
>> Traceback (most recent call last):
>>   File
>> "/gnu/store/an9kb3hqk8368b05g39fz4bzrz18khp7-lyx-2.3.3/lyx2.3/share/lyx2.3/configure.py",
>> line 1897, in <module> ret = checkLatexConfig(lyx_check_config and LATEX != '',
>> bool_docbook) File
>> "/gnu/store/an9kb3hqk8368b05g39fz4bzrz18khp7-lyx-2.3.3/lyx2.3/share/lyx2.3/configure.py",
>> line 1380, in checkLatexConfig retval = processLayoutFile(file, bool_docbook) File
>> "/gnu/store/an9kb3hqk8368b05g39fz4bzrz18khp7-lyx-2.3.3/lyx2.3/share/lyx2.3/configure.py",
>> line 1327, in processLayoutFile classdeclaration = (b'"%s" "%s" "%s" "%s" "%s"'
>> TypeError: %b requires a bytes-like object, or an object that implements __bytes__, not
>> 'str' support/Systemcall.cpp (276): Systemcall: '/usr/local/bin/python -tt
>> "/gnu/store/an9kb3hqk8368b05g39fz4bzrz18khp7-lyx-2.3.3/lyx2.3/share/lyx2.3/configure.py"
>> --with-version-suffix=2.3 --binary-dir="/home/xiaolong/.guix-profile/bin/"' finished
>> with exit code 1 ~~~~~END~~~~~
>>
>> It seems like an implementation bug in the script, expecting another
>> type. I think it could also be Python 2 str VS Python 3 str related.
>>
>> When I go to Tools > TeX Information, the paths all point to my Guix
>> profile, instead of the path I defined in the TEXMFCNF environment
>> variable in my `.profile`. I think that is the reason, why it cannot
>> find much there. I did not install texlive using Guix, but installed it
>> by downloading it and installing every single package of the 2019
>> version using the default installer, which I think in turn uses tlmgr.
>>
>> My PATH variable starts as follows:
>>
>> ~~~~START~~~~
>> /home/xiaolong/.nvm/versions/node/v13.9.0/bin:/usr/local/texlive/2019/bin/x86_64-linux: ...
>> ~~~~~END~~~~~
>>
>> So it is definitely on the path. According to
>> https://tex.stackexchange.com/questions/454513/how-to-specify-the-path-to-texlive-in-lyx/454523#454523
>> that should be sufficient, but obviously it is not. It also does not ask
>> me after a while to restart it or anything, after rescanning in Tools >
>> TeX Information.
>>
>> Here is some more system information:
>>
>> ~~~~START~~~~
>> xiaolong at xlx200:~$ lsb_release -a
>> No LSB modules are available.
>> Distributor ID:	Trisquel
>> Description:	Trisquel GNU/Linux 8.0, Flidas
>> Release:	8.0
>> Codename:	flidas
>>
>> xiaolong at xlx200:~$ which lyx2.3 
>> /home/xiaolong/.guix-profile/bin/lyx2.3
>>
>> xiaolong at xlx200:~$ which python
>> /usr/local/bin/python
>>
>> xiaolong at xlx200:~$ which tlmgr
>> /usr/local/texlive/2019/bin/x86_64-linux/tlmgr
>>
>> xiaolong at xlx200:~$ which latexmk
>> /usr/local/texlive/2019/bin/x86_64-linux/latexmk
>> ~~~~~END~~~~~
>>
>> Here is a complete log of the output on command line, when I run
>> `lyx2.3` (it even says, that it will use a wrong texlive):
>>
>> https://paste.debian.net/1136648/
>>
>> So at some point my LyX did look at the correct path, but not it is not
>> and I need to fix it.
>>
>> What can I do to make LyX pick up the correct texlive installation path?
>>
>> Best regards,
>> Zelphir
> Probably you have to tell Guix about the new path.
> Have you tried to start lyx from the terminal? (That is, after the .profile is loaded)
>
> 	Kornel

Hello Kornel!

How do I tell Guix about the new path?

I might be wrong, but as far as I understand LyX installed through Guix
is just another binary sitting in a different place. How LyX considers
environment variables should be independent from how it is installed,
unless the people maintaining the Guix package changed it. I guess
people, who maintain the Guix package would also be on this mailing list
and might know more about any differences with regard to how LyX makes
use of environment variables.

I ran LyX from terminal to get the output in the paste I linked to. I
simply type `lyx2.3` and enter/return, then the LyX binary (compiled at
the installation with Guix) starts up and looks up stuff, whereupon it
somehow finds the wrong texlive path and does not use my complete
installation of texlive 2019 sitting at another path.

Is there an environment variable I can set, besides TEXMFCNF, which
clearly tells LyX to look elsewhere?

Regards,
Zelphir

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lyx.org/pipermail/lyx-users/attachments/20200326/6174420a/attachment.html>


More information about the lyx-users mailing list