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

Shared library issues with DotNet Core 2.1 under Linux #180

Open
daniel-sherwood opened this issue Jun 25, 2019 · 1 comment
Open

Shared library issues with DotNet Core 2.1 under Linux #180

daniel-sherwood opened this issue Jun 25, 2019 · 1 comment

Comments

@daniel-sherwood
Copy link

daniel-sherwood commented Jun 25, 2019

Hi

I'm trying to use 4.1.0.31 this with DotNet Core 2.1 under Linux and get the following error at startup.

Unhandled Exception: System.TypeInitializationException: The type initializer for 'ZeroMQ.lib.zmq' threw an exception. ---> System.DllNotFoundException: Unable to load shared library '__Internal' or one of its dependencies. In order to help diagnose loading problems, consider setting the LD_DEBUG environment variable: lib__Internal: cannot open shared object file: No such file or directory

Is this supposed to work?

Cheers

Daniel

@cezarypiatekGC
Copy link
Contributor

cezarypiatekGC commented Dec 19, 2019

It looks like Platform.LoadUnmanagedLibrary() is not called for NetStandard and .NET Core

#if !NETSTANDARD && !NETCORE

I was able to make it work by putting the native library in the same folder as the main app (not in the architecture subfolder as it was for full framework).

EDIT: You can also fix the issue by manually installing libzmq3-dev package on the linux machine:

echo 'deb http://download.opensuse.org/repositories/network:/messaging:/zeromq:/release-stable/Debian_10/ /' > /etc/apt/sources.list.d/network:messaging:zeromq:release-stable.list 
wget -nv https://download.opensuse.org/repositories/network:messaging:zeromq:release-stable/Debian_10/Release.key -O Release.key 
apt-key add - < Release.key 
apt-get -y update
apt-get -y install libzmq3-dev=4.3.2 

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

2 participants