My university decided to not give admin privileges automatically. So I thought I will try installing it in user mode on the university provided Mac (Mojave). I installed TexLive 2019 (option -gui -text) with two changes: root directory is ~/texlive and TEXMFHOME is ~/texmf. I left TEXMFVAR and TEXMFCONFIG in ~/Library/texlive default. I also added the appropriate line to .bashrc (sourced from .bash-profile) to fix up the path.

Now when I try to tex a file I get the following error message: =>> lstat(./pdftex) failed: ./pdftex: No such file or directory =>> kpathsea: Can't get directory of program name: ./pdftex Path is set correctly: texlua --help produces the expected output

The error message makes sense to me only if kpathsea thinks that it has successfully cd'ed to the directory containing the binary of the program being invoked, but it has not. That means that it is a simple permissions issue. All directories involved show "drwxr-xr-x" and no "+" or "@" at the end. That is the extent of my knowledge of permissions. So I can't figure out what is going on.

Addendum: Following a suggestion elsewhere I tried a portable installation. It has the same problem. I have also tried putting texmf-var and texmf-config in a directory in home, rather than in ~/Library. This also makes no difference. I tried creating symlinks to ~/bin etc, and put ~/bin in the path. No dice.

Finally, "which" will not show the commands in directories I add to path. So texlua --help produces the expected output, but which texlua does nothing.

  • exactly how are you running pdftex? From an editor or from the command line (terminal)? Try the latter, you might not have set the PATHs such that an editor can use them – daleif May 6 at 12:14
  • I am running pdftex from Terminal (bash). I am sure that I have the PATH set right: otherwise, I would not expect texlua to run, nor would I expect the error message to come from kpathsea. [If the path is not set right, shouldn't the error message be "command not found"?] – Nath Rao May 7 at 22:28
  • Might be because texlua does not read the same config as the rest. I would not have split things up like this. I would run the text based installer, change only texdir, letting the installer adjust it self, and install there. – daleif May 8 at 5:14
  • Well, in my first attempt, I left TEXMFCONFIG in its default location (~/Library/texlive/...) In every one of my attempts, texmf.cnf had the expected entries. [According to comments in it, it all depends on SELFAUTOLOC being set up. It looks like that is supposed to be set up on the fly, but that is not happening.] – Nath Rao May 9 at 12:10
  • Normally when you install TeLive by hand, it has a single root (on Linux I have it in /opt/texlive/year/), then all configurations sits below this single root, and self auto works. When you spread it out like this, then you really need to know that texmf.cnf is configured correctly. – daleif May 9 at 12:30

Your Answer

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

Browse other questions tagged or ask your own question.