0

I have followed the instruction to Install Katoolin, but this happens:

# sudo katoolin
sudo: katoolin: command not found

I have searched hard on the net with no joy. What am I doing wrong? I have a Macbook Pro Early 2011 i7 processor.

wjandrea
  • 14,236
  • 4
  • 48
  • 98
  • Please check whether you successfully copied katoolin.py to /usr/bin, renamed it and gave it the proper permissions. You can do that with ls -l /usr/bin/katoolin*. Please add the output of this command to your question. – Henning Kockerbeck Oct 29 '16 at 15:40
  • -rw-r--r-- 1 root root 659 Oct 22 19:29 Changelog.txt drwxr-xr-x 3 root root 4096 Oct 27 23:18 katoolin -rw-r--r-- 1 root root 51305 Oct 27 23:25 katoolin.py -rw-r--r-- 1 root root 18047 Oct 22 19:29 LICENSE -rw-r--r-- 1 root root 1231 Oct 22 19:29 README.md

    – reconviperone Oct 29 '16 at 21:08
  • Did you maybe copy the whole katoolin folder to /usr/bin? You were supposed to only copy katoolin.py there and name the file katoolin. – Henning Kockerbeck Oct 29 '16 at 21:30
  • @HenningKockerbeck so should i just deleat the ther files? – reconviperone Oct 29 '16 at 21:45
  • Best delete the whole katoolin folder. Then put only katoolin.py directly in /usr/bin, not in a sub directory of it, name it katoolin and give it the correct permisson as shown in the tutorial you linked. – Henning Kockerbeck Oct 29 '16 at 21:55
  • It seems that the superfluous sub dir was the root of the problem, so I've written an "official" answer to that effect :) – Henning Kockerbeck Oct 30 '16 at 11:34

1 Answers1

1

Judging from the comments to the question, you placed the katoolin executable not directly into /usr/bin, but in a subdirectory of it.

When you enter a command, the system searches in a number of directories for a matching executable file. If you for example type foo, the system looks for /bin/foo, /sbin/foo, /usr/bin/foo and so on. The first such file that is found gets executed. Which directories get searched is defined in the environment variable PATH.

But the system does not search in sub directories of the directories listed in PATH. Therefore, if you put the katoolin executable to, say, /usr/bin/katoolin/katoolin instead of /usr/bin/katoolin, it won't be found.

Additionally, the executable must have the correct permissions ( sudo chmod +x /usr/bin/katoolin ) and the correct name. If you type katoolin, for example /usr/bin/katoolin.py won't be found either.

karel
  • 114,770