I have recently installed latest TeX Live 2020. Post installation, I have added the PATH of texlive installation /usr/local/texlive/2020/bin/x86_64-linux to ~/.bashrc and /etc/environment. Now, if I start Kile from terminal it compiles any document using the installed Tex Live 2020 binaries. Infact it can locate all the binaries. No error.

The problem starts when I run Kile from graphical menu or launcher icon. It just cannot find the LaTeX binaries anymore. Compiling a document gives an error: <some-package>.sty not found. Why does this happen?

P.S. There are lots of question asked on here, related to this particular topic. I have gone through almost all of the solutions (most of them talk about setting the correct PATH). I have done that. Rebooted the sytem too.

So I am raising this question (again!) with a hope for a fresh solution.

  • 1
    If Kile can start some LaTeX process that then doesn't find any packages (whereas a process started from the console can find all packages) that suggests you have a second TeX system on your machine that is found by Kile. I presume Kile has some configuration window to change its PATH settings. But see also sourceforge.net/p/kile/discussion/292014/thread/c1aa4881. What does which -a pdflatex give on your machine? Does it list more than just the pdfLaTeX in /usr/local/texlive/2020/bin/x86_64-linux?
    – moewe
    May 10 '20 at 5:55
  • @moewe which -a pdflatex lists more than one pdfLaTex, the other one being in /usr/bin. The issue is I can't remove the second TeX system as it removes Kile too. Also, the Kile doesn't have any configuration window where we can add the PATH. I could find two ways in which KILE GUI can start LaTex process: add /usr/local/texlive/2020/bin/x86_64-linux to each TeX command in Kile GUI (see this ubuntuforums.org/archive/index.php/t-141934.html). The second way is to add PATH to /etc/login.defs (see github.com/latexdraw/latexdraw/issues/27#issuecomment-623427572).
    – Tanvir
    May 10 '20 at 10:32
  • Ah, yes Kile has a dependency on TeX live. You can install a fake TeX live package when you have a "vanilla" version from TUG in order to satisfy the dependencies. (See the fake packages section in tex.stackexchange.com/q/1092/35864.) If you found the solution, please write it down in the answer section below so other people can find it and benefit from it as well.
    – moewe
    May 10 '20 at 10:35
  • I will post the above comment as answer. Thanks.
    – Tanvir
    May 10 '20 at 10:37

For now I could solve the issue where Kile can find the Tex Live 2020 binaries (manually installed) when it is run from graphical menu or launcher icon. I am listing the two solutions I found (links are provided below):

  1. Open Settings --> Configure Kile window. Click on the menu Build. It will list all of the known TeX tools. For example, select LaTeX. Go to the General tab and add the texlive binaries PATH in command field to include /latex, which will then look like this: /usr/local/texlive/2020/bin/x86_64-linux/latex

The above steps are repeated for each of the TeX tools we use frequently.

Once all are done run Settings --> System Check to see if Kile executes the LaTeX processes from the PATH assigned.

(Step 1 is explained in detail here).

  1. The second solution is to edit the file /etc/login.defs:
ENV_SUPATH  PATH=/usr/local/texlive/2020/bin/x86_64-linux:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
ENV_PATH  PATH=/usr/local/texlive/2020/bin/x86_64-linux:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games

This solution was suggested to me here on raising a similar question for a TeX software (LaTexDraw). It too had similar issue like Kile.

I find Step 2 to work with any of TeX software (atleast for the two I have) where on starting it from graphical menu or launcher icon, it can locate all the latest LaTeX binaries.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.