Search Unity

Question Unity 2019.4 error - Failed to load Mono

Discussion in 'Linux' started by swiftering, Nov 8, 2020.

  1. swiftering

    swiftering

    Joined:
    Nov 8, 2020
    Posts:
    4
    I installed Unity 2019.4 on Ubuntu 16.04. I know that 16.04 is probably not supported anymore with 2019.4, but I have no time to upgrade Ubuntu. Just need a quick solution.

    I have installed packages mono-devel and mono-complete. But still Unity cannot start because of an error: "Failed to load Mono". Maybe I have to specify a path to it? Any ideas? Again, upgrading Ubuntu is not possible for me now. Thank you!

    P.S.: the same error appears with Unity 2020.1 and 2021.1 Aplha.
     
    Last edited: Nov 8, 2020
  2. MadWatch

    MadWatch

    Joined:
    May 26, 2016
    Posts:
    112
    I'm pretty sure Unity embed its own version of Mono. You don't have to install it on your system to get Unity to run (though you might need it for VS Code and the likes).

    I would assume that error means Unity's Mono cannot find something it needs. Maybe a library it depends on. But it's hard to tell with such a vague error message. When do you get this message exactly? Did you check the Editor log? It should be into ~/.config/unity3d. Did you try starting Unity from the command line and see what it says in the terminal?
     
  3. swiftering

    swiftering

    Joined:
    Nov 8, 2020
    Posts:
    4
    Thank you for helping me find the Editor.log file because I couldn't find it in ~/Unity/Hub/Editor directory. At the end of Editor.log file it says "Unable to load mono library from ~/Unity/Hub/Editor/2019.4.14f1/Editor/Data/MonoBleedingEdge/MonoEmbedRuntime/libmonobdwgc-2.0.so".

    But the strange thing is that the file libmonobdwgc-2.0.so is present in the specified directory.
     
    Last edited: Nov 12, 2020
  4. MadWatch

    MadWatch

    Joined:
    May 26, 2016
    Posts:
    112
    Unfortunately this "Unable to load" message doesn't gives much information. It might be a permission problem, or a missing dependency.

    Could you try executing this library? Like do ./libmonobdwgc-2.0.so in the terminal? It's certainly going to segfault if you do, that code isn't supposed to be executed on its own. But if it segfault (or crash in any other way) that means the library can be executed and load its dependencies. On the other hand, if you get an error message about a denied permission or a missing dependency then you will have a clue about what's going on.
     
  5. swiftering

    swiftering

    Joined:
    Nov 8, 2020
    Posts:
    4
    I tried executing "./libmonobdwgc-2.0.so" in the terminal. It says "Segmentation fault (core dumped)" without any other errors. File permissions are 755 and the owner of the file is me (as well as other Unity executables). I didn't install Unity as root.
     
  6. MadWatch

    MadWatch

    Joined:
    May 26, 2016
    Posts:
    112
    Could you please try ldd -v -r libmonobdwgc-2.0.so? If any lines says "not found" that means some dependencies are missing. If everything is OK then I have no idea what is going on :(
     
  7. swiftering

    swiftering

    Joined:
    Nov 8, 2020
    Posts:
    4
    Here is the output of ldd:

    linux-vdso.so.1 => (0x00007ffee3fb9000)
    libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f445d048000)
    librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f445ce40000)
    libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f445cc3b000)
    libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f445ca1d000)
    libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f445c807000)
    libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f445c43d000)
    /lib64/ld-linux-x86-64.so.2 (0x000055747d337000)

    Version information:
    ./libmonobdwgc-2.0.so:
    libgcc_s.so.1 (GCC_3.3) => /lib/x86_64-linux-gnu/libgcc_s.so.1
    libgcc_s.so.1 (GCC_3.0) => /lib/x86_64-linux-gnu/libgcc_s.so.1
    libdl.so.2 (GLIBC_2.2.5) => /lib/x86_64-linux-gnu/libdl.so.2
    librt.so.1 (GLIBC_2.2.5) => /lib/x86_64-linux-gnu/librt.so.1
    ld-linux-x86-64.so.2 (GLIBC_2.3) => /lib64/ld-linux-x86-64.so.2
    ld-linux-x86-64.so.2 (GLIBC_2.2.5) => /lib64/ld-linux-x86-64.so.2
    libpthread.so.0 (GLIBC_2.12) => /lib/x86_64-linux-gnu/libpthread.so.0
    libpthread.so.0 (GLIBC_2.3.3) => /lib/x86_64-linux-gnu/libpthread.so.0
    libpthread.so.0 (GLIBC_2.3.2) => /lib/x86_64-linux-gnu/libpthread.so.0
    libpthread.so.0 (GLIBC_2.2.5) => /lib/x86_64-linux-gnu/libpthread.so.0
    libm.so.6 (GLIBC_2.2.5) => /lib/x86_64-linux-gnu/libm.so.6
    libc.so.6 (GLIBC_2.15) => /lib/x86_64-linux-gnu/libc.so.6
    libc.so.6 (GLIBC_2.8) => /lib/x86_64-linux-gnu/libc.so.6
    libc.so.6 (GLIBC_2.3.3) => /lib/x86_64-linux-gnu/libc.so.6
    libc.so.6 (GLIBC_2.6) => /lib/x86_64-linux-gnu/libc.so.6
    libc.so.6 (GLIBC_2.7) => /lib/x86_64-linux-gnu/libc.so.6
    libc.so.6 (GLIBC_2.4) => /lib/x86_64-linux-gnu/libc.so.6
    libc.so.6 (GLIBC_2.3) => /lib/x86_64-linux-gnu/libc.so.6
    libc.so.6 (GLIBC_2.3.2) => /lib/x86_64-linux-gnu/libc.so.6
    libc.so.6 (GLIBC_2.3.4) => /lib/x86_64-linux-gnu/libc.so.6
    libc.so.6 (GLIBC_2.11) => /lib/x86_64-linux-gnu/libc.so.6
    libc.so.6 (GLIBC_2.2.5) => /lib/x86_64-linux-gnu/libc.so.6
    /lib/x86_64-linux-gnu/libm.so.6:
    libc.so.6 (GLIBC_PRIVATE) => /lib/x86_64-linux-gnu/libc.so.6
    libc.so.6 (GLIBC_2.2.5) => /lib/x86_64-linux-gnu/libc.so.6
    /lib/x86_64-linux-gnu/librt.so.1:
    libpthread.so.0 (GLIBC_2.3.2) => /lib/x86_64-linux-gnu/libpthread.so.0
    libpthread.so.0 (GLIBC_PRIVATE) => /lib/x86_64-linux-gnu/libpthread.so.0
    libpthread.so.0 (GLIBC_2.2.5) => /lib/x86_64-linux-gnu/libpthread.so.0
    libc.so.6 (GLIBC_2.14) => /lib/x86_64-linux-gnu/libc.so.6
    libc.so.6 (GLIBC_2.3.2) => /lib/x86_64-linux-gnu/libc.so.6
    libc.so.6 (GLIBC_PRIVATE) => /lib/x86_64-linux-gnu/libc.so.6
    libc.so.6 (GLIBC_2.2.5) => /lib/x86_64-linux-gnu/libc.so.6
    /lib/x86_64-linux-gnu/libdl.so.2:
    ld-linux-x86-64.so.2 (GLIBC_PRIVATE) => /lib64/ld-linux-x86-64.so.2
    libc.so.6 (GLIBC_PRIVATE) => /lib/x86_64-linux-gnu/libc.so.6
    libc.so.6 (GLIBC_2.2.5) => /lib/x86_64-linux-gnu/libc.so.6
    /lib/x86_64-linux-gnu/libpthread.so.0:
    ld-linux-x86-64.so.2 (GLIBC_2.2.5) => /lib64/ld-linux-x86-64.so.2
    ld-linux-x86-64.so.2 (GLIBC_2.3) => /lib64/ld-linux-x86-64.so.2
    ld-linux-x86-64.so.2 (GLIBC_PRIVATE) => /lib64/ld-linux-x86-64.so.2
    libc.so.6 (GLIBC_2.14) => /lib/x86_64-linux-gnu/libc.so.6
    libc.so.6 (GLIBC_2.3.2) => /lib/x86_64-linux-gnu/libc.so.6
    libc.so.6 (GLIBC_PRIVATE) => /lib/x86_64-linux-gnu/libc.so.6
    libc.so.6 (GLIBC_2.2.5) => /lib/x86_64-linux-gnu/libc.so.6
    /lib/x86_64-linux-gnu/libgcc_s.so.1:
    libc.so.6 (GLIBC_2.14) => /lib/x86_64-linux-gnu/libc.so.6
    libc.so.6 (GLIBC_2.2.5) => /lib/x86_64-linux-gnu/libc.so.6
    /lib/x86_64-linux-gnu/libc.so.6:
    ld-linux-x86-64.so.2 (GLIBC_2.3) => /lib64/ld-linux-x86-64.so.2
    ld-linux-x86-64.so.2 (GLIBC_PRIVATE) => /lib64/ld-linux-x86-64.so.2

    No "Not Found" lines. It's driving me crazy too. But thank you for help anyway.