package pcscd 1.8.10-1ubuntu1.1 failed to install/upgrade: subprocess installed post-installation script returned error exit status 1

Bug #1700104 reported by Diego Laverson Freitas
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
pcsc-lite (Ubuntu)
Won't Fix
Undecided
Unassigned

Bug Description

.

ProblemType: Package
DistroRelease: Ubuntu 14.04
Package: pcscd 1.8.10-1ubuntu1.1
ProcVersionSignature: Ubuntu 4.4.0-81.104~14.04.1-generic 4.4.67
Uname: Linux 4.4.0-81-generic x86_64
ApportVersion: 2.14.1-0ubuntu3.24
AptOrdering:
 pcscd: Install
 pcscd: Configure
Architecture: amd64
Date: Fri Jun 23 12:21:31 2017
DuplicateSignature: package:pcscd:1.8.10-1ubuntu1.1:subprocess installed post-installation script returned error exit status 1
ErrorMessage: subprocess installed post-installation script returned error exit status 1
InstallationDate: Installed on 2016-12-28 (177 days ago)
InstallationMedia: Ubuntu 14.04.5 LTS "Trusty Tahr" - Release amd64 (20160803)
RelatedPackageVersions:
 dpkg 1.17.5ubuntu5.7
 apt 1.0.1ubuntu2.17
SourcePackage: pcsc-lite
Title: package pcscd 1.8.10-1ubuntu1.1 failed to install/upgrade: subprocess installed post-installation script returned error exit status 1
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Diego Laverson Freitas (dlaverson) wrote :
tags: removed: need-duplicate-check
Revision history for this message
Kurt Woitke (woitke) wrote :

I have this same problem as well - and have had this problem for a few months. Every time the update fails it takes me here.

Revision history for this message
Ludovic Rousseau (ludovic-rousseau-gmail) wrote :

Diego, Kurt, Do you also have the problem if you do:
sudo apt install --reinstall pcscd

Revision history for this message
Ludovic Rousseau (ludovic-rousseau-gmail) wrote :

According to https://serverfault.com/questions/715064/failed-to-issue-method-call-unit-failed-to-load-no-such-file-or-directory or https://bugzilla.redhat.com/show_bug.cgi?id=955379 the error message you have "Failed to issue method call: No such file or directory" comes from systemd.

pcscd version 1.8.10 is from Ubuntu 14.04, an old Ubuntu version.
Are you trying to upgrade to Ubuntu 16.04? 18.04? something else?

Revision history for this message
Kurt Woitke (woitke) wrote :

Ludovic: I tried sudo apt install -- reinstall pcsd and got an internal error: No file name for pcscd:amd64

I am using 14.04 and have not upgraded (can't right now)

Revision history for this message
Ludovic Rousseau (ludovic-rousseau-gmail) wrote :

The correct command should be:
sudo apt install --reinstall pcscd

Use cut-and-paste to be sure to use the correct command and send back the correct results.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in pcsc-lite (Ubuntu):
status: New → Confirmed
Revision history for this message
Martin Pecka (peci1) wrote :

Reinstall doesn't help.

The problematic line is in postinst:

[ -x /bin/systemctl ] && [ -d /run/systemd/system ] && systemctl enable pcscd.socket

On my Trusty system, even calling this command from commandline (with sudo at systemctl) fails with the same error.

Using strace I found out that on this system it looks for the socket file in /lib/systemd/upstart/pcscd.socket, but the package only installs /lib/systemd/system/pcscd.socket. Manually copying this file to the correct directory fixes the issue (symlink is not enough since systemd doesn't follow them).

It's probably caused by this systemd change from December 2016: https://bugs.launchpad.net/ubuntu/trusty/+source/systemd/+bug/1616422/comments/21 . That would explain why I succeeded installing pcscd on trusty a few years ago, but now it's broken.

It could be fixed in debian/rules:
override_dh_auto_configure:
 dh_auto_configure -- $(EXTRA_CONFIGURE_ARGS) --with-systemdsystemunitdir=/lib/systemd/system --enable-usbdropdir=/usr/lib/pcsc/drivers $(shell dpkg-buildflags --export=configure)

There's a config named --with-systemdsystemunitdir which points to the ignored directory on trusty. Pointing it to /lib/systemd/upstart should IMO fix the bug.

Revision history for this message
Ludovic Rousseau (ludovic-rousseau-gmail) wrote :

Nice catch Martin!

The best would be to ask systemd what directory to use. So the same code can be used on Ubuntu and Debian.

I was not able to find a way to ask systemd where the unit files should be installed :-(
Any idea?

Revision history for this message
Ludovic Rousseau (ludovic-rousseau-gmail) wrote :

I have no problem with pcscd on Ubuntu 16.04 LTS:

$ sudo LANG=C apt install pcscd
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
  libccid
The following NEW packages will be installed:
  libccid pcscd
0 upgraded, 2 newly installed, 0 to remove and 8 not upgraded.
Need to get 141 kB of archives.
After this operation, 469 kB of additional disk space will be used.
Do you want to continue? [Y/n]
Get:1 http://fr.archive.ubuntu.com/ubuntu xenial-updates/universe amd64 libccid amd64 1.4.22-1ubuntu0.1 [85.8 kB]
Get:2 http://fr.archive.ubuntu.com/ubuntu xenial-updates/universe amd64 pcscd amd64 1.8.14-1ubuntu1.16.04.1 [55.7 kB]
Fetched 141 kB in 0s (1006 kB/s)
Selecting previously unselected package libccid.
(Reading database ... 223096 files and directories currently installed.)
Preparing to unpack .../libccid_1.4.22-1ubuntu0.1_amd64.deb ...
Unpacking libccid (1.4.22-1ubuntu0.1) ...
Selecting previously unselected package pcscd.
Preparing to unpack .../pcscd_1.8.14-1ubuntu1.16.04.1_amd64.deb ...
Unpacking pcscd (1.8.14-1ubuntu1.16.04.1) ...
Processing triggers for systemd (229-4ubuntu21.10) ...
Processing triggers for ureadahead (0.100.0-19) ...
Processing triggers for man-db (2.7.5-1) ...
Setting up libccid (1.4.22-1ubuntu0.1) ...
Setting up pcscd (1.8.14-1ubuntu1.16.04.1) ...
Processing triggers for systemd (229-4ubuntu21.10) ...
Processing triggers for ureadahead (0.100.0-19) ...

And also no problem on Ubuntu 18.04 LTS.

$ sudo LANG=C apt install pcscd
[sudo] Mot de passe de rousseau :
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
  pcscd
0 upgraded, 1 newly installed, 0 to remove and 19 not upgraded.
Need to get 57.9 kB of archives.
After this operation, 176 kB of additional disk space will be used.
Get:1 http://fr.archive.ubuntu.com/ubuntu bionic/universe amd64 pcscd amd64 1.8.23-1 [57.9 kB]
Fetched 57.9 kB in 0s (651 kB/s)
Selecting previously unselected package pcscd.
(Reading database ... 172785 files and directories currently installed.)
Preparing to unpack .../pcscd_1.8.23-1_amd64.deb ...
Unpacking pcscd (1.8.23-1) ...
Setting up pcscd (1.8.23-1) ...
Created symlink /etc/systemd/system/sockets.target.wants/pcscd.socket -> /lib/systemd/system/pcscd.socket.
Processing triggers for ureadahead (0.100.0-20) ...
Processing triggers for systemd (237-3ubuntu10.9) ...
Processing triggers for man-db (2.8.3-2ubuntu0.1) ...

I do not plan to fix a bug in Ubuntu 14.04 only. Ubuntu 14.04 should be UN-maintained after April 2019 (in 4 months). https://www.ubuntu.com/about/release-cycle

The best solution may be to upgrade your system.

Revision history for this message
Joy Latten (j-latten) wrote :

Fixed in subsequent release. Closing.

Changed in pcsc-lite (Ubuntu):
status: Confirmed → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.