# TexStudio `Error: Could not start the command: pdflatex -synctex=1 -interaction=nonstopmode “file_name”.tex`

I just start to use texstudio, seems better than texmaker, however while compilation it gives following error:

``````Error: Could not start the command: pdflatex -synctex=1 -interaction=nonstopmode "file_name".tex
``````

does anyone knows how to solve this? or why does it happen? Thanks.

Ubuntu 12.04 32 bit

Here is the texstudio version in case that I installed wrong one:

TeXstudio 2.7.0 (hg 4323:cf7f5964517f) Using Qt Version 4.8.1, compiled with Qt 4.8.2 R

-
do you have tex installed? (texstudio is only an editor) –  David Carlisle May 27 '14 at 21:21
yes I was using texmaker without any problem. I can compile the file through terminal (Im just trying to compile a file that I already did with texmaker) thus it should have compile it perfectly unless something missing –  jackaraz May 28 '14 at 13:23
Try to specify the path to pdflatex explicitly at Options -> Commands. Depending on how the PATH variable is configured on your os and on how you start TXS it might not receive the information where pdflatex is located (console and UI applications may have different settings for this). –  Tim Hoffmann May 28 '14 at 18:14
I have reinstalled the tex because it was broken as I understand, I tried everything. Now the problem have been fixed but it asks for new packages (I installed all tex took 5 hours) such as `Error: File `beamer.cls' not found` or `Error: File `appendix.sty' not found` thus how can I install all such files in order to not have any problems again? Thanks. –  jackaraz May 30 '14 at 15:56
now im trying `./install-tl --gui=perltk` its installing some more files. Is there any think that I should do additionally? –  jackaraz May 30 '14 at 16:35

As advised above I checked the tex directory which was broken due to some changes I made in my computer. Thus I install it again by using the codes provided in texlive website which lead me to a partial installation, so it gave different errors. I install the full texlive package by using

``````   `sudo apt-get install texlive-full`
``````

If you are facing with very same problem do not forget to remove the texlive directory before installation which is in `/usr/local/texlive/2013/`. Thanks.

-

As root, take the LaTeX full name:

``````\$ which latex
/opt/texbin/latex
``````

( LaTex is Ok!)

Start TexStudio and select: Options > Configure > Make

Now modify the 2^ line including path `/opt/texbin/`:

``````(PdfLaTex)  /opt/texbin/pdflatex -synctex=1 -interaction=nonstopmode %.tex
``````

Done!

(Should work in TeXStudio 2.8.2.)

-
Welcome to TeX.SX! You can have a look at our starter guide to familiarize yourself further with our format. –  Jubobs Aug 9 '14 at 22:15