Search Unity

DllNotFoundException libMonoPosixHelper.so

Discussion in 'Editor & General Support' started by AzeExMachina, Jun 26, 2018.

  1. AzeExMachina

    AzeExMachina

    Joined:
    Jan 30, 2016
    Posts:
    14
    Hi everyone, I'm trying to port my project from Unity 2017.1.0 to Unity 2018.1.5 for Linux (working on Fedora 27). The project is working perfectly fine in the old version, however in this one, without changing anything, I'm encountering this issue

    System.DllNotFoundException: .../Editor/Data/Managed/../lib/libMonoPosixHelper.so
    at (wrapper managed-to-native) System.IO.Compression.DeflateStreamNative.CreateZStream(System.IO.Compression.CompressionMode,bool,System.IO.Compression.DeflateStreamNative/UnmanagedReadOrWrite,intptr)

    The thing is, under Editor/Managed/ I only have one folder named UnityEngine, which doens't have any subfolders. Also, even outputting the log on a terminal, it seems that Unity is searching the lib in a folder named "..", is it a bug on Unity 2018 or do I have to change some setting in Unity? (Allow 'unsafe' code is enabled, if it has something to do).

    Thanks for your help!
     
  2. AzeExMachina

    AzeExMachina

    Joined:
    Jan 30, 2016
    Posts:
    14
    As a workaround I went to my ../Editor/Data/ folder in Unity, searched for all the "config" files and changed all occurencies of "target=$mono_libdir/libMonoPosixHelper.so" to "target=/usr/lib64/libMonoPosixHelper.so", this fixed my issues but I don't know if it's a proper solution.
     
    Ekwav likes this.
  3. Piperfw

    Piperfw

    Joined:
    Jul 24, 2018
    Posts:
    1
    I've also encountered this System.DllNotFoundException for libMonoPosixHelper.so on Linux (Arch 14.7.8) with Unity 2017.4.4. It appears to be thrown when attempting to use the GZipStream class.

    The missing file was in /opt/Unity/Editor/Data/Mono/lib/ so I made a Data/lib directory (which didn't exist for me either) and copied the .so file into that, hoping to fix the dependency issue without creating any new ones. It seems to have worked.
     
  4. Ekwav

    Ekwav

    Joined:
    Jun 27, 2015
    Posts:
    4
    Also encountered this in unity 2018.2.3f1 Linux editor when trying to setup a websocket server with https://github.com/sta/websocket-sharp
    None of your workarounds worked for me :/
    After updating to 2018.2.4f1 and copying the whole Data/Mono/lib folder to /Data/lib and restarting It was gone.
     
    Last edited: Aug 25, 2018
  5. Rs

    Rs

    Joined:
    Aug 14, 2012
    Posts:
    74
    I have this in Unity 2019.3.3f1 under Linux Debian 9. Other project work fine, it seems to happen only when I use System.IO.Serial. @AzeExMachina 's solution is something I'd like to avoid as it looks messy and don't want me or my colleagues to have to remember this for every version of unity we install.

    And copying the so files to a Data/lib folder, as @Piperfw said, didn't work for me. I also tried to make a soft link to the Data/MonoBleedingEdge/lib called lib, placed in the Data folder but it didn't work either.

    Has anybody tried this? https://github.com/Elringus/NaninovelWeb/issues/114

    So did anybody come up with some other solutions? Would love some pointers here.