0
sudo dpkg -i python-pyasn1_0.4.2-3build1_all.deb

I try to depackage this deb, yet I am on kali (debian) I get error

python 2.7 breaks python-pyasn1 and is installed
dpkg: error processing package python-pyasn1 (--install):

What can I do about this ?

1
  • @Peregrino69 is 100% correct, but just to add a note, you'll find that various distros have dependencies on python2 or python3, so you can run into significant issues, and if you need it for your code, you're almost always better off building on a distro that's compatible, or building python from binaries. Mar 10, 2023 at 18:42

1 Answer 1

4

You’re trying to install a Python 2 module, and those aren’t supported any more in current versions of Kali or Debian. The python2.7 package is still available, but to ensure that obsolete modules aren’t left lying around, it prevents their installation.

If you’re writing new code, you should use Python 3 and the python3-pyasn1 package instead; the latter is available in the Kali repositories:

sudo apt install python3-pyasn1

If you’re trying to get older software to work, you’d be better off using a Python 2 virtual environment and installing the module using pip.

You must log in to answer this question.

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