On one of my machines, Bibtex is now unable to find any .bib bibliography files, whether the .bib file is in ~/texmf/bibtex/bib/ and or even if I copy it into the local directory. This is a sudden issue, as Bibtex has worked fine on this machine for years; and I have similar setups on other machines and they remain working as usual.

I checked kpsewhich's report for texmf.cnf:

$ kpsewhich texmf.cnf

This contains (as well as other settings), the following lines:

% pBibTeX bibliographies and style files.
BIBINPUTS.pbibtex       = .;$TEXMF/{pbibtex,bibtex}/bib//
BSTINPUTS.pbibtex       = .;$TEXMF/{pbibtex,bibtex}/bst//

Which I believe are the relevant settings for bibtex to look for .bib files in ~/texmf/bibtex/bib/ and the local directory.

So I'm not sure what else to check.

  • 1
    What is the exact error message BibTeX is giving you? – Johannes_B Sep 22 '18 at 6:01
  • @Johannes_B xelatex reports Latexmk: Failed to find one or more bibliography files: 'bibliography_main.bib'. bibtex reports I couldn't open database file bibliography_main.bib. – emacsomancer Sep 22 '18 at 16:07
  • 2
    My guess is the underscore in the filename might be creating havoc. Possibly enclose filename in double quotes "..." – Steven B. Segletes Oct 1 '18 at 17:13
  • 1
    ...though I would add that, with my TeX distribution, I have no problem creating a bibliography using BibTeX when the .bib filename contains underscores. – Steven B. Segletes Oct 1 '18 at 17:59
  • 1
    kpsewhich -var-value=TEXMF etc. will show the value of the variables being used. Also there is a -debug flat you can try to get information about the concrete lookup process. – Andrew Swann Oct 5 '18 at 13:23

Some boring thoughts:

  1. Perhaps your BIB file is read-protected? This was a problem for me some time ago.
  2. Did you change something since the last time when BibTeX worked?
  3. Do you use a fully updated TeX distribution?
  4. Do you work with different drives? (O. k, since .bib files are not working even in local directory this question is a bit useless, but nonetheless a possible error source)
  5. Do you manipulate the BIBINPUTS variable somewhere?
  6. What is the value of $TEXMF?

But I, personally, would bet that @Steven B. Segletes had the right idea and the honour is his.

  • It's odd, because it's essentially identical to the (working) setup on my other machines. BIB file is not read-protected, it's a fully up-to-date Texlive installation via Arch. I've sort of 'fixed' it, by uninstalling Arch's Texlive and installing Texlive via Guix and this works, but it's not entirely satisfying not to understand why the working-for-years Arch packaged Texlive suddenly had this issue. – emacsomancer Oct 9 '18 at 5:50

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.