Install OpenSC in Ubuntu

Source: Internet
Author: User
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.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.