bibtool icon indicating copy to clipboard operation
bibtool copied to clipboard

file not found, always

Open vw-anna opened this issue 2 years ago • 7 comments

Just installed Bibtool version 2.67 via my package manager. So far any bibtool command gives me the same error

$ bibtool references.bib
*** BibTool WARNING: File references.bib not found.

Did I do something wrong in during the installation maybe ? I just ran sudo apt install bibtool in Ubuntu 20.04 LTS.

vw-anna avatar Mar 27 '22 15:03 vw-anna

You can use bibtool -h and check the line "Library path" to see where the bib files are sought. I guess that you just havn't put the bib file is a proper place or that you are in the wrong directory when invoking bibtool. Without any further infos I can't tell you more...

ge-ne avatar Mar 27 '22 16:03 ge-ne

In dealii/publication-list#479, I have encountered a similar problem. Below is a minimal example that runs on a GitLab runner for me. The command bibtool publications-1998.bib throws the similar error as above *** BibTool WARNING: File publications-1998.bib not found., while the version with ./ works fine.

bibtool:
  stage: check

  image: ubuntu:jammy

  script:
    - apt-get update
    - apt-get install -y bibtool git ca-certificates --no-install-recommends
    - git clone https://github.com/dealii/publication-list.git
    - cd publication-list
    - bibtool publications-1998.bib
    - bibtool ./publications-1999.bib

ghost avatar Nov 24 '22 13:11 ghost

I have the same problem: Only paths starting with ./ are handled correctly. They should mean the same as the version without.

flying-sheep avatar Mar 19 '24 11:03 flying-sheep

The setting of the library path determines where the files can be found. See the output of bibtool -h on how this is currently set. The search path for BibTeX files can also be set with the environment variable BIBINPUTS... Please check that you have set those paths appropriate...

ge-ne avatar Mar 20 '24 15:03 ge-ne

I see

Library path: .:/usr/share/bibtool

which indicates to me that the working directory is one of the library paths. Am I wrong?

I used it bibtool via docker like this:

$ docker run --init --rm -it trueflyingsheep/bibtool:2.68 -h | tail -n2
Library path: .:/usr/share/bibtool
Special configuration options: kpathsea
$ docker run --init --rm -v "$(pwd):/src" --workdir=/src -it trueflyingsheep/bibtool:2.68 docs/references.bib
*** BibTool WARNING: File docs/references.bib not found.
$ docker run --init --rm -v "$(pwd):/src" --workdir=/src -it trueflyingsheep/bibtool:2.68 ./docs/references.bib
@Article{	...
[...]
}

flying-sheep avatar Mar 20 '24 15:03 flying-sheep

Sorry, I have been unclear. I have answered a question which was not asked. Library path is for rsc files and BIBINPUTS is for bib files. You might try to set BIBINPUTS to '.'

ge-ne avatar Mar 20 '24 16:03 ge-ne

OK, can do. That should be the default, as said: relative/path means the same as ./relative/path everywhere else.

flying-sheep avatar Mar 20 '24 19:03 flying-sheep