From 9820b8d6d94d0886142c1398cde25a2657c5e0fd Mon Sep 17 00:00:00 2001 From: Rohan Kumar Date: Thu, 6 Feb 2025 22:21:31 +0530 Subject: [PATCH] doc : add instructions in development guide to deal with missing gpgme package While running unit tests from GoLang, I had encountered this error multiple times. I thought it's better to document this so that some newcomer doesn't face this issue. Signed-off-by: Rohan Kumar --- content/Developing.md | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/content/Developing.md b/content/Developing.md index 407efef..e6c9622 100644 --- a/content/Developing.md +++ b/content/Developing.md @@ -84,3 +84,36 @@ If you need to update mocks use: ```bash $ make generate_mocks ``` + +## Troubleshooting errors when running unit tests via IDE + +When running tests from IDE, you might encounter this error: + +```shell +pkg-config --cflags -- gpgme +Package gpgme was not found in the pkg-config search path. +Perhaps you should add the directory containing `gpgme.pc' +to the PKG_CONFIG_PATH environment variable +No package 'gpgme' found +pkg-config: exit status 1 +``` + +In order to resolve this you need to install [gpgme](https://github.com/proglottis/gpgme) + +### Installing gpgme on Linux + +You need to install `libgpgme-dev` using your Linux distribution's package installer tool (`dnf`/`apt`) + +Here is an example for Fedora: +```shell +sudo dnf -y install libgpgme-dev +``` + +### Installing gpgme on MacOS + +You need to install `gpgme` on macOS. + +Here is an example using homebrew: +```shell +brew install gpgme +```