On what I understand, it doesn't seems to be usefull to add "lib" before the library name (as it is a standard naming convensions on linux for library files).
When running on Linux or macOS, the runtime will try prepending lib and appending the canonical shared library extension. On these OSes, library name variations are tried in the following order
Source : Library name variations
It can result in having this error message with a double "liblib" (liblibtss2-tcti-tabrmd.so) when the exact file is not found (for example if the library file is libtss2-tcti-tabrmd.so.0, or libtss2-tcti-tabrmd.so.0.0.0):
Exception while loading tpm2-abrmd: System.DllNotFoundException: Unable to load shared library 'libtss2-tcti-tabrmd.so' or one of its dependencies. In order to help diagnose loading problems, consider setting the LD_DEBUG environment variable: liblibtss2-tcti-tabrmd.so: cannot open shared object file: No such file or directory
My quickfix is to :
apt-get install -y libtss2-tcti-tabrmd0 will create libtss2-tcti-tabrmd.so.0 (that is not found with this dll import and gives the message above).
cp /usr/lib/x86_64-linux-gnu/libtss2-tcti-tabrmd.so.0 /usr/lib/x86_64-linux-gnu/libtss2-tcti-tabrmd.so or cp /usr/lib/x86_64-linux-gnu/libtss2-tcti-tabrmd.so.0 /usr/lib/x86_64-linux-gnu/liblibtss2-tcti-tabrmd.so
https://github.com/microsoft/TSS.MSR/blob/60c26b51cf09a11cd831d8c9fd668b92da0c45a0/TSS.NET/TSS.Net/LinuxTpmDevice.cs#L25
On what I understand, it doesn't seems to be usefull to add "lib" before the library name (as it is a standard naming convensions on linux for library files).
It can result in having this error message with a double "liblib" (
liblibtss2-tcti-tabrmd.so
) when the exact file is not found (for example if the library file islibtss2-tcti-tabrmd.so.0
, orlibtss2-tcti-tabrmd.so.0.0.0
):My quickfix is to :
apt-get install -y libtss2-tcti-tabrmd0
will createlibtss2-tcti-tabrmd.so.0
(that is not found with this dll import and gives the message above).cp /usr/lib/x86_64-linux-gnu/libtss2-tcti-tabrmd.so.0 /usr/lib/x86_64-linux-gnu/libtss2-tcti-tabrmd.so
orcp /usr/lib/x86_64-linux-gnu/libtss2-tcti-tabrmd.so.0 /usr/lib/x86_64-linux-gnu/liblibtss2-tcti-tabrmd.so
Is there a better workaround?
Thank you in advance