Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I installed MacTex on OSX Lion. The pdflatex command only works if I run

sudo pdflatex

whereas running it without sudo results in "command not found." How can I get at pdflatex without admin privileges?

After trying Nifle's suggestions, the problem persists. I actually already had the proper addition to the path,

/usr/local/texlive/2011/bin/universal-darwin/

in my $PATH, but even accessing this directory needed admin privileges.

share|improve this question
    
can you add more information please? Nifle's idea is quite sensible, but there are more things that could be the reason. Can you please post the output for "echo $PATH", and "ls -l /usr/local/texlive/2011/bin/universal-darwin/pdflatex" ? –  Florenz Kley Sep 30 '11 at 13:33
    
oh, and while we're at it :-) you say "accessing this directory needed admin privileges" - could you show a "ls -ld" for the directory chain? Maybe your user is not allowed to read or execute? Add the output of "id", too, please. –  Florenz Kley Sep 30 '11 at 14:11

2 Answers 2

up vote 3 down vote accepted

Sounds like it's not in your path when you are a regular user. That means it's probably not installed in one of the "usual" places.

There are a couple of things you can do to fix this.

First you need to find out where it is installed, type sudo which pdflatex. This should tell you where pdflatex is installed.

What you could try first is to create a link to pdflatex in a place already in your $PATH. You can find out what is in your path by typing echo $PATH, I have chosen /usr/local/bin (as it's usual in the path) in my example below.

cd /usr/local/bin
sudo ln -s /path/to/pdflatex

Another alternative is to put the directory that pdflatex is in into your $PATH. In your .bashrc (found in your home dir) put

PATH=$PATH:/path/to/pdflatex
export PATH

Then to make the changes to .bashrc take effect you have to do source .bashrc

share|improve this answer
    
By the way, in OS X (with MacTeX), pdflatex is in /usr/texbin. I highly doubt it's not in the usual place, as the MacTeX installer does everything automatically. –  slhck Sep 24 '11 at 8:00
    
@slhck - It may be the intended place but I wouldn't say that /usr/texbinis a normal place for an application. At least not in a standard linux install. –  Nifle Sep 24 '11 at 8:05
    
@slhck - To clarify. I would be very annoyed if all applications polluted the /usr/ folder with their own directories. There are better places to put apps installed by users. –  Nifle Sep 24 '11 at 8:09
    
Yes, it's only a symlink. To be precise, it points to /usr/local/texlive/2011/bin/x86_64-darwin, however /usr/texbin would be in the PATH. –  slhck Sep 24 '11 at 8:26
    
The pdflatex binary is at /usr/local/texlive/2011/bin/universal-darwin/pdflatex, and neither method works. I still cannot find the command when I'm not the admin. –  Jeffrey Sep 24 '11 at 17:15

Perhaps your problem is connected to Pref Pane Bug and other Bugs in MacTeX-2011, and Fixes ?

Similarly, the Pref Pane cannot switch between 32 bit binaries and 64 bit binaries. It will appear to do so, but the user's front end cannot find the binaries.

(Not being on the Mac, I can only speak from theory.)

share|improve this answer

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.