Skip to content

Instantly share code, notes, and snippets.

@linuxbiekaisar
Last active July 2, 2025 06:06
Show Gist options
  • Save linuxbiekaisar/3bf452b25a03d513a3769c97de20dfeb to your computer and use it in GitHub Desktop.
Save linuxbiekaisar/3bf452b25a03d513a3769c97de20dfeb to your computer and use it in GitHub Desktop.
How to install theHarvester on Ubuntu 18.04 LTS
# Youtube: https://www.youtube.com/channel/UC8dSAxutoOJuoy7kExTd0AQ
# !/bin/sh
# use to git clon to download and clone the theHarvester from Github
git clone https://github.com/laramies/theHarvester
# Now enter into the theHarvester Folder
cd theHarvester
# Now install pip
sudo apt install python3-pip
# Now run the command if not donot work then run second one
python3.7 -m pip install -r requirements/dev.txt
# Else:
python3.7 -m pip install -r requirements/base.txt
# NOw run theHarvester
python3.7 theHarvester.py -h
# For Generating email list use this command
python3.7 theHarvester.py -d gmail.com -l 500 -b google
@Huy-Hoang2k8
Copy link

cho mik hỏi mik vẫn chx hỉu phải tải làm sao

@viktokito
Copy link

thank you :D

@robertriosm
Copy link

dude, its not working, I already installed it and everything, but it always says:
[!] Invalid source.
someone knows whats wrong?

@Depgit
Copy link

Depgit commented Apr 25, 2023

dude, its not working, I already installed it and everything, but it always says: [!] Invalid source. someone knows whats wrong?

try this
python3 theHarvester.py -d google.com -b all

@networker12
Copy link

ok

@Ransomware0
Copy link

i have this error:

Traceback (most recent call last):
File "theHarvester.py", line 5, in
from theHarvester import main
File "/home/theHarv/theHarvester/theHarvester/main.py", line 4, in
from theHarvester.discovery import dnssearch, takeover, shodansearch
File "/home/theHarv/theHarvester/theHarvester/discovery/dnssearch.py", line 17, in
from theHarvester.lib import hostchecker
File "/home/theHarv/theHarvester/theHarvester/lib/hostchecker.py", line 14, in
class Checker:
File "/home/theHarv/theHarvester/theHarvester/lib/hostchecker.py", line 37, in Checker
BaseException | Any, BaseException | Any, BaseException | Any, BaseException | Any, BaseException | Any]:
TypeError: unsupported operand type(s) for |: 'type' and '_SpecialForm'

some solution?

@cboychinedu
Copy link

i have this error:

Traceback (most recent call last): File "theHarvester.py", line 5, in from theHarvester import main File "/home/theHarv/theHarvester/theHarvester/main.py", line 4, in from theHarvester.discovery import dnssearch, takeover, shodansearch File "/home/theHarv/theHarvester/theHarvester/discovery/dnssearch.py", line 17, in from theHarvester.lib import hostchecker File "/home/theHarv/theHarvester/theHarvester/lib/hostchecker.py", line 14, in class Checker: File "/home/theHarv/theHarvester/theHarvester/lib/hostchecker.py", line 37, in Checker BaseException | Any, BaseException | Any, BaseException | Any, BaseException | Any, BaseException | Any]: TypeError: unsupported operand type(s) for |: 'type' and '_SpecialForm'

some solution?

you are using anaconda, that is why you are getting the following errors.

install python using apt-get, and use the default install, this should solve the problem.

@Tyr0806
Copy link

Tyr0806 commented Jun 28, 2024

I tried following the above steps, but received this message:

error: externally-managed-environment

× This environment is externally managed
╰─> To install Python packages system-wide, try apt install
    python3-xyz, where xyz is the package you are trying to
    install.
    
    If you wish to install a non-Debian-packaged Python package,
    create a virtual environment using python3 -m venv path/to/venv.
    Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make
    sure you have python3-full installed.
    
    If you wish to install a non-Debian packaged Python application,
    it may be easiest to use pipx install xyz, which will manage a
    virtual environment for you. Make sure you have pipx installed.
    
    See /usr/share/doc/python3.12/README.venv for more information.

note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.
hint: See PEP 668 for the detailed specification.

@akkugadre
Copy link

I am getting an error
python3 theHarvester.py -h
Traceback (most recent call last):
File "/home/akkugadre/theHarvester/theHarvester.py", line 5, in
from theHarvester.theHarvester import main
File "/home/akkugadre/theHarvester/theHarvester/theHarvester.py", line 4, in
from theHarvester import main
File "/home/akkugadre/theHarvester/theHarvester/main.py", line 13, in
import ujson
ModuleNotFoundError: No module named 'ujson'

but ujson is installed I am not sure what I am doing wrong can some one please help?

@akkugadre
Copy link

I was able to get around it by using
python3 -m pip config set global.break-system-packages true
which I should probably not do since it promises to break system packages, but wth, i am on a personal system, little infractions are ok among friends right?!

@Welsyn44
Copy link

Welsyn44 commented Jul 2, 2025

Bu ne için bir yazılım

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment