2

I am trying to compile a file using the terminal and it keeps failing. In the past I was able to compile latex files easily using terminal but it suddenly started failing. The only change I remember now I have recently done is installing some packages in Texmate to work with it when writing Tex documents. However I am unable to find the way to fix it.

Literally, when I run the Makefile i get:

$ make
latex paper.tex
make: latex: No such file or directory
make: *** [dvi] Error 1

Hence, I just tried the commands latex and so and got also errors:

$ latex
-bash: latex: command not found

Than I just wanted to know which version of tex distro I was using, however it seems unable to find it:

$ tex --version
-bash: tex: command not found

I suspect that it is the PATH variable in .bash_profile. However I have tried setting multiple paths... but cannot achieve it! How do I obtain the path where all tex commands are stored? For instance, doing some research, I found the path /usr/texbin, however this does not exist on my computer.

Remarks:

  • I am runing on Mac OS X El Capitan
  • The compilation works with an IDE (texmaker), however I was not satisfied with the result with it (number of citations does not appear, instead I get [?] eventhough I compile it 10 times).

At the moment, the PATH variable in ~/.bash_profile is:

export PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin
export PATH=/usr/local/texlive:$PATH
export PATH=/opt/X11/bin:$PATH
export PATH=~/.scripts:$PATH
export PATH=/usr/bin/latex:$PATH
export PATH=/usr/texbin:$PATH

But it is not enough... any ideas?

1
  • I think there were some changes in El Capitan designed to lock users out of admin privileges (a cynic might presume that the people in charge of that decision have decided that people are too stupid to use/administer to their own computer) and this has affected how and where TeX et al. get installed. There are lots of questions on this site about that. ... As for the [?], that sounds like you are not running the proper sequence of (I'm simplifying here) latex, bibtex (or biber), latex, latex.
    – jon
    May 22 '16 at 18:02
2

Please go to the MacTeX & El Capitan page for information.

Also, you shouldn't set the PATH since it will automatically get set by the installation.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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