I recently updated my tex distribution on mac to try and get use of a font in texlive-extra (I used macports). However, this didn't work and led to errors. As a result I decided to do a clean install following the instructions here: http://www.tug.org/mactex/uninstalling.html moving usr/local/texlive and usr/local/texmf to trash, along with the GUI applications.
When I did a clean install from mactex here: http://www.tug.org/mactex/index.html all seemed to go fine, but when I try and compile using a makefile that was fine before I get the result:
LaTeX Error: File `book.cls' not found.
(same for articles, reports, etc.)
If I run macports with
sudo port install texlive texlive-latex-extra
I get the result:
---> Computing dependencies for texlive
---> Cleaning texlive
---> Computing dependencies for texlive-latex-extra
---> Cleaning texlive-latex-extra
---> Scanning binaries for linking errors
---> No broken files found.
And nothing happens.
If someone could help me out with fixing this, or the correct way to do a clean install I would be grateful.
I came across a similar issue here: article.cls not found after last update but it was closed without a clear answer.
Thanks
which pdflatexreturn? What doeskpsewhich article.clssay? – daleif Sep 13 '17 at 08:35sudo texhash? To rebuild the filename database – daleif Sep 13 '17 at 08:45But when I try to compile as I normally would I still get File `article.cls' not found.
– FluidFox Sep 13 '17 at 08:49warning: kpathsea: configuration file texmf.cnf not found in these directories: /opt/local/etc/texmf.If that indicates anything further. Compilation now works and generates a pdf file, but all of my citations (using natbib) throw errors and appear as ? in the pdf so its still not fixed yet. – FluidFox Sep 13 '17 at 10:04texmf.cnffile located atusr/local/texlive/2017/and copied it toopt/local/etc/texmf/and no longer get the kpathsea error. The error with natbib is still there however. – FluidFox Sep 13 '17 at 10:15/usr/local/texlive/2017/, so things refering to/opt/local/etc/texmf/might be completely wrong. What doesecho $PATHsay in a terminal – daleif Sep 13 '17 at 10:18/opt/local/bin:/opt/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/Library/TeX/texbin– FluidFox Sep 13 '17 at 10:18which pdflatex? – daleif Sep 13 '17 at 10:19/Library/TeX/texbin/pdflatex– FluidFox Sep 13 '17 at 10:19which kpsewhich? – daleif Sep 13 '17 at 10:20/opt/local/bin/kpsewhich– FluidFox Sep 13 '17 at 10:20ls -l /Library/TeX/texbin– daleif Sep 13 '17 at 10:20ls: /Library/TeX/texbin: No such file or directory– FluidFox Sep 13 '17 at 10:21texlive/2017/...– daleif Sep 13 '17 at 10:21sudo port uninstall texlive texlive-latex-extrabefore reinstalling MacTeX – FluidFox Sep 13 '17 at 10:23which kpsewhichstill returns/opt/local/bin/kpsewhichthen you're in trouble. What's the output ofls -l /opt/local/bin/kpsewhich? – egreg Sep 13 '17 at 10:25port installed: – FluidFox Sep 13 '17 at 10:25texlive-basic @44435_0+doc (active) texlive-bin @2017_1+x11 (active) texlive-bin-extra @44432_0+doc (active) texlive-common @2017.1_0 (active) texlive-context @44436_0+doc (active) texlive-fonts-extra @44409_0+doc (active) texlive-fonts-recommended @42428_0+doc (active) texlive-fontutils @44166_0+doc (active) texlive-lang-czechslovak @44347_0+doc (active)Plus more
– FluidFox Sep 13 '17 at 10:26ls -l /Library/TeX/texbinI now getlrwxr-xr-x 1 root wheel 29 13 Sep 11:02 /Library/TeX/texbin -> Distributions/Programs/texbin– FluidFox Sep 13 '17 at 10:27lrwxr-xr-x 1 root admin 45 20 Jun 08:46 /opt/local/bin/kpsewhich -> /opt/local/libexec/texlive/binaries/kpsewhichforls -l /opt/local/bin/kpsewhich– FluidFox Sep 13 '17 at 10:28sudo port uninstall 'texlive*'is called for here. Also, remove anything tex-related that you installed under/opt/localby hand. – Harald Hanche-Olsen Sep 13 '17 at 10:41sudo port uninstall 'texlive*'I get the following warning:The following ports will break: pdfjam @2.08_0– FluidFox Sep 13 '17 at 10:43pdfjam, something you use? – daleif Sep 13 '17 at 10:47sudo port uninstall --force 'texlive*'. As soon as you have a working MacTeX installed,pdfjamwill likely work again. – Harald Hanche-Olsen Sep 13 '17 at 10:48latexmk,latexdiff,detex, andghostscriptlisted under macports installed. Should these go too? Having proceeded with removing all the texlive items in macports and anything I placed manually in /opt/local/etc/ I can compile and produce pdfs, but still have issues with natbib. Should I try reinstalling MacTeX at this point? – FluidFox Sep 13 '17 at 10:49port dependents pdfjam. – Harald Hanche-Olsen Sep 13 '17 at 10:52latexmk,latexdiff,detex, andghostscript? and try to install MacTeX again? – FluidFox Sep 13 '17 at 10:53pdfpagespackage, so it only needs latex to be installed – daleif Sep 13 '17 at 10:55latexmk,latexdiff,detex, andghostscript? I will then run the install package from MacTeX again and see what happens. – FluidFox Sep 13 '17 at 10:59which pdflatexorls -l /Library/TeX/texbin)? – FluidFox Sep 13 '17 at 11:05