Bug 162931 - failed to open driver `libpcsclite.so'
Summary: failed to open driver `libpcsclite.so'
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: gnupg
Version: 4
Hardware: i386
OS: Linux
medium
low
Target Milestone: ---
Assignee: Nalin Dahyabhai
QA Contact: Mike McLean
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2005-07-11 18:20 UTC by udo
Modified: 2023-09-02 08:38 UTC (History)
1 user (show)

Fixed In Version: 1.4.3-1
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2007-01-22 20:25:31 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description udo 2005-07-11 18:20:23 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.8) Gecko/20050511 Firefox/1.0.4

Description of problem:
Link for libpcsclite.so for gnupg is not installed:

[root@epia .gnupg]# gpg --card-status
gpg: apdu_open_reader: failed to open driver `libpcsclite.so': libpcsclite.so: cannot open shared object file: No such file or directory
gpg: card reader not available
gpg: OpenPGP card not available: general error
[root@epia .gnupg]# locate libpcsclite.so
/usr/lib/libpcsclite.so.0.0.1
/usr/lib/libpcsclite.so.0
[root@epia .gnupg]# ls -l /usr/lib/libpcs*
lrwxrwxrwx  1 root root    20 Jul  7 18:17 /usr/lib/libpcsclite.so.0 -> libpcsclite.so.0.0.1
-rwxr-xr-x  1 root root 33364 May 20 11:01 /usr/lib/libpcsclite.so.0.0.1


Version-Release number of selected component (if applicable):
pcsc-lite-libs-1.2.0-12

How reproducible:
Always

Steps to Reproduce:
gpg --card-status
locate libpcsclite.so
ls -l /usr/lib/libpcs*


Actual Results:  [root@epia .gnupg]# gpg --card-status
gpg: apdu_open_reader: failed to open driver `libpcsclite.so': libpcsclite.so: cannot open shared object file: No such file or directory
gpg: card reader not available
gpg: OpenPGP card not available: general error
[root@epia .gnupg]# locate libpcsclite.so
/usr/lib/libpcsclite.so.0.0.1
/usr/lib/libpcsclite.so.0
[root@epia .gnupg]# ls -l /usr/lib/libpcs*
lrwxrwxrwx  1 root root    20 Jul  7 18:17 /usr/lib/libpcsclite.so.0 -> libpcsclite.so.0.0.1
-rwxr-xr-x  1 root root 33364 May 20 11:01 /usr/lib/libpcsclite.so.0.0.1



Expected Results:  gnupg should be able to find libpcsclite

Additional info:

It's easy to fix by creating the link by hand but it's somethign that should be in the rpm

Comment 1 Nalin Dahyabhai 2005-07-29 20:11:38 UTC
If the PC/SC shared library is meant to be used as a plugin, then gnupg can't be
expected to be its only user, so we need to reassign this bug to the pcsc-lite
package.

Comment 2 Nalin Dahyabhai 2005-07-29 20:28:06 UTC
Oops, should have made it more explicit: is the PC/SC shared library intended to
be used as a plugin?  If not, then detecting (at build-time, I guess) which
shared library gnupg should instead be trying to load will be difficult because
pcsc-lite is in extras and therefore can't be depended on to be installed when
building gnupg for core.

Comment 3 udo 2005-07-30 06:09:30 UTC
For now at least the correct link(s)in the PC/SC lib rpm will suffice?

Comment 4 Nalin Dahyabhai 2005-08-03 23:32:32 UTC
Yes, moving the symlink from pcsc-lite-libs-devel to pcsc-lite-libs would make
it work.  If the library's meant to be loaded like that, it'd be the correct fix.

Comment 5 Christian Iseli 2007-01-22 11:53:54 UTC
This report targets the FC3 or FC4 products, which have now been EOL'd.

Could you please check that it still applies to a current Fedora release, and
either update the target product or close it ?

Thanks.

Comment 6 udo 2007-01-22 19:22:53 UTC
[root@epia ~]# gpg --card-status
winscard_clnt.c:320:SCardEstablishContextTH() Cannot open public shared file:
/var/run/pcscd.pub
gpg: pcsc_establish_context failed: no service (0x8010001d)
gpg: card reader not available
gpg: OpenPGP card not available: general error
[root@epia ~]#  locate libpcsclite.so
/usr/lib/libpcsclite.so.1.0.0
/usr/lib/libpcsclite.so.1

So gnupg can find the lib. This is FC6 now.

Comment 7 Nalin Dahyabhai 2007-01-22 20:25:31 UTC
This became an option ('pcsc-driver'), I think in version 1.4.3, defaulting to
the right value.

Comment 8 Beto Hydroxy Butyrate 2023-07-31 05:46:09 UTC
I'm hitting this bug.
I'm on FC38, Silverblue / rpm-ostree.
I seem to flip-flop between `gpg --card-status` working, depending on if i have done an `rpm-ostree update; reboot` or not.

Today, it is not working again.
```
$ rpm-ostree status
State: idle
Deployments:
● fedora:fedora/38/x86_64/sericea
                  Version: 38.20230729.0 (2023-07-29T00:41:32Z)
                   Commit: 7f82bc5698fa50f39f67558cc21331dded83cb765050fd437a1de632558172b6
             GPGSignature: Valid signature by 6A51BBABBA3D5467B6171221809A8D7CEB10B464

  fedora:fedora/38/x86_64/sericea
                  Version: 38.20230720.0 (2023-07-20T01:05:30Z)
                   Commit: c23f856fa18c0a69751dfabd406275ad126af8dec1d29f68fb79ae6866797b01
             GPGSignature: Valid signature by 6A51BBABBA3D5467B6171221809A8D7CEB10B464

$ gpg --card-status
gpg: selecting card failed: Service is not running
gpg: OpenPGP card not available: Service is not running

2023-07-31 15:44:08 scdaemon[16164] apdu_open_reader: failed to open driver '/usr/lib64/libpcsclite.so.1': /usr/lib64/libpcsclite.so.1: cannot open shared object file: No such file or directory

$ ldd /usr/lib64/libpcsclite.so.1
	linux-vdso.so.1 (0x00007ffd6e9af000)
	libc.so.6 => /lib64/libc.so.6 (0x00007f3c11251000)
	/lib64/ld-linux-x86-64.so.2 (0x00007f3c11449000)
```

Comment 9 Nalin Dahyabhai 2023-07-31 14:10:52 UTC
Hi Beto, I think you'll be better off opening a new bug report for gnupg2, which would be steered to the current maintainers of the packages.  It's been a long time since I last looked at these bits.

Comment 10 Beto Hydroxy Butyrate 2023-09-02 08:38:34 UTC
Hi Nalin. Thanks for your response.
I gave up on `sericea`/`silverblue`, and "normal" fc38 works correctly for me.


Note You need to log in before you can comment on or make changes to this bug.