Vivox DllNotFoundException when building Linux Server

I have Vivox v16.5.0 in my project, and when I do my Linux dedicated game server build, I get an error:

Here’s the text copy/paste of the error as well:

DllNotFoundException: libVivoxNative assembly:<unknown assembly> type:<unknown type> member:(null)
Unity.Services.Vivox.VivoxCoreInstancePINVOKE+SWIGExceptionHelper..cctor () (at ./Library/PackageCache/com.unity.services.vivox@16.5.0/Runtime/SWIG/VivoxCoreInstancePINVOKE.cs:129)
Rethrow as TypeInitializationException: The type initializer for 'SWIGExceptionHelper' threw an exception.
Unity.Services.Vivox.VivoxCoreInstancePINVOKE..cctor () (at ./Library/PackageCache/com.unity.services.vivox@16.5.0/Runtime/SWIG/VivoxCoreInstancePINVOKE.cs:149)
Rethrow as TypeInitializationException: The type initializer for 'Unity.Services.Vivox.VivoxCoreInstancePINVOKE' threw an exception.
Unity.Services.Vivox.AudioTaps.VivoxAudioProcessor..ctor (Unity.Services.Vivox.AudioTaps.VivoxAudioTap owner) (at ./Library/PackageCache/com.unity.services.vivox@16.5.0/Runtime/AudioTaps/VivoxAudioProcessor.cs:31)
Unity.Services.Vivox.AudioTaps.VivoxAudioTap..ctor () (at ./Library/PackageCache/com.unity.services.vivox@16.5.0/Runtime/AudioTaps/VivoxAudioTap.cs:127)
Unity.Services.Vivox.AudioTaps.VivoxCaptureSourceTap..ctor () (at ./Library/PackageCache/com.unity.services.vivox@16.5.0/Runtime/AudioTaps/VivoxCaptureSourceTap.cs:24)

How can this error be fixed?

Note that the build does complete, but I do want to get rid of this error because I don’t know what adverse effects there might be due to a missing DLL.

The error suggests that some Vivox component is included somewhere in the content for the Linux Server build or is for some other reason being accessed during the build. Vivox isn’t supported on Linux targets. If those components will not used by the server, you should consider removing them so they’re no longer a factor. You basically want to avoid those components being loaded in the editor while a Linux build target is active, since they seem to refer back to the P/Invoke management type which will try and initialize P/Invoke binding to a non-existent native library.

Thank you! I didn’t realize Vivox wasn’t supported on Linux.

The error was caused by a VivoxCaptureSourceTap component being included in the build, in a client scene. I modified my project to exclude that client scene in the server build and the error is gone. I also used scripting defines to remove any references to Vivox in my own scripts if targeting Linux.