Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TSS.NET does not work on Linux - Unable to load DLL 'tbs.dll': The specified module or one of its dependencies could not be found. #11

Closed
2 of 3 tasks
CIPop opened this issue Oct 7, 2017 · 4 comments

Comments

@CIPop
Copy link
Member

CIPop commented Oct 7, 2017

Trying using TSS.NET in a netcoreapp2.1 on Ubuntu 16.04 Linux I'm getting:

System.DllNotFoundException: Unable to load DLL 'tbs.dll': The specified module or one of its dependencies could not be found.
 (Exception from HRESULT: 0x8007007E)
   at Tpm2Lib.TbsWrapper.NativeMethods.Tbsi_Context_Create(TBS_CONTEXT_PARAMS& ContextParams, UIntPtr& Context)
   at Tpm2Lib.TbsDevice.Connect()
   at Microsoft.Azure.Devices.Tpm.TpmDevice..ctor(Tpm2Device tpmDevice, UInt32 logicalDeviceId, Byte[] ekAuth, Action`2 initializeAction) in /home/cristian/int/DpsPoc/DpsPocLib/Tpm/TpmDevice.cs:line 56

Unhandled Exception: System.DllNotFoundException: Unable to load DLL 'tbs.dll': The specified module or one of its dependencies could not be found.
 (Exception from HRESULT: 0x8007007E)

@amarochk and I discussed offline that the steps to enable this are:

  • Create a new class similar to TbsDevice
  • Instead of sending TPM command buffer via the TBS API, send it to /dev/tpm_n_ (n being the TPM device ID).
  • Packaging with multi target for RID == linux-x64
@CIPop
Copy link
Member Author

CIPop commented Oct 7, 2017

@amarochk please verify above and add more details required for an implementation.

/cc @tameraw @jasmineymlo

@rquackenbush
Copy link

rquackenbush commented Jun 6, 2019

I'm seeing this in my environment. I'm using version 2.1.1 of the Microsoft.TSS nuget package and am running on Ubuntu 18.04 LTS.

Unhandled Exception: System.DllNotFoundException: Unable to load shared library 'tbs.dll' or one of its dependencies. In order to help diagnose loading problems, consider setting the LD_DEBUG environment variable: libtbs.dll: cannot open shared object file: No such file or directory
   at Tpm2Lib.TbsWrapper.NativeMethods.Tbsi_Context_Create(TBS_CONTEXT_PARAMS& ContextParams, UIntPtr& Context)
   at Tpm2Lib.TbsDevice.Connect() in e:\git\TSS.MSR\TSS.NET\TSS.Net\TbsDevice.cs:line 44

I don't see tbs.dll anywhere in the nuget package. What am I doing wrong?

@amarochk
Copy link
Contributor

amarochk commented Jun 6, 2019

You are probably trying instantiate the TbsDevice class, while on Linux you need to use LinuxTpmDevice.

@rquackenbush
Copy link

That was it! Thanks for your quick response.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants