Page MenuHome GnuPG

gpgconf fail to start gpg-agent
Closed, InvalidPublic

Description

gpgconf appears to be broken in v2.1.10. This command worked fine in v2.1.9.

gpgconf --launch gpg-agent

but for 2.1.10.

gpgconf --launch gpg-agent

gpgconf: error running '/usr/local/bin/gpg-connect-agent': exit status 1
gpgconf: error running '/usr/local/bin/gpg-connect-agent NOP': General error

echo $?

1

This might be useful for debugging.

command used for generated Makefile

./configure --prefix=/usr/local --build=x86_64-pc-linux-gnu

gpgconf --version

gpgconf (GnuPG) 2.1.10
Copyright (C) 2015 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

gpg-connect-agent --version

gpg-connect-agent (GnuPG) 2.1.10
Copyright (C) 2015 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Home: ~/.gnupg

uname -a

Linux kuro 4.2.0-22-generic #27-Ubuntu SMP Thu Dec 17 22:57:08 UTC 2015 x86_64
x86_64 x86_64 GNU/Linux

libassuan-config --version

2.4.2

libgcrypt-config --version

1.6.3

lsb_release -a

No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 15.10
Release: 15.10
Codename: wily

Details

Version
2.1.10

Event Timeline

nuimk added a project: Bug Report.
nuimk added a subscriber: nuimk.

Please run

gpg-connect-agent -v

getinfo version
/bye

gpg-connect-agent -v

gpg-connect-agent: no running gpg-agent - starting '/usr/local/bin/gpg-agent'
gpg-connect-agent: waiting for the agent to come up ... (5s)
gpg-connect-agent: waiting for the agent to come up ... (4s)
gpg-connect-agent: waiting for the agent to come up ... (3s)
gpg-connect-agent: waiting for the agent to come up ... (2s)
gpg-connect-agent: waiting for the agent to come up ... (1s)
gpg-connect-agent: can't connect to the agent: IPC connect call failed
gpg-connect-agent: error sending standard options: No agent running

Start the agent this way:

/usr/local/bin/gpg-agent -v --daemon

errors?

/usr/local/bin/gpg-agent -v --daemon

gpg-agent[2676]: listening on socket '/home/nui/.gnupg/S.gpg-agent'
/usr/local/bin/gpg-agent: relocation error: /usr/local/bin/gpg-agent: symbol
assuan_sock_set_flag, version LIBASSUAN_1.0 not defined in file libassuan.so.0
with link time reference

Yes, with exit code = 127

That is a build/runtime linker problem. You have build against a newer
libassuan version than installed on your system. Use ldconfig or as a quick
workaround set LD_LIBRARY_PATH to point to the place where libassuan has been
installed.

assuan_sock_set_flag was introduced with libassuan 2.4.0 which also changed also
chnaged the minor SO number.

That works.
Thanks for your kind support.

nuimk removed a project: Bug Report.
In T2203#88661, @nuimk wrote:

/usr/local/bin/gpg-agent -v --daemon

Hi Guys I would like to submit this issue for me, I done around 10 hours already on this issue finding a way to make gpg-agent properly running with gpg2.
When I run the command above I experienced

gpg-agent[72463]: error binding socket to '/dev/shm/S.gpg-agent': No such file or directory

And many others.

The difference was a path to gpg-agent not the :

/usr/local/bin/gpg-agent -v --daemon

but

/usr/local/Cellar/gnupg/2.2.12/bin/gpg-agent

I hope I can get this over, since my Mac is running it but my colleagues Mac is tough nut.

When I did

brew reinstall gpg2

I saw this today

Target /usr/local/bin/gpg-agent
already exists. You may want to remove it:
  rm '/usr/local/bin/gpg-agent'

To force the link and overwrite all conflicting files:
  brew link --overwrite gnupg

To list all files that would be deleted:
  brew link --overwrite --dry-run gnupg

Possible conflicting files are:
/usr/local/bin/gpg-agent -> /usr/local/MacGPG2/bin/gpg-agent
==> Caveats

And I did link it and remove. Now I wonder about the start of gpg2-agent or something like that

Okay I think I got the root of the issue

mkdir: /dev/shm/.ssh-0: Operation not permitted

when running

mkdir -p "$HOME/.ssh" "$HOME/.gnupg"
chmod 0700 "$HOME/.ssh" "$HOME/.gnupg"

with or without sudo
so meanwhile need to switch this, & I also reopened the issue because I would need to put all the sources into new issue from the old one and I think this will be easier to check

Cocoanino updated the task description. (Show Details)

Your home is under /dev/ - really? Please run

echo $HOME ;  id

Thanks @werner I will do tonight when connecting to my team mates PC.
Btw meanwhile I actually felt like I need to open next issue where I explain all my details

https://dev.gnupg.org/T4319
:)

So the output of this was

/Users/carlocardenas
uid=501(carlocardenas) gid=20(staff) groups=20(staff),12(everyone),61(localaccounts),79(_appserverusr),80(admin),81(_appserveradm),98(_lpadmin),701(com.apple.sharepoint.group.1),33(_appstore),100(_lpoperator),204(_developer),250(_analyticsusers),395(com.apple.access_ftp),398(com.apple.access_screensharing),399(com.apple.access_ssh-disabled)

@werner

This seems to be closely related to T4319 and due to to some, ahem, interesting configuration.