Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I just installed TeXstudio 2.5.2 and compiled the following

\documentclass{article}
\begin{document}
\end{document}

but I get this error

Error: Could not start the command: "/usr/texbin/pdflatex" -synctex=1 -interaction=nonstopmode "texstudio_qH5268".tex

I already installed MiKTeX, so why do I get this error?

share|improve this question
    
I'm having this error with TeXLive also. It happens when the editor does not find the bin files. You can do this: go to Options>Configure and insert the whole path for the pdflatex. If you use windows, look for C:\PROGRA~2\MIKTEX~2.9\miktex\bin\pdflatex.exe or something similar. –  Sigur Jan 23 '13 at 18:38
    
Also the discussion here sourceforge.net/p/texstudio/discussion/907839/thread/6363740c –  Sigur Jan 23 '13 at 18:40
    
Hi Sigur, in Options>Configure>Build>Default Compiler I have inserted the path C:\Program Files\MiKTeX 2.9\miktex\bin\x64\pdflatex.exe but still doesn't work. –  user24846 Jan 23 '13 at 18:55
1  
Try to use double quotes and the extension, but not on default compiler, try it on the other field (commands>pdflatex) "C:\....exe" %.tex –  Sigur Jan 23 '13 at 18:58
1  
This works, thanks a lot! –  user24846 Jan 23 '13 at 19:22
add comment

2 Answers

Open TeXstudio and go to the Options menu.

enter image description here

Then Configure TeXstudio. On the left panel choose the second item Commands.

enter image description here

On the pdflatex field, fill it with the full path for your pdflatex.exe. For example, in Windows with MiKTeX, something similar to

C:\Program Files\MiKTeX 2.9\miktex\bin\x64\pdflatex.exe 

Don't forget to use double quotes to it. Then write %.tex to denote the current tex file.

In resume, you'll have something like this (ignoring highlights):

"C:\Program Files\MiKTeX 2.9\miktex\bin\x64\pdflatex.exe" %.tex

You can do the same to other tools, like dvips for example.

share|improve this answer
add comment

I was facing similar problem while migrating to TexStudio for editing the latex files (I previously used WinEdt). The problem got solved when I realized that I have installed MikTex in two separate locations of my workstation. The environment path variables were set correctly too. Solution: I uninstalled all previous version of Miktex and TexStudio; and installled a single version of both in my workstation. It works fine now. The configuration settings in TexStudio is as follows:

enter image description here

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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