Discord Bot: can not find any opus.dll to work in a linux environment

255 views Asked by At

I made a bot in C# for Discord and I would like to make it play music. I made it work on Windows host, but on linux, the opus.dll file can not be loaded.

On Windows I got the dlls from the official discord.net repo, but on Linux that libraries do not work.

I tried to build from source the opus library but the same result happens. I place the opus file in the same directory as the executable and on Windows it works, but on linux it does not.

Why might this happen ?

1

There are 1 answers

4
WQYeo On BEST ANSWER

DLL are generally meant for Window Systems, you would need to download a seperate package dedicated for Linux, usually so files.

Based on what I found for Ubuntu, you can do:

sudo apt-get install libopus-dev

Then, assuming your using P/Invoke

[DllImport("libopus")]
// Functions you would like to import...

Here is something that might help too.