$ which doxygen
$ $(which doxygen) -v
$ doxygen -v
1.8.11 # <- ???
$ doxygen
error: Doxyfile not found and no input file specified!
Doxygen version 1.8.11
Copyright Dimitri van Heesch 1997-2015
# ... doxygen's help
$ type -a doxygen
doxygen is /home/gauthier/bin/doxygen
doxygen is /home/gauthier/bin/doxygen
doxygen is /usr/bin/doxygen

I'm trying to setup a new version of doxygen, to use in parallel to the one already on my machine.

I downloaded binaries, placed them somewhere in /opt, and created a symlink to them in my ~/bin, which is in my PATH.

As seen in the terminal paste above, running doxygen does not seem to call to the same binary found by which doxygen.

What might be going on?

marked as duplicate by ctrl-alt-delor, Kusalananda, Community Aug 16 '17 at 11:48

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • What do you get if you do type doxygen? – ctrl-alt-delor Aug 16 '17 at 11:04
  • @richard 1.8.11, see my edit. – Gauthier Aug 16 '17 at 11:07
  • Actually, try type -a to see all resolutions of a command...just in case there are any like-named aliases, functions, etc. – B Layer Aug 16 '17 at 11:07
  • @BLayer: added the result of type -a doxygen. There's a double entry, I wonder why (but probably not a problem, I guess?) – Gauthier Aug 16 '17 at 11:11
  • 1
    What do you see when you run hash -t doxygen? – Eric Renouf Aug 16 '17 at 11:13

and created a symlink to them in my ~/bin, which is in my PATH.

The order in PATH is relevant. Make sure to put your personal bin dir at the start; something like this:

export PATH="${HOME}/bin:${PATH}"

You should be able to see the lookup order using which -a <command>.

  • 1
    It's relevant to determine which version should run, but that can't explain that which and running the bin find different versions? – Gauthier Aug 16 '17 at 11:10
  • In any case, /home/gauthier/bin is early in my PATH. – Gauthier Aug 16 '17 at 11:12

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