How to resolve conflicts when two binaries have the same name

1

1

Running OS X (10.9), I have a program called 'HEAD' in /Applications/XAMPP/xamppfiles/bin/, which is related to libwww-perl.

The OS also has an unrelated program called 'head' in /usr/bin/

Since the filesystem is not case-sensitive, and both of these directories are in my PATH, there is a conflict. I notice when I compile ffmpeg, it's using the xampp program when it should be using the OS program, and that's causing errors.

Elliott B

Posted 2013-10-23T10:55:20.417

Reputation: 769

Change PATH temporarily, maybe? – gronostaj – 2013-10-23T10:59:22.653

Answers

2

This is a known problem with case-insensitive HFS+ file systems. You're lucky you didn't overwrite head while installing LWP.

Two solutions:

  • Put /Applications/XAMPP/xamppfiles/bin into the PATH at a later stage. The system-default head will take precedence. Refer to HEAD with its full path if you must, or create a shell alias for it.

  • You should be able to rename HEAD into something else and just use that instead, depending on what calls it.

slhck

Posted 2013-10-23T10:55:20.417

Reputation: 182 472

Has anyone figured out what XAMPP actually uses its HEAD program for? I was very confused when I tried to head a file today and got a help dialog about HTTP requests. – alexw – 2016-04-07T03:17:04.963

I did rename HEAD, but I don't know if this will cause problems. It's part of the default XAMPP installation, so I have no idea when it would be called. – Elliott B – 2013-10-23T19:30:20.843

Do you necessarily have to have the bin in your PATH? AFAIK only xamppfiles/xampp is the executable you'd really need. – slhck – 2013-10-23T19:34:48.397

I really don't know, that's a question for the XAMPP developers. There are lots of binaries in there. Since the default XAMPP installer adds this directory to the PATH, I would guess that their code does not use hard-coded paths to binaries. – Elliott B – 2013-10-23T21:07:10.397