command-line utility binary won't run without explicit path - TechRepublic
General discussion
May 5, 2006 at 12:47 AM
apotheon

command-line utility binary won’t run without explicit path

by apotheon . Updated 20 years, 1 month ago

Okay, folks, this is a weird one:

I have the xli program installed on this machine. Until a day or two ago, it worked just fine. I think I’ve updated the version, though, with the package manager (don’t recall for sure). Xli itself is a handy utility for quickly opening an image in its own window for viewing.

Here’s what happens when I try to run it:
$ xli soapbox0.png
bash: /usr/bin/X11/xli: No such file or directory

Here’s what happens when I ask bash where it is:
$ which xli
/usr/bin/xli

The /usr/bin directory is in my path, as you can see:
$ echo $PATH
/home/ren/bin:/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games

(watch the line-wrap on that one)

Because it’s a GUI program, I can’t just show output when it actually works, but suffice to say that it works if I do this:
$ /usr/bin/xli

It also works if I do this:
# xli

. . . but I (obviously) don’t want to run it as root all the time.

Clearly, this is not a permissions issue (or it wouldn’t even work with the full path). It’s not a missing $PATH entry. It’s not a broken alias (I checked, and I even checked all my bash config files for references to xli or /usr/bin and /usr/bin/X11 other than in the path). It’s not a symlink issue. It’s not a broken binary. Perhaps the most bizarre thing about it is that the “which” command tells me the right path for it, but trying to run it causes it to check the wrong directory path.

I could use a symlink or an alias to “solve” the problem, but really all that does is treat the symptom. I want to actually know what’s wrong.

This discussion is locked

All Comments