Lyx doesn't work (can't find cls files)
Solution 1
I know it's an old question, but I just experienced the same problem myself on a fairly recent Mint 17.2 installation.
I used apt-file search article.cls
to see which packages have that file - and confirmed that it's present in the texlive-*
series of packages. I then did apt-get install texlive
- which pulled a few dependencies with it - and the problem was solved.
Solution 2
If you only installed the Lyx Processor and Tex-live then you need to extend the functionality of LyX by installing the listed packages (in bold) for full functionality. They are all available in the Ubuntu Software Center.
Those that are NOT in bold are optional (i think they are self explanatory anyway). When i installed these, all my document classes became available.
For additional document classes (subclasses) and other how tos you can visit the Lyx Wiki here
chktex: check for typographical errors
dvipost: display tracked changes in DVI format output
gnuhtml2latex: import HTML documents
groff: improved table formatting in plain text exports
librsvg2-bin, inkscape: use the SVG image format in LyX documents (if your using Inkscape as your graphics editor inr Lyx)
linuxdoc-tools: export SGML LinuxDoc documents
mythes-*: use the OpenOffice.org/LibreOffice Thesaurus
noweb: import noweb files
rcs: integrated version control
sgmltools-lite: export SGML DocBook documents
texlive-xetex, etoolbox: use the XeTeX typesetting system
wv: import MS Word documents
Solution 3
My new LyX installation showed exactly the same symptoms as the original poster's. I found that there was an old .texmf-var
directory in my home directory. Renaming or deleting it, e.g. mv .texmf-var .texmf-var.old
solved the problem. After that, LyX no longer complains about missing .cls files and compiles documents just fine.
I'm using Ubuntu 12.04, LyX 2.0.7 from https://launchpad.net/~lyx-devel/+archive/release
and TeX Live 2012 from https://launchpad.net/~texlive-backports/+archive/ppa
.
Related videos on Youtube
Znorg
Updated on September 18, 2022Comments
-
Znorg almost 2 years
I installed Lyx in my system, but it I just can't make it work. Every time I open any file, I get a message similar to this one:
The selected document class article requires external files that are not available. The document class can still be used, but the document cannot be compiled until the following prerequisites are installed: article.cls See section 3.1.2.2 (Class Availability) of the User's Guide for more information.
I'm not sure if the problem is with Lyx itself or some of its Latex dependencies.
I do have the "article.cls" file in my system (from texlive-latex-base) located in:
/usr/share/texlive/texmf-dist/tex/latex/base/article.cls
(This line shows up in Tools → TeX Information, so apparently Lyx knows about it).
I have already tried reinstalling texlive and using Tools → Reconfigure, didn't work.
I'm using LyX 2.0.5.1 in KUbuntu 12.10.
EDIT: Apparently this is a bug in 12.10. I just reverted to 12.04 and everything is working smoothly again, with no setup needed beyond
apt-get install lyx
.-
Admin over 11 yearsPlease follow the advice in the LyX-Wiki. What happens after the reconfigure-step?
-
Admin over 11 yearsI have tried those steps already (including running texhash). After reconfigure I just get a message saying that the system was reconfigured and that I must restart Lyx, but nothing changes. I'm actually just about to wipe out my entire system and reinstall ubuntu from scratch, if nothing else works.
-
Admin over 10 yearsChange the operating system version? That answer is unacceptable. Does anyone have a real solution to this problem?
-
Admin about 10 years@Nick I can't help, but I confirm that I've been using LyX without problem for the last few versions (and the beta) of (K)ubuntu without problems. So it's definitely possible.
-
Admin almost 10 yearsHere too, deleting the folder .texmf-var solved the problem.
-
Admin over 9 years
sudo apt-get install texlive
, then Lynx reconfigure did it for me. before that,/usr/share/texlive/texmf-dist/tex/latex/base/article.cls
was missing.
-
-
Znorg over 11 yearsI just installed all of these, but I still get the same error.
-
stephenmyall over 11 yearsAs I have no issues, I am trying to figure out what makes your installation different from mine. I have installed Lyx on many computers with no issues. Did you install it from the USC or from some other source maybe?
-
stephenmyall over 11 yearsI just came across this question which might be of interest to you. askubuntu.com/review/close/84121
-
Znorg over 11 yearsYeah, looks like it is a bug in 12.10. Thanks for your help.
-
gaborous over 6 yearsThis issue still happens with LyX 2.2.3 on Windows Seven, also it used to work perfectly fine on my machine, it just happens now after updating (both LyX and MikTeX).
-
kotozna almost 5 yearsCan confirm this solved my problem on 18.04 (the package needed was texlive-publishers).