为什么即使程序在我的路径中也不执行?

col*_*nik 1 command-line bash

我正在尝试在/usr/local/bin/调用中运行一个程序runserver

/usr/local/bin 在 $PATH...

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

我正在引用正确的程序...

which runserver /usr/local/bin/runserver

然而,当我尝试执行时,runserver我收到错误,提示 bash 试图在 /usr/bin 中执行 runserver

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

我错过了什么?

cho*_*oba 6

您的 shell 可能会记住一个不再存在的旧文件。尝试重新哈希:

hash -r
Run Code Online (Sandbox Code Playgroud)