2

I am using Kali Linux (based on Debian) and below is the output of the uname -a command

Linux kali 5.3.0-kali2-amd64 #1 SMP Debian 5.3.9-3kali1 (2019-11-20) x86_64 GNU/Linux

I want to install the following python3 packages but apt-get cannot find them:

python3-geoip
python3-whois

Below is the output when I try to install python3-whois package using apt-get command

# sudo apt-get install python3-whois
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package python3-whois

I already ran the following commands to update apt-get

sudo apt-get update
sudo apt-get upgrade

The version of Python installed is 3.7.5 and python3 is located in the path: /usr/bin/python3

Update:

Below are the contents of my /etc/apt/sources.list file

# 

# deb cdrom:[Debian GNU/Linux 2019.4 _Kali-rolling_ - Official Snapshot amd64 LIVE/INSTALL Binary 20191125-10:47]/ kali-last-snapshot contrib main non-free

#deb cdrom:[Debian GNU/Linux 2019.4 _Kali-rolling_ - Official Snapshot amd64 LIVE/INSTALL Binary 20191125-10:47]/ kali-last-snapshot contrib main non-free

# This system was installed using small removable media
# (e.g. netinst, live or single CD). The matching "deb cdrom"
# entries were disabled at the end of the installation process.
# For information about how to configure apt package sources,
# see the sources.list(5) manual.

deb http://http.kali.org/kali kali-rolling main non-free contrib

I even checked the apt update logs here: /var/log/apt/history.log and there is no information corresponding to the apt-get install commands I ran.

It seems like Kali Linux is not configured with the apt-get repositories by default?

How can I install the above python3 packages?

Thanks.

1
  • 1
    Can you run any apt commands? Does apt search python3- return anything? Your /etc/apt/sources.list file is exactly the same as mine (the default, btw) and every command you've referenced works. Maybe your apt database is hosed. Jan 8, 2020 at 17:56

2 Answers 2

2

Assuming python's own pip package manager is installed and configured correctly, you may try

pip install python-geoip-python3
pip install python-whois

to install the missing packages. Depending on the installation, the binary may also be called pip3.

1
  • Apparently pip is not installed and I can't install it using apt-get either. I have updated my post with more information, please check. It seems that the default repositories are not configured on Kali Linux.
    – Neon Flash
    Jan 8, 2020 at 12:15
1

My thoughts is that Kali is based but is not using the Debian repositories itself, the package exist at https://packages.debian.org/sid/amd64/python3-whois. So as last chance you can download it manually and install it but a log of apt update is the fest way to check if is using those repositories.

2
  • I have updated the description and included some more details. Please check. It includes the contents of the sources.list file for apt and also the apt update log. Thanks.
    – Neon Flash
    Jan 8, 2020 at 12:15
  • It is confirmed that you don't have the debian repository so you cannot download from them. You should check what Kali says about debian official repo
    – Mte90
    Jan 9, 2020 at 12:02

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .