Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

install error! #119

Closed
blackcodersec opened this issue Dec 20, 2023 · 19 comments
Closed

install error! #119

blackcodersec opened this issue Dec 20, 2023 · 19 comments
Labels
bug Something isn't working

Comments

@blackcodersec
Copy link

image

@blackcodersec blackcodersec added the bug Something isn't working label Dec 20, 2023
@r0oth3x49
Copy link
Owner

try installing with pip?

apt install python3-pip
python3 -m pip install -e . --upgrade

@blackcodersec
Copy link
Author

still same issue.
image

@r0oth3x49
Copy link
Owner

The error is more specific to python than ghauri. Try searching Google for the solution

@r0oth3x49
Copy link
Owner

I not able to reproduce this issue

@Bornunique911
Copy link

Bornunique911 commented Dec 31, 2023

I can reproduce the issue as follows for Python3.9 and Python3.11. The issue is being faced by setup.py file :

Steps to Reproduce the issue for Python version 3.11 from non-user scenario:

  1. Checking the output of Python Version by the following command :
python3 -V

image

Referring the Installation guide from the Installation section of the repository.

image

  1. Firstly cloning the repository using the following command :
git clone https://github.com/r0oth3x49/ghauri.git

image

  1. Changing directory to the ghauri directory.
cd ghauri
  1. Running the following command to install requirements :
python3 -m pip install --upgrade -r requirements.txt

image

As in the above screenshot, you can observe that the requirements are being already satisfied as some of the python libraries are already installed. Now, moving forward to the 3rd step of the Installation section.

  1. Run python3 setup.py install or python3 -m pip install -e . So I did followed the same as follows :

First I ran the python3 setup.py install and then the second one which is python3 -m pip install -e. Let's see in which command the given issue was for mentioned in the Issue #119 .

image

Now, in the above screenshot, you can observe that setup.py failed due to permission denied error and setup tools being deprecated.

Now, let's try the second command which is python3 -m pip install -e .

image

So, from the above screenshot, the second command did work and installed ghauri tool successfully. So, let's proceed with the next step from the installation section.

  1. As per the last step, you will be able to access and run the ghauri with simple

ghauri --help command. Let's try that.

image

So, from the above screenshot, we can observe that it worked and we can use tool with python3.11 but what about Python version 3.9. Let's find out.

Now for Python version 3.9, I will skip 3 steps from the steps to reproduce for Python version 3.11. So I will basically start with step 1 and steps 4 to 6.

Steps to Reproduce the Issue for Python Version 3.9 from non-user scenario:

Note : Using Google Cloud Shell for Python Version 3.9.

  1. Checking the output of Python Version by the following command :
python3 -V

image

  1. Skipped

  2. Skipped

  3. Running the following command to install requirements :

python3 -m pip install --upgrade -r requirements.txt

image

As in the above screenshot, you can observe that some of the requirements are upgraded to newer versions and some of the python libraries are already installed. Now, moving forward to the 3rd step of the Installation section.

  1. Run python3 setup.py install or python3 -m pip install -e . So I did followed the same as follows :

First I ran the python3 setup.py install and then the second one which is python3 -m pip install -e. Let's see in which command the given issue was for mentioned in the Issue #119 .

image

Root user scenario :
In root user scenario, you will observe that setup.py will be successful and will installed ghauri tool successfully but it throws a warning for setup.py install and easy_install command being deprecated which is quite advisable but what about non-user.

Non-root user :
In non-root user, there is a scenario where it fails and throws a error like it throws in the following screenshot for Python version 3.9.

image

  1. As per the last step, you will be able to access and run the ghauri with simple

ghauri --help command. Let's try that.

image

So, from the above screenshot, we can observe that it throws a command not found error for ghauri tool. So, to fix that I used the following commands as mentioned one-by-one :

python3 -m pip install -e . --upgrade

image

sudo python3 setup.py install

image

image

ghauri --help

image


I hope your issue is being resolved by these comment of mine. @blackcodersec
Also I hope you @r0oth3x49 sir you add this to the installation section so that if anyone faces the same issue can reference this issue to get their tool working.

@craverath
Copy link

image

Exec as sudo

@Bornunique911
Copy link

image

Exec as sudo

Yes

@PushkraJ99
Copy link

PushkraJ99 commented Jan 18, 2024

If Anyone Getting Error While Executing ghauri --help in kali linux , Not Showing any results after Installations.
Run given Command

sudo mv /home/kali/.local/bin/ghauri /usr/local/bin/

Close Terminal and Open New Terminal and try ghauri --help

@yaoper
Copy link

yaoper commented Jan 30, 2024

If Anyone Getting Error While Executing ghauri --help in kali linux , Not Showing any results after Installations. Run given Command

sudo mv /home/kali/.local/bin/ghauri /usr/local/bin/

Close Terminal and Open New Terminal and try ghauri --help

Hey guy, I can't find the path /home/kali/.local/bin/ghauri.

@t1gress
Copy link

t1gress commented Jan 30, 2024

I can reproduce the issue as follows for Python3.9 and Python3.11. The issue is being faced by setup.py file :我可以在Python3.9和Python3.11中重现这个问题,如下所示。setup.py文件所面临的问题:

Steps to Reproduce the issue for Python version 3.11 from non-user scenario:从非用户场景重现Python 3.11版问题的步骤:

  1. Checking the output of Python Version by the following command :通过以下命令检查Python Version的输出:
python3 -V

image

Referring the Installation guide from the Installation section of the repository.从存储库的安装部分参考安装指南。

image

  1. Firstly cloning the repository using the following command :首先,使用以下命令克隆仓库:
git clone https://github.com/r0oth3x49/ghauri.git

image

  1. Changing directory to the ghauri directory.
cd ghauri
  1. Running the following command to install requirements :
python3 -m pip install --upgrade -r requirements.txt

image

As in the above screenshot, you can observe that the requirements are being already satisfied as some of the python libraries are already installed. Now, moving forward to the 3rd step of the Installation section.

  1. Run python3 setup.py install or python3 -m pip install -e . So I did followed the same as follows :

First I ran the python3 setup.py install and then the second one which is python3 -m pip install -e. Let's see in which command the given issue was for mentioned in the Issue #119 .

image

Now, in the above screenshot, you can observe that setup.py failed due to permission denied error and setup tools being deprecated.

Now, let's try the second command which is python3 -m pip install -e .

image

So, from the above screenshot, the second command did work and installed ghauri tool successfully. So, let's proceed with the next step from the installation section.

  1. As per the last step, you will be able to access and run the ghauri with simple

ghauri --help command. Let's try that.

image

So, from the above screenshot, we can observe that it worked and we can use tool with python3.11 but what about Python version 3.9. Let's find out.

Now for Python version 3.9, I will skip 3 steps from the steps to reproduce for Python version 3.11. So I will basically start with step 1 and steps 4 to 6.

Steps to Reproduce the Issue for Python Version 3.9 from non-user scenario:

Note : Using Google Cloud Shell for Python Version 3.9.

  1. Checking the output of Python Version by the following command :
python3 -V

image

  1. Skipped
  2. Skipped
  3. Running the following command to install requirements :
python3 -m pip install --upgrade -r requirements.txt

image

As in the above screenshot, you can observe that some of the requirements are upgraded to newer versions and some of the python libraries are already installed. Now, moving forward to the 3rd step of the Installation section.

  1. Run python3 setup.py install or python3 -m pip install -e . So I did followed the same as follows :

First I ran the python3 setup.py install and then the second one which is python3 -m pip install -e. Let's see in which command the given issue was for mentioned in the Issue #119 .

image

Root user scenario : In root user scenario, you will observe that setup.py will be successful and will installed ghauri tool successfully but it throws a warning for setup.py install and easy_install command being deprecated which is quite advisable but what about non-user.

Non-root user : In non-root user, there is a scenario where it fails and throws a error like it throws in the following screenshot for Python version 3.9.

image

  1. As per the last step, you will be able to access and run the ghauri with simple

ghauri --help command. Let's try that.

image

So, from the above screenshot, we can observe that it throws a command not found error for ghauri tool. So, to fix that I used the following commands as mentioned one-by-one :

python3 -m pip install -e . --upgrade

image

sudo python3 setup.py install

image

image

ghauri --help

image

I hope your issue is being resolved by these comment of mine. @blackcodersec Also I hope you @r0oth3x49 sir you add this to the installation section so that if anyone faces the same issue can reference this issue to get their tool working.

Hi, I reproduced according to the method you provided, but it still can't be executed
image
image

@Bornunique911
Copy link

Bornunique911 commented Jan 30, 2024

@t1gress Did you followed the actual installation steps first from the Installation section of the main repository or you just followed the steps which is mentioned in this issue? Also may I know the actual python version installed on your Mac as well?

@Bornunique911
Copy link

@t1gress I hope this will help you if are facing the issue still after installation of ghauri tool.
Note : Please remove the python libraries associated with ghauri first by using the following command :

sudo python3 -m pip uninstall -r requirements.txt

Just copy and paste the following commands to install ghauri tool :

   python3 -V
   git clone https://github.com/r0oth3x49/ghauri.git
   cd ghauri/
   python3 -m pip install --upgrade -r requirements.txt
   python3 setup.py install
   python3 -m pip install -e .
   ghauri --help
   python3 -m pip install -e . --upgrade
   sudo python3 setup.py install
   ghauri --help

@t1gress
Copy link

t1gress commented Jan 31, 2024

ghauri --help

Thank you for your enthusiastic reply. I will try again according to the command you prompted. Unfortunately, the same problem still occurs.
image
image
image
image

@Bornunique911
Copy link

Bornunique911 commented Jan 31, 2024

@t1gress I hope this will help you if are facing the issue still after installation of ghauri tool.

Just copy and paste the following commands to install ghauri tool :

   python3 -V
   git clone https://github.com/r0oth3x49/ghauri.git
   cd ghauri/
   python3 -m pip install --upgrade -r requirements.txt
   python3 setup.py install
   python3 -m pip install -e .
   ghauri --help
   python3 -m pip install -e . --upgrade
   sudo python3 setup.py install
   ghauri --help
   ls -la /usr/bin/ghauri
   ls -la /usr/local/bin/ghauri

If the ghauri tool is not installed in the $PATH variable, then command not found error occurs right.
So, I added two extra commands which I hope will be helpful to debug the issue.
If the ghauri tool is not found in the /usr/bin directory, then it might be installed in the /usr/local/bin/ghauri directory. Also one thing I would add to it that if ghauri --help is throwing a command not found error, then it might be because it has not sourced the .zshrc file. So, for that follow the following command :

source ~/.zshrc

OR
You can also try ghauri --help by opening the new terminal and by closing the old one. So, it will basically source the updated .zshrc file and will give you new fresh environment in your terminal.

@t1gress
Copy link

t1gress commented Jan 31, 2024

@t1gress I hope this will help you if are facing the issue still after installation of ghauri tool.

Just copy and paste the following commands to install ghauri tool :

   python3 -V
   git clone https://github.com/r0oth3x49/ghauri.git
   cd ghauri/
   python3 -m pip install --upgrade -r requirements.txt
   python3 setup.py install
   python3 -m pip install -e .
   ghauri --help
   python3 -m pip install -e . --upgrade
   sudo python3 setup.py install
   ghauri --help
   ls -la /usr/bin/ghauri
   ls -la /usr/local/bin/ghauri

If the ghauri tool is not installed in the $PATH variable, then command not found error occurs right. So, I added two extra commands which I hope will be helpful to debug the issue. If the ghauri tool is not found in the /usr/bin directory, then it might be installed in the /usr/local/bin/ghauri directory. Also one thing I would add to it that if ghauri --help is throwing a command not found error, then it might be because it has not sourced the .zshrc file. So, for that follow the following command :

source ~/.zshrc

OR You can also try ghauri --help by opening the new terminal and by closing the old one. So, it will basically source the updated .zshrc file and will give you new fresh environment in your terminal.

@Bornunique911 Thank you again for your patient reply. I executed the command according to your prompts again, but it still did not take effect, and the generated tools were not found in my /usr/bin and /usr/local/bin directories.
image

@Bornunique911
Copy link

@t1gress I don't have a Mac, so I am unable to say why the installation of the Ghauri tool is failing on Mac. Consequently, I am unable to figure out what is going wrong. Fortunately, it is working properly in Google Cloud Shell, where the Python version is 3.9.2. The steps I have provided for the installation work for Kali Linux, and I am unsure why it is not working on Mac.

@t1gress
Copy link

t1gress commented Feb 1, 2024

@t1gress我没有Mac,所以我不能说为什么在Mac上安装Ghauri工具失败。因此,我无法找出出了什么问题。幸运的是,它在Google Cloud Shell中正常工作,其中Python版本为3.9.2。我提供的安装步骤适用于Kali Linux,我不确定为什么它在Mac上不起作用。

Thank you for your patient answer, I tried installing it in my kali virtual machine and it worked, I will use the tool in the virtual machine in the future

image image

@PushkraJ99
Copy link

If Anyone Getting Error While Executing ghauri --help in kali linux , Not Showing any results after Installations. Run given Command
sudo mv /home/kali/.local/bin/ghauri /usr/local/bin/
Close Terminal and Open New Terminal and try ghauri --help

Hey guy, I can't find the path /home/kali/.local/bin/ghauri.

Open Terminal and type pwd and Then replace with /home/kali/

given Command is for Kali Users Change with Your Machine Path

@PushkraJ99
Copy link

PushkraJ99 commented Jul 27, 2024

Installation Update !!!

You Can Try Below Command to install Ghauri.

Specially For VPS Users

pip install git+https://github.com/r0oth3x49/ghauri.git

After Installation You Cant Find the Ghauri installed Location then Try

whereis ghauri

Then use Below Command
Don't Forget to Change ghauri-location to Location you Found using above Command

cp ghauri-location /usr/local/bin

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

7 participants