Почему что не соответствует эффекту, который я получаю?

237
WilliamKF

Я не могу объяснить следующее поведение:

[centos4x64 ~] /usr/local/bin/gmake --version GNU Make 3.82 Built for x86_64-unknown-linux-gnu Copyright (C) 2010 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.  [centos4x64 ~] which gmake /usr/local/bin/gmake  [centos4x64 ~] gmake --version GNU Make 3.80 Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 

Почему неквалифицированный gmake не совпадает с заданным which? Обратите внимание, что у меня v3.80 в / usr / bin / gmake. Это в bash на 64-битной версии Centos 4.

1

1 ответ на вопрос

2
Ignacio Vazquez-Abrams

Because bash has the location of gmake as being somewhere else in its hash lookup table.

# list the path to the binary that invoking 'gmake' will call hash -t gmake # have bash forget the mapping for 'gmake' hash -d gmake # have bash remember the correct mapping for 'gmake' hash -p /usr/local/bin/gmake gmake # or just gmake 

Похожие вопросы