1
ragib@RAGIB-PC:~$ sudo su
[sudo] password for ragib:
root@RAGIB-PC:/home/ragib# git clone https://github.com/LionSec/katoolin.git && cp katoolin/katoolin.py /usr/bin/katoolin 
fatal: destination path 'katoolin' already exists and is not an empty directory
root@RAGIB-PC:/home/ragib# chmod +x /usr/bin/katoolin
root@RAGIB-PC:/home/ragib# katoolin
bash: /usr/bin/katoolin: /usr/bin/python: bad interpreter: No such file or directory
root@RAGIB-PC:/home/ragib# sudo katoolin
sudo: unable to execute /usr/bin/katoolin: No such file or directory
root@RAGIB-PC:/home/ragib#

terminal image

I was trying to install katoolin to get all the Kali linux tools in Ubuntu 17.10. I have seen many tutorials describing same method, and I think I've done that exactly the same way, but something is not right, either in my system or I did something wrong while trying to install katoolin.

Organic Marble
  • 22,803
  • 12
  • 65
  • 118
Ragib
  • 11
  • 1
  • 2
  • It looks like you already have leftover files in `/usr/bin/katoolin`. Remove the katoolin directory and its contents recursively using this command: `sudo rm -r /usr/bin/katoolin` and try again. Please comment or edit your question and report any errors. – karel Mar 23 '18 at 05:05
  • btw You are already root, so you don't need to type `sudo katoolin` - `katoolin` will do instead. – karel Mar 23 '18 at 05:19

4 Answers4

1

Simply run this:

sudo bash -c "test -e /usr/bin/python || (apt -qqy update && apt install -qy python-minimal)"

Then run the command katoolin.

Eliah Kagan
  • 116,445
  • 54
  • 318
  • 493
1

Simply, you can just run this command:

sudo apt-get install python 

or

sudo apt-get update python 

then run katoolin.

ThunderBird
  • 1,915
  • 13
  • 19
  • 31
kirax
  • 11
  • 1
0

In Ubuntu 22.04. You have to install python2

sudo apt-get install python2 

Then open the file katoolin.py in nano or gedit and change

#!/usr/bin/python

for

#!/usr/bin/python3

then make the cp command from the actual directory to /usr/bin/katoolin.py

sudo cp katoolin.py /usr/bin/katoolin.py

and with that you should be okay

0

it worked for me i changed the cp command to #!/usr/bin/python2 on Ubuntu 22.04 tkss

  • 1
    This does not provide an answer to the question. Once you have sufficient [reputation](https://askubuntu.com/help/whats-reputation) you will be able to [comment on any post](https://askubuntu.com/help/privileges/comment); instead, [provide answers that don't require clarification from the asker](https://meta.stackexchange.com/questions/214173/why-do-i-need-50-reputation-to-comment-what-can-i-do-instead). - [From Review](/review/low-quality-posts/1308257) – Marc Vanhoomissen Jul 09 '23 at 08:11
  • Please don't add "thank you" as an answer. Once you have sufficient [reputation](https://askubuntu.com/help/whats-reputation), you will be able to [vote up questions and answers](https://askubuntu.com/help/privileges/vote-up) that you found helpful. - [From Review](/review/late-answers/1308256) – sotirov Jul 11 '23 at 13:45
  • Please don't add "thank you" as an answer. Once you have sufficient [reputation](https://askubuntu.com/help/whats-reputation), you will be able to [vote up questions and answers](https://askubuntu.com/help/privileges/vote-up) that you found helpful. - [From Review](/review/low-quality-posts/1308257) – zx485 Aug 28 '23 at 20:37