E: gnupg, gnupg2 and gnupg1 do not seem to be installed, but one of them is required for this operation

DockerDocker Compose

Docker Problem Overview


I have installed docker on windows 10 pro. I am facing an issue while running the following command in git-bash.

docker-compose up -d --build

and got following error.

E: gnupg, gnupg2 and gnupg1 do not seem to be installed, but one of them is required for this operation
(23) Failed writing body
Error executing command, exiting
ERROR: Service 'web' failed to build: The command '/bin/sh -c curl -sL https://deb.nodesource.com/setup_8.x | bash' returned a non-zero code: 1

Docker Solutions


Solution 1 - Docker

In your Dockerfile, run this first:

apt-get update && apt-get install -y gnupg2

or

apt-get update && apt-get install -y gnupg

Solution 2 - Docker

I faced the same issue:

> E: gnupg, gnupg2 and gnupg1 do not seem to be installed, but one of them is required for this operation

I resolved by using the following commands:

apt-get update
apt-get install gnupg

Solution 3 - Docker

In addition to existing answers:

RUN apt-get update && apt-get install -y gnupg

-y flag agrees to terms during installation process. It is important not to break the build

Solution 4 - Docker

Just install the updated versions of all of them.

apt-get install -y gnupg2 gnupg gnupg1

Solution 5 - Docker

I have debian 9 and to fix this i used the new library as follows:

ln -s /usr/bin/gpgv /usr/bin/gnupg2

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionSaifView Question on Stackoverflow
Solution 1 - DockerAnthony MoozView Answer on Stackoverflow
Solution 2 - DockersrinathView Answer on Stackoverflow
Solution 3 - DockergmodeView Answer on Stackoverflow
Solution 4 - DockerEdwinnerView Answer on Stackoverflow
Solution 5 - Docker3pepe3View Answer on Stackoverflow