petek, 11. februar 2022

Java: No PC/SC library found on this system on Linux

 If you get "No PC/SC library found on this system" when trying to work with a SmartCard via javax.smartcardio API, then you need to install package libpcsclite1 (or whatever package contains libpcsclite.so.1 library) then you need to do one of the following:

- sudo ln -s /usr/lib/x86_64-linux-gnu/libpcsclite.so.1 /usr/local/lib64/libpcsclite.so

- sudo ln -s /usr/lib/x86_64-linux-gnu/libpcsclite.so.1 /usr/lib64/libpcsclite.so

libpcsclite.so.1 is located in /usr/lib/x86_64-linux-gnu on my system.

If you are using 32-bit system then you do one of the following:

- sudo ln -s LOCATION_OF_libpcsclite.so.1 /usr/local/lib/libpcsclite.so

- sudo ln -s LOCATION_OF_libpcsclite.so.1 /usr/lib/libpcsclite.so

If you are on SunOS then one of the following:

- sudo ln -s LOCATION_OF_libpcsclite.so.1 /usr/local/lib/64/libpcsclite.so

- sudo ln -s LOCATION_OF_libpcsclite.so.1 /usr/lib/64/libpcsclite.so

Maybe libpcsclite.so.1 has a different name on SunOS. I don't have access to one, so I'm not sure.