# Package not found by TeXstudio after update on Mac

I have just updated to the latest TeXstudio version 2.12.18 on Mac Catalina. Prior to doing so my file was running just fine. Now when I open my TeX file inside TeXstudio majority of \usepackage{} commands are recognised, however some packages are underlined and when hovered over say "Package 'not found'" - specifically xcolor and parskip. When I try to run the file, it stops with the error

File xcolor.sty' not found. ^^M

I have updated TeX Live to the 2019 version, updated all TeX Live packages to latest versions (the package list actually shows the said 'missing' packages as installed). I also went to TeXstudio preferences and linked the path in "Build Options" to point to TeX Live 2019 folder (/usr/local/texlive/2019/bin/x86_64-darwin). Previously it had 2012, so I updated the path to 2019 just now.

I do not have MiKTeX installed (therefore I expect that TeXstudio should automatically be detected by TeX Live). Checking from terminal: tex --version provides output: TeX 3.14159265 (TeX Live 2019).

Not sure why the packages are showing as missing. I can see online help support, explaining why package is highlighted as missing: https://sourceforge.net/p/texstudio/wiki/Frequently%20Asked%20Questions/#texlive but not resolution on what I can do for TeXstudio to find it. The link states that "We determine the tex file database using kpsewhich --show-path ls-R and parse its content." I have run that command in terminal and path for me is: /Library/TinyTeX/texmf-var. I don't really understand if that is the correct pointed location. I would have thought it should point to TeX Live where all my packages are?

I provide an example of the code below which runs, but if you uncomment any of the 2 lines, it will not run:

\documentclass{article}
\usepackage{hyperref}
\usepackage{ifthen} % Required for ifthenelse statements
\usepackage{array} % Required for boldface (\bf and \bfseries) tabular columns
% \usepackage[dvipsnames]{xcolor}
% \usepackage[parfill]{parskip} % Remove paragraph indentation

\begin{document}
First document. This is a simple example, with no
extra parameters or packages included.
\end{document}


Could someone please shed some light as to how I can run my code?

• your document will run in an up to date installation, if you are getting an error that xcolor is not found then presumably you do nt have it installed and tlmgr install xcolor (or sudo tlmgr install xcolor) should install it. – David Carlisle Jan 10 at 1:13
• before checking if it works from texstudio, does it work if you simply type pdflatex yourfilename.tex in a terminal after changing directory to the folder with the file? – David Carlisle Jan 10 at 1:15
• Thank you very much, RESOLVED. Firstly thank you so much for your help. I tried to run the sudo command first, and was told to update tlmgr, so I ran: tlmgr update --self. Following this I ran the sudo commands on both packages and now the tex file runs! Could you please explain where the packages where installed to? I do not understand why and where they were 'missing' from, if the Tex Live was showing them as installed? I read that TexStudio automatically detects Tex Live and thus I expected for it to find all installed packages there. Also everything was ok until update, so why? – Katya Jan 10 at 1:51
• I have now moved onto editing my paper and the following missing package 'mathpazo' is not resolved using your suggestion unfortunately. When I try to install with the commands, the message I get back is that it is already installed. But when I run the file I get the following error: File mathpazo.sty' not found. \RequirePackage. I would also really like for these packages to be installed automatically. Equally the TexStudio still underlines them as missing (even the ones that were now working - I know this can happen but would be nice to resolve in a centralised manner). Any suggestions pls? – Katya Jan 10 at 3:30
• Why are you using TinyTeX? then you have to install a lot by hand. Why not just installing MacTeX, that is the fastest way to install the full texlive on a MacTeX (granted it has to be updated after installation). – daleif Jan 10 at 9:27