1

I am trying to run a program in /usr/local/bin/ called runserver.

/usr/local/bin is in $PATH...

echo $PATH /usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games

I am referencing the right program...

which runserver /usr/local/bin/runserver

Yet when I try to execute runserver I get error that bash is trying to execute runserver in /usr/bin

runserver bash: /usr/bin/runserver: No such file or directory

What am I missing?

10
  • Can you post the contents of /usr/local/bin/runserver?
    – jobin
    Commented Apr 28, 2014 at 17:04
  • I stripped it down to something really simple... cd /www
    – colboynik
    Commented Apr 28, 2014 at 17:06
  • Does the binary have the executable bit set (chmod +x file, I believe you otherwise get a permission denied error but I'm not sure)? Also, are you running a 64-bit OS and trying to execute a 32-bit binary? In this case you should install the 32-bit libraries (apt-get install ia32-libs). Commented Apr 28, 2014 at 17:06
  • What do you get when you specifically run /usr/local/bin/runserver?
    – jobin
    Commented Apr 28, 2014 at 17:07
  • 3
    Can you just rehash your shell? hash -r for bash.
    – choroba
    Commented Apr 28, 2014 at 17:24

2 Answers 2

6

Your shell probably remembers an old file that doesn't exist anymore. Try rehashing:

hash -r
0

Is the program executable? Try to do this first:

sudo chmod +x /usr/bin/runserver
1
  • There is no file in /usr/bin/runserver. The file is located in /usr/local/bin/runserver.
    – jobin
    Commented Apr 28, 2014 at 17:05

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .