Skip to content

Ubuntu 18.04 gpg dirmngr IPC connect call failed #3286

Closed

Description

  • Your Windows build number: 10.0.17134.81

  • What you're doing and what's happening:

Building MonoDevelop for Windows looks like a real hassle and there are no binaries available.

I decided to give MonoDevelop for Ubuntu binaries a try on WSL.

I installed a clean Ubuntu 18.04 from the Microsoft Store.

To get it all caught up I executed:

sudo apt-mark hold ebtables # for the current upgrade bug
sudo apt-get update
sudo apt-get upgrade -y

and then I picked up with the MonoDevelop IDE instructions:

sudo apt install apt-transport-https dirmngr
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF

Then I run into an issue.

I receive the following error message:

$ sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
[sudo] password for hayden:
Executing: /tmp/apt-key-gpghome.BG01sRSmD5/gpg.1.sh --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
gpg: connecting dirmngr at '/tmp/apt-key-gpghome.BG01sRSmD5/S.dirmngr' failed: IPC connect call failed
gpg: keyserver receive failed: No dirmngr
  • What's wrong / what should be happening instead:

gpg isn't able to call dirmngr

What I have attempted:

  1. Running dirmngr in another bash instance
  2. Making sure gpg-agent is running in the background
  3. This. https://stackoverflow.com/questions/49496667/gpg-key-generation-canceled and https://stackoverflow.com/questions/46673717/gpg-cant-connect-to-the-agent-ipc-connect-call-failed

Note: I have also tried building MonoDevelop from source on Ubuntu in WSL, but ran into this issue.

Activity

  1. changed the title [-]Error installing GPG keys in Ubuntu on WSL[/-] [+]Error importing key to apt keyserver in Ubuntu 18.04 on WSL[/+] on Jun 9, 2018
  2. sirredbeard commented on Jun 9, 2018

    @sirredbeard
    ContributorAuthor

    Thanks. I did get it installed via your workaround. Sadly MonoDevelop will not run though.

  3. therealkenc commented on Jun 12, 2018

    @therealkenc

    I hate to look a 'closed' gift horse in the mouth, but this one merits some further attention because it will keep coming up until we have a work-around on the books for the dirmngr fail proper. The problem is unrelated to Mono or MonoDevelop, natch. MariaDB (key 0xF1656F24C74CD1D8) fails the same, as will every apt-key howto anyone has ever posted on the Interwebs.

    The problem is that dirmngr (sudo apt install dirnmgr) isn't running (or isn't autolaunched?) and thus there is nothing on the other end for apt-key via gpg to talk to. After around half an hour of investigation, like Hayden Barnes (@sirredbeard), I wasn't able to make dirmngr at home on WSL manually. Maybe someone else will have better luck or suggestions.

  4. changed the title [-]Error importing key to apt keyserver in Ubuntu 18.04 on WSL[/-] [+]Ubuntu 18.04 gpg dirmngr IPC connect call failed[/+] on Jun 12, 2018
  5. sirredbeard commented on Jun 12, 2018

    @sirredbeard
    ContributorAuthor

    I support re-opening for the wider issue with dirmgr.

    I think I was able to import the key by curling it in and piping it to apt-key.

    Is this only on Ubuntu and only 18.04? If so, should we file a bug report upstream with Canonical?

  6. therealkenc commented on Jun 12, 2018

    @therealkenc

    I think I was able to import the key by curling it in and piping it to apt-key.

    Yes that's effectively the work-around until the base cause and a solution to the root problem is articulated.

    Is this only on Ubuntu and only 18.04?

    That is part of what merits investigation. It wasn't a problem on 16.04 (but you already knew that). Whether it wasn't a problem in 16.04 because (a) an operable dirmngr wasn't previously a requirement or (b) dirmng was working fine and nobody thought anything of it or (c) something changed with gpg or apt-key or dirmngr or something in between that now causes the sequence to fail, I can't tell you. Or at least, not with any authority after looking at it for a short bit.

  7. WSLUser commented on Jun 13, 2018

    @WSLUser

    I'd like to report that any debian based distro (possibly any distro) utilizing an updated dirmngr before 18.04 was officially released as LTS was recieving this error. The issue was resolved just in time for 18.04 release. So this may be a regression or something Ubuntu did to screw with it.

    When I had experienced this error utilizing Debian Buster, I simply reinstalled Debian from the Store after 18.04 was released and the updated package containing the fix was imported when upgrading from Stretch to Buster. As of yesterday evening, I have yet to see this issue re-occur.

    The work-around mentioned above failed at the time and did prevent any package (including stock) from successfully upgrading. Even apt update failed.

    I would recommend others test a different distro other than Ubuntu 18.04 that uses the same version of dirmngr (or upgrade to it if not part of the base) and see if it still has an issue.

    For completeness, I'm running build 17134 with the latest patch.

  8. sirredbeard commented on Jun 15, 2018

    @sirredbeard
    ContributorAuthor

    @Alternate-Egoist

    I wanted to do the same but could not duplicate your success.

    capture32432

  9. filjoseph1989 commented on Jun 16, 2018

    @filjoseph1989

    I tried following the guide here https://downloads.mariadb.org/mariadb/repositories/#mirror=utm&distro=Ubuntu&distro_release=bionic--ubuntu_bionic&version=10.3

    while running this, sudo apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xF1656F24C74CD1D8, i got
    gpg: connecting dirmngr at '/tmp/apt-key-gpghome.cROhJELJ0N/S.dirmngr' failed: IPC connect call failed message too

  10. therealkenc commented on Jun 16, 2018

    @therealkenc

    I tried following the guide here ... apt-key etc etc etc ..../mariadb/.... etc etc etc ... 0xF1656F24C74CD1D8 .... I got .... etc etc .... IPC connect call failed

    Well, yes. Because Quoth:

    The problem is unrelated to Mono or MonoDevelop, natch. MariaDB (key 0xF1656F24C74CD1D8) fails the same, as will every apt-key howto anyone has ever posted on the Interwebs.

  11. jibin2706 commented on Jun 28, 2018

    @jibin2706

    same error while installing mongodb

  12. 54 remaining items

  13. ip11 commented on Nov 8, 2019

    @ip11

    Follow the https://docs.mongodb.com/manual/tutorial/install-mongodb-on-ubuntu/

    sudo service mongod start (Will not work with WSL)

    Step1 : sudo mkdir -p /data/db

    Step2 : sudo mongod --dbpath /data/db

    This will start the mongod server in WSL without any additional procedures

    Step3 : mongo 👍

  14. added 2 commits that reference this issue on Nov 19, 2019
  15. veloscillator commented on Apr 25, 2020

    @veloscillator

    This issue still exists in 20.04. The original workaround (calling apt-key add - manually) no longer works. tsilefy's workaround above does work. Is there any change of getting this resolved for good?

  16. onomatopellan commented on Apr 26, 2020

    @onomatopellan

    Ken (@veloscillator) which Windows build? in Ubuntu 20.04 libc6 is broken in WSL1 and shows a very similar error message. You can try #5125 (comment) as workaraound.

  17. fumiichan commented on Apr 26, 2020

    @fumiichan

    image

    Both didn't work though.

  18. veloscillator commented on Apr 27, 2020

    @veloscillator

    Ken (@veloscillator) which Windows build? in Ubuntu 20.04 libc6 is broken in WSL1 and shows a very similar error message. You can try #5125 (comment) as workaraound.

    This resolved my issue, thank you (I'm on 2004 19041.208).

  19. MaxPowerWasTaken commented on May 5, 2020

    @MaxPowerWasTaken

    [Deleted my former question on getting this error in WSL1/Ubuntu20.04 as I realized it seems to be answered in https://github.com//issues/5125 and https://discourse.ubuntu.com/t/ubuntu-20-04-and-wsl-1/15291]

  20. fluffynuts commented on Jun 9, 2020

    @fluffynuts

    I can't even use apt-key add because it also bombs out. So here's a super-manual way to get this done:

    curl https://download.mono-project.com/repo/xamarin.gpg | gpg --dearmor > /etc/apt/trusted.gpg.d/mono.gpg
    

    Putting this here in case I'm not the only person for whom this is a mission :/

  21. neozeed commented on Jul 24, 2020

    @neozeed

    I have a Pi4 running Linux version 4.4.0-19041-Microsoft

    root@DESKTOP-BBF5IEP:~# curl -sL "http://keyserver.ubuntu.com/pks/lookup?op=get&search=0x5523BAEEB01FA116" | sudo apt-key add
    Illegal instruction (core dumped)

    I can't even apt-get update on either Ubuntu 18 or 20. At best the dirmngr crashes or trying to add keys results in an Illegal instruction. Is there anything about running on Cortex-A72's? This is feeling like PowerPC all over again...

  22. cesarau04 commented on Aug 13, 2020

    @cesarau04

    For those still with the same problem (I had it with MySQL 8 on a fresh Ubuntu 18.04), this solved my problem. In this case, it's Spotify but it works with any other repository.

    $ wget -q "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0xA87FF9DF48BF1C90" -O- | gpg --dearmor > spotify-A87FF9DF48BF1C90.gpg $ sudo mv spotify-A87FF9DF48BF1C90.gpg /etc/apt/trusted.gpg.d/

    1- download the key
    2- pass it to gpg to turn the ASCII into binary (unwrapping)
    3- move the new file to apt's keyring.

    After that, I was able to do apt update and to install.

    This worked for me in the lastest WSL ty

  23. brunoschmidt commented on Sep 4, 2020

    @brunoschmidt

    Just for reference.
    The bug affecting dirmngr is with WSL support for nanosleep.
    There is a workaround available here:
    #4898 (comment)

    It works for me.

  24. locked and limited conversation to collaborators on Sep 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions