4

I was trying to install a newer version of curl and when I ran: curl -V, the version number didn't change.

After running which curl, it displayed the path of the newly installed version: /usr/local/bin/curl. If I run /usr/local/bin/curl -V it displays the correct version.

The version being executed by curl seems to be in /usr/bin.

My PATH is: /usr/local/bin:/usr/bin ... etc, so it should be executing the /usr/local version.

Why is the output of which curl not the same as the program being executed by curl?

JayMech
  • 41
  • 1
  • 6
    Possibly related: [How do I clear Bash's cache of paths to executables?](https://unix.stackexchange.com/questions/5609/how-do-i-clear-bashs-cache-of-paths-to-executables) – steeldriver Apr 27 '18 at 21:44
  • Another pertinent question is https://unix.stackexchange.com/questions/85249/ . – JdeBP Apr 30 '18 at 07:30
  • The linked questions answered the question. There is even a question that is nearly exactly the same (not sure why the search engine didn't find it). Should the be marked Duplicate or something? – JayMech Apr 30 '18 at 18:44

0 Answers0