1

I am unable to install gpg with pip:

# pip install gpg
Collecting gpg
  Downloading 
Complete output from command python setup.py egg_info:
Could not find gpgme-config.  Please install the libgpgme development package.

----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-QzenGe/gpg/

Trying to install libgpgme or libgpgme-dev leads to

# pip install libgpgme
Collecting libgpgme
  Could not find a version that satisfies the requirement libgpgme (from versions: )
No matching distribution found for libgpgme

How can I install gpg despite the fact that there is no version for my distribution?


PS:

I am running on Kali 4.6.0:

# uname -a
Linux hostname 4.6.0-kali1-amd64 #1 SMP Debian 4.6.4-1kali1 (2016-07-21) x86_64 GNU/Linux
3
  • The libgpgme development package is called libgpgme-dev.
    – Kusalananda
    Apr 17, 2018 at 9:03
  • 3
    Possible duplicate of Why is Kali Linux so hard to set up? Why won't people help me? Apr 17, 2018 at 13:42
  • 1
    libgpgme is not a Python package. It should be a .deb package, so you should install it with the operating system's package management tools, not with Python-specific pip. My first guess would be apt-get install libgpgme libgpgme-dev. Once that is successfully completed, you can use pip install gpg to install the Python gpg package. (Note: the Python gpg package is for using GPG within Python programs. There is also a .deb package with the same name, which contains the gpg command-line tool.)
    – telcoM
    Apr 20, 2018 at 9:27

1 Answer 1

4

Since you need gpgme-config, you’ll need to install libgpgme-dev, which is the development package for libgpgme:

apt install libgpgme-dev

You could also skip using pip entirely and install the python-gpg (or python3-gpg if you’re using Python 3) package instead:

apt install python-gpg
3
  • I have the same error with pip install libgpgme-dev: Could not find a version that satisfies the requirement livgpgme-dev (from versions: ) No matching distribution found for livgpgme-dev
    – user123456
    Apr 17, 2018 at 10:36
  • 1
    libgpgme-dev isn’t a pip module, it’s a Debian/Kali package; you need to use apt to install it. (sudo apt install libgpgme-dev.) Apr 17, 2018 at 10:49
  • This was sudo yum install gpgme-devel on Alma 9, in case that's helpful for someone. Sep 19, 2023 at 9:02

You must log in to answer this question.

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