I encountered a problem when trying to run pdfLaTeX using Texmaker: I get

log file not found

for the test "hello world" script.

I tried reinstalling MikTeX and Texmaker, but still get the same problem.

Anybody has any idea?

  • 2
    Welcome to TeX.SX! You can have a look on our starter guide to familiarize yourself further with our format. Did you restart PC to take the Path of miktex bin into effect after MiKTeX installation ?. Verify on command line window by typing pdflatex sample2e to get a sample2e.pdf document to ensure TeX distribution installed properly. BTW Are you using latest version TeXmaker. Save the filename as filename.tex with .tex extension Jun 4 '13 at 16:02
  • 1
    I encounter the same problem today. It worked fine a few days ago. Suddenly it did not work anymore. When I typed pdflatex sample2e on the command line window, it says pdflatex is not recognized as an internal or external command, operable program or batch file.
    – user32229
    Jun 14 '13 at 3:36
  • You should try to run TeXmaker as administrator. Does that solve your problem?
    – Werner
    Jul 8 '13 at 18:50
  • I have this problem, and can confirm that running TeXmaker (v 3.2 on Ubuntu 12.04) as root does not fix it. Several "log file not found" dialogs pop up, and then the PDF is successfully generated. What causes them?
    – Ian
    Aug 4 '13 at 20:55
  • Did you installed TeX distribution correctly? TeXmaker is just a plain text editor, and it will not work without TeX distribution.
    – Ch'en Meng
    Dec 3 '13 at 14:28

13 Answers 13


I have "log file not found" errors, but the PDF is successfully generated.

This appears to be caused by the -output-directory=/tmp option in my configuration for the latex executable. Texmaker looks for the logfile in the same directory as your source file.

I was able to solve this by creating an empty file in the same directory as my .tex file.

For example, if your file is called myfile.tex, create an empty file in that same directory called myfile.log. It suppresses the error.

You can also ln -s /tmp/myfile.log ./ in your project directory, which suppresses the error and shows you the error log if you make when you make errors.

I am using Texmaker v3.2 on Ubuntu 12.04.


Texmaker -> Options/Configure Texmaker/Commands/LaTeX...

click on the folder icon and find this file:

C:/Program Files/MiKTeX 2.9/miktex/bin/x64/latex.exe

Texmaker -> Options/Configure Texmaker/Commands/PdfLaTeX...


C:/Program Files/MiKTeX 2.9/miktex/bin/x64/pdflatex.exe 
  • 1
    You're a hero to me
    – galois
    Dec 24 '15 at 3:48
  • As a newbie to LaTeX, I had just installed Texmaker on Windows 10 and not MikTeX. Installing MikTeX solved the log file not found Sep 30 '16 at 21:21

I solved the problem in one hour by uninstalling MikTex and Texmaker and reinstalling it again ... (after many hours struggling to solve the problem...)


I already posted this in the comments, but it seems to be a common problem. As @texenthusiast mentions, you want to make sure that you can use pdflatex (or whatever LaTeX compiler you want to use) from command line. The following is for Windows:

First, test it out. Press Windows-Key+R (for Run). Then, type cmd to open Windows' command line terminal. Now type pdflatex. If you, like some people in the comments, encounter command not found, below is a way to fix this. If this is not your problem, the following won't help you (press CTRL+C to exit the program).

  1. Make sure, you have MiKTex (or some other TeX or LaTeX distribution) installed.
  2. Make sure that it's binary folder is added to the Windows PATH. To do that, follow these instructions on how to edit your PATH system variable. It is a semicolon-separated list of folders from where it will look-up any executable file that you try to use (such as pdflatex). Add your MiKTex bin folder to it. For me, that is: c:\Program Files\MiKTeX 2.9\miktex\bin\x64\.
  3. The PATH variable (for some retarded reason) has a max length of 1000 characters or so. If you, like me, tend to exceed that limit, you might want to take a look at this SO discussion on the matter.
  4. Always restart your editor (or command line terminal) after changing system variables (they get loaded when a program starts).

Good luck!


I was using LaTeX on ubuntu initially. It was running nicely but after installation of Mint I found this error and solved by installing TeX Live for linux platform from www.tug.org/texlive. TeX Live works as platform for TeXMaker.


I had the same problem, but it was solved like this:

In Options->Commands, I didn't use the complete paths, just the names of the commands for latex, pdflatex and xelatex.

I.e. I typed latex -interaction=nonstopmode %.tex and not C:\MikTex\miktex\bin\latex -interaction=nonstopmode %.tex

Before trying this, open command prompt and make sure these commands exist.

I am using Windows XP in an old machine (2007), but the latest versions of MiKTEX and texmaker.

I don't know if this works for you, but you could try...


I solved this problem in latex version of Texmaker by putting a ".tex" extension on the filename, which texmaker doesn't seem to do automatically with "Save As."

So I had "document.v2" as a filename and it gave me this same error, but "document.v2.tex" resolved it.


I was able to resolve this error on Ubuntu 14.04 with TexMaker 4.1 by going to Options -> Settings File -> Reset Settings.

I figured there was a configuration file somewhere that was still linking to the old path after I deleted all the files except the .tex file in my project folder.


In my case, the problem was a double space in the name of the tex file. Replacing it with single space solved the problem completely.


On Windows, there seems to be an issue when the path variable contains a space character.

The defaults in Options -> Configure TexMaker -> Commands were:

  • latex -interaction=nonstopmode %.tex and
  • pdflatex -synctex=1 -interaction=nonstopmode %.tex

This should work because both binaries (latex and pdflatex) are in the PATH environment variable (pdflatex can be run from cmd without the full path). However, and this is my best guess, it seems that Texmaker does not escape the paths properly and having a space in the path does not work. To work around this, you should provide the full commands in the settings, escaping them properly:

  • "C:\Users\YOUR_USERNAME\AppData\Local\Programs\MiKTeX 2.9\miktex\bin\latex.exe" -interaction=nonstopmode %.tex
  • "C:\Users\YOUR_USERNAME\AppData\Local\Programs\MiKTeX 2.9\miktex\bin\pdflatex.exe" -synctex=1 -interaction=nonstopmode %.tex

These paths might differ for you, but at the very least, YOUR_USERNAME must be replaced of course. The main thing is that there is a space, namely in the MiKTeX 2.9 part, making it necessary that there are quotes (") around the path to the binary.

On top of this, we created the .log file manually in the folder. I am not sure if this is necessary after fixing the aforementioned configuration issue.


In my case, the problem was due to the fact that I checked "use build directory" box. This directory did not exist. When I unchecked the box, it all went fine.


I had the same issues and I was able to get it to work as follows. Go to the following menu:

texmaker -> Preferences 

In the commands window I unchecked... 'Use a "build" subdirectory for output files". Things started to work after that.


Options -> Manage Setting File -> Rest Settings

I use Mac and got the same issue in TexMaker "Log File not Found". It was solved by just clicking "Reset Settings"

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