Take the 2-minute tour ×

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?

share|improve this question
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 –  texenthusiast Jun 4 '13 at 16:02
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

7 Answers 7

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...

share|improve this answer

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.

share|improve this answer
Welcome to TeX.SX! –  Heiko Oberdiek May 3 at 5:15

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.

share|improve this answer

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!

share|improve this answer

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

share|improve this answer

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 
share|improve this answer

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.

share|improve this answer
Have a look at solutions to common problems based on TeXmaker errors Unable to compile TeXmaker 4.0.2 with MiKTeX 2.9 –  texenthusiast Aug 4 '13 at 22:05
Thanks @texenthusiast but these don't apply to me. I'm not on Windows, and my latex installation does indeed work -- my PDFs were successfully generated (I just had to click through some annoying messageboxes). I've updated my answer with this info. –  Ian Aug 5 '13 at 12:45
BTW Just for info: Latest version of TeXmaker is 4.0.3 –  texenthusiast Aug 5 '13 at 14:03
Are you using that on Ubuntu? –  Ian Aug 5 '13 at 14:51
Yes, I downloaded from here xm1math.net/texmaker/download.html#linux. Those errors from TeXmaker are relevant for any OS and some are specific to OS also. It's a mix. –  texenthusiast Aug 5 '13 at 15:00

Your Answer


