Katoolin: command not found
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.
reconviperone
Updated on September 18, 2022Comments
-
reconviperone almost 2 years
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.
-
Henning Kockerbeck over 7 yearsPlease check whether you successfully copied
katoolin.py
to/usr/bin
, renamed it and gave it the proper permissions. You can do that withls -l /usr/bin/katoolin*
. Please add the output of this command to your question. -
reconviperone over 7 years>-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
-
Henning Kockerbeck over 7 yearsDid you maybe copy the whole
katoolin
folder to/usr/bin
? You were supposed to only copykatoolin.py
there and name the filekatoolin
. -
reconviperone over 7 years@HenningKockerbeck so should i just deleat the ther files?
-
Henning Kockerbeck over 7 yearsBest delete the whole
katoolin
folder. Then put onlykatoolin.py
directly in/usr/bin
, not in a sub directory of it, name itkatoolin
and give it the correct permisson as shown in the tutorial you linked. -
Henning Kockerbeck over 7 yearsIt seems that the superfluous sub dir was the root of the problem, so I've written an "official" answer to that effect :)
-