Search:   Help



LyX documentation


Shared groups


LyX /


<< | Page list | >>

Troubleshooting your LyX installation

This page is intended for gathering tips about how you can troubleshoot your LyX installation, as well as Problems/Solutions for common troubles.

Lyx has been closed because of an unexpected situation ...

  1. Unable to find textclass file (Windows)

LyX does not start and gives the error message: unable to find textclass file

This problem may come into existence if you use LyX on a windows-pc where your windows/application profile is not stored local but on an UNC path (i.e. \\Username\Applications\LyX). One solution I have found is the following:

  1. Uninstall LyX from your PC if you have used an installation folder whose name exists of seperate words like C:\Program Files.
  2. Reinstall LyX and consider, that you use a folder whose name exists of just one word like C:\Lyx15
  3. Start the Command Prompt in windows (Start -> All Programs -> Accessories -> Command Prompt)
  4. Change directory to C:\ (type c:)
  5. Type "c:/lyx15/python/python.exe c:/lyx15/resources/" in the Command Prompt and press "return"
  6. After the configuration has been finished you will find 4 files in the directory c:\ -> configure.log, lyxrc.defaults, textclass.lst and packages.lst
  7. Cut these 4 files and paste them into the \\Username\Application Data\LyX folder. If a directory for Lyx does not exist create a new one.
  8. Start Lyx

The problem can arise even if you do not use a UNC path for the windows profile. In this case steps 5-8 are sufficient and can be carried out using the default Program Files location.

Installation Problems

Problems with Fonts in Math Environment

Possible causes:

  1. Latex TTF fonts not available (QT frontend)
  2. Bug in QT
  3. Collision with antialiasing (QT)
  4. No textclass found when launching Lyx (Windows)

Latex TTF fonts not available (QT frontend), new method

Install the latex-xft-fonts package



Check your X server version and do the following:

X server version:

copy all fonts to $HOME/.fonts/ (untar it) and run fc-cache -fv
(as root or with su):
cd directory-where-your-TT-fonts-are
ttmkfdir -o fonts.scale
(as normal user)
xset fp rehash

Debian (Debian users can install the package latex-xft-fonts from testing)

When using Lyx-1.3.x with Qt3.2 currently (2003-09-08) a patch has to be applied, see this mail [1].

With Debian unstable, using Qt 3.2.1 (2003-10-29) no patch is needed. dpkg-reconfigure fontconfig and dpkg-reconfigure tetex-extra solved the problem for me.

It did not work for me, however upgrading to lyx 1.3.3 in the experimental section helped. Add experimental to /etc/apt/sources.list and try

Still not working? Try older method (below) or other causes:

Latex TTF fonts not available (QT frontend), old method

If you're using Qt, and you want math mode symbols to show up properly (instead of red ERT text), you have to install Qt-compatible fonts. Read the INSTALL file and follow this procedure :

 1. ldd lyx | grep fontconfig
 2. If the above shows nothing, you do not need to do anything
 3. Install latex-ttf-fonts from the RPM (and you're done) or the tarball
    into /usr/share/fonts/latex-ttf-fonts
 4. Run (as root, thought it may work even if not), fc-cache -fv
    Check that the /usr/share/fonts/latex-ttf-fonts dir was spotted.
 5. Restart LyX. Ta-da !

The problem is that fontconfig-based Qt versions cannot see the normal X fonts. Note that the package is for non-commercial use only :(

There's a new latex-xft-fonts package that is freely distributable. This should be available soon (in fact you can get it now).

Still not working? Check other possible causes:

Bug in QT

Some versions of QT do not handle font properly. Known issues:


Affected QT versions: all

QT does not find latex-xft fonts if your locale is set to certain values such as ru_RU. You have a choise between correct math fonts or your locale setting. For example, type export LC_ALL=en; lyx in your terminal.

Still not working? Check other possible causes:

Collision with antialiasing

If you want both anti-aliasing and math fonts, you need lyx 1.3.3.

If you do not want (or can't) upgrade, run qtconfig, go to the font tab, and disable the "Enable Anti-aliased fonts" button (you can also do it using kcontrol).

"No textclass found"!!

This error often appears on windows running systems When launching Lyx, you've got the error: "no textclasses found"? The way to resolve this problem isthe following:

1/search in your computer the file called textclass.lst (for windows, usually in one of the following directories: lyx\resources\lyx, lyx\bin, user settings\lyx)

2/delete it

3/go to your miktex settings options and check if your are able to download a package. Check the proxy options, your firewall and so on)

4/when you have succeeded to download something, then relaunch lyx and ...wait. It cn be a bit long because lyx is asking to miktex to download some missing packages.


6/This workaround doesn't appear to work anymore on windows for lyx 1.5.1-1. Now I just get an error no textclasses found! and it crashes. Possible solution: delete in the \documents and Settings\application folder the Lyx folder and the miketex folder (own risk!).

Possible solution 2:I installed lyx1.5.2 parallel with lyx1.4.3 & got above error in 1.5.2 while 1.4.3 worked fine. I then copied textclass.lst from C:\Documents and Settings\Name_or_All Users\Application Data\lyx1.4.x to C:\Documents and Settings\Name_or_All Users\Application Data\lyx15 Everything then worked fine in lyx 1.5.2

Possible solution 3: I entered the "MikTeX Console", checked for updates and updated all the packges. This solved my problem.

Metafont problems

The following error message from Metafont...

METAFONT failed for some reason
makepk: METAFONT failed on "cmex10".

...can be resolved by rebuilding the formats:

initexmf --dump

General tips

  • You can start LyX with the argument -dbg <debug-flag> to produce debugging output, e.g. lyx -dbg graphics makes LyX show you the details of graphics conversions etc. To see a list of possible debugging flags, just execute:
localhost:~>lyx -dbg
List of supported debug flags:
      0      none  No debugging message
      1      info  General information
      2      init  Program initialisation
      4       key  Keyboard events handling
      8       gui  GUI handling
     16    parser  Lyxlex grammer parser
     32     lyxrc  Configuration files reading
     64     kbmap  Custom keyboard definition
    128     latex  LaTeX generation/execution
    256    mathed  Math editor
    512      font  Font handling
   1024    tclass  Textclass files reading
   2048     lyxvc  Version control
   4096 lyxserver  External control interface
   8192      roff  Keep *roff temporary files
  16384    action  User commands
  32768    lyxlex  The LyX Lexxer
  65536    depend  Dependency information
 131072    insets  LyX Insets
 262144     files  Files used by LyX
 524288  workarea  Workarea events
1048576 insettext  Insettext/tabular messages
2097152  graphics  Graphics conversion and loading
4194303       any  All debugging messages


Edit - History - Print - Recent Changes - All Recent Changes - Search
Page last modified on 2020-10-21 06:33 UTC