1. Uninstall the original OpenSC in the system: $ sudoapt-getremovelibopensc2 $ sudoapt-getremovelibopenct12. install the software package that OpenSC depends on: $ sudoapt-getinstallbuild-essential $ sudoapt-getinstalllibssl
1. Uninstall the original OpenSC in the system:
$ Sudo apt-get remove libopensc2
$ Sudo apt-get remove libopenct1
2. install the software package on which OpenSC depends:
$ Sudo apt-get install build-essential
$ Sudo apt-get install libssl-dev
$ Sudo apt-get install libpcsclite-dev
$ Sudo apt-get install pcscd
$ Sudo apt-get install automake
$ Sudo apt-get install autoconf
$ Sudo apt-get install autogen
$ Sudo apt-get install libtool
Note: If the installation of pcscd fails, use the source code for installation:
1) uninstall installed pcsclite:
$ Sudo apt-get remove libpcsclite-dev
2) from the http://pcsclite.alioth.debian.org/download the pcsclite- .tar.bz2 source code package;
3) install pcsclite:
$ Tar xf pcsclite- .tar.bz2
$ Cd pcsc-lite-version
$./Configure
Note: The following error message is displayed: configure: error: install libhal-dev or use-disable-libhal.
First select install: $ sudo apt-get install libhal-dev
$ Make
$ Sudo make install
3. download the latest opensc- .tar.gz from the http://www.opensc-project.org/opensc;
4. Install OpenSC:
$./Bootstrap
$./Configure -- enable-openssl -- enable-pcsc
Note: The following error message is displayed: configure: error: xsl-stylesheets are required for svn build with man.
Add the-disable-man option: $./configure -- enable-openssl -- enable-pcsc -- disable-man
$ Make
$ Sudo make install
5. Run opensc-tool or pkcs15-init tool,
1) the following error is returned:
Error while loading shared libraries:
Libpkcs15init. so.2: cannot open shared object file: No such file or directory
Reload the index of the dynamically connected database: $ sudo ldconfig
2) the following error is returned:
No smart card readers found
Start the pcscd service (with output information): $/usr/local/sbin/pcscd-a-d-f
3) the following error occurs:
00001001 hotplug_libhal.c: 527: HPRegisterForHotplugEvents ()
No bundle files in pcsc drivers directory:/usr/local/pcsc/drivers
Install the ccid DRIVER:
1> download the ccid- .tar.bz2 source code package from http://pcsclite.alioth.debian.org/
2> $ tar xf ccid- .tar.bz2
3> $ cd ccid-version number
4> $./configure
Note: The following error message is displayed:
Configure: error: usb. h not found, install libusb or
Use./configure LIBUSB_CFLAGS =...
Install libusb-dev: $ sudo apt-get install libusb-dev
5> $ make
6> $ sudo make install
Start the pcscd service (with output information): $/usr/local/sbin/pcscd-a-d-f
Start successfully. Press Ctrl + C to terminate the process. This time, start from the background: $/usr/local/sbin/pcscd-a-d.