installation-package

Unble to install Disearch tool in my Debian 12 linux Virtual OS. when trying with pip3 install dirsearch, few warnings! stopped installation process


I was trying to install these tool git clone https://github.com/maurosoria/dirsearch.git --depth 1 when I was trying pip3 install dirsearch there was few warnings in my terminal I'm providing code below please do have a look.

Installing collected packages: typing-extensions, soupsieve, requests-toolbelt, PySocks, pycparser, psycopg-binary, ntlm_auth, mysql-connector-python, Jinja2, defusedxml, colorama, charset_normalizer, psycopg, cffi, beautifulsoup4, cryptography, pyspnego, pyopenssl, requests_ntlm
  WARNING: The script normalizer is installed in '/home/david/.local/bin' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
  WARNING: The script pyspnego-parse is installed in '/home/david/.local/bin' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
Successfully installed Jinja2-3.1.4 PySocks-1.7.1 beautifulsoup4-4.12.3 cffi-1.17.0 charset_normalizer-2.0.12 colorama-0.4.6 cryptography-43.0.0 defusedxml-0.7.1 mysql-connector-python-9.0.0 ntlm_auth-1.5.0 psycopg-3.2.1 psycopg-binary-3.2.1 pycparser-2.22 pyopenssl-24.2.1 pyspnego-0.11.1 requests-toolbelt-1.0.0 requests_ntlm-1.3.0 soupsieve-2.6 typing-extensions-4.12.2
david@debian:~/dirsearch$ cd dirsearch

Solution

  • Its nothing critical but its warning you about some scripts being installed in directory that is not in your PATH, which means you cann run the script directly from command until you provide absolute path to those script.

    To resolve this, you can add your directory path /home/david/.local/bin to your PATH. Here’s how you can do it:

    Open your shell configuration file (e.g., .bashrc, .zshrc, or .profile) in a text editor:

    nano ~/.bashrc
    
    

    Add the following line to the end of the file:

    export PATH="$PATH:/home/david/.local/bin"
    
    

    Apply the changes by running:

    source ~/.bashrc
    

    or you can just restart your terminal

    my question is why are you cloning the repository and again installing dirsearch with your local pip3 ??

    my take on that apporach:

    If your goal is to run dirsearch with the cloned repo you can simply

    1. cd into the dirsearch directory
    cd dirsearch
    
    1. create a venv using following command (as i see uing pip3 command python is already installed in your machine)
    python -m venv venv
    
    1. activate the venv
    source ven/bin/activate
    
    1. install the requirements text with pip
    pip install -r requirements.txt
    
    1. run the dirsearch and check help page
    python dirsearch.py --help
    

    you will see how you can use the disearch command with the help, just the cavet is you will have to run python dirsearch.py --<flags> but you will have advantage of keeping your local python setup clean.

    Lastly, there is docker setup instruction included in the README.md file , you can setup that and have more ease of running but trade off is the resource docker container will take to run in your machine. so basically its resource trade off. maybe that will be in some other topic if you want to setup.