0

I am trying to build some code that uses CMake to find and link to Mono. It is trying to link to libmono.so and libmono-2.0.so.

I have installed mono-complete (which installs mono-devel) without errors and the files still do not exist. Using dpkg on mono-devel shows that these libraries are not part of the installation. So where do I get them?

Using locate shows some Steam games have the library so they clearly exist...somewhere.

How do I install these development libraries on my machine?

AlastairG
  • 348
  • 3
  • 15

1 Answers1

1
  1. Check in which package this file exists: apt-file search libmono-2.0.so
libmono-2.0-1: /usr/lib/libmono-2.0.so.1  
libmono-2.0-1: /usr/lib/libmono-2.0.so.1.0.0
libmono-2.0-dev: /usr/lib/libmono-2.0.so
  1. Check if you have installed this package: apt policy libmono-2.0
libmono-2.0-1:
  Installed: (none)
  Candidate: 5.18.0.240+dfsg-2ubuntu2
  Version table:
     5.18.0.240+dfsg-2ubuntu2 500
        500 http://ubuntu.task.gda.pl/ubuntu disco/universe amd64 Packages
libmono-2.0-dev:
  Installed: 5.18.0.240+dfsg-2ubuntu2
  Candidate: 5.18.0.240+dfsg-2ubuntu2
  Version table:
 *** 5.18.0.240+dfsg-2ubuntu2 500
        500 http://ubuntu.task.gda.pl/ubuntu disco/universe amd64 Packages
        100 /var/lib/dpkg/status
  1. If you haven't installed, install it sudo apt install libmono-2.0

My output is from Ubuntu 19.04 but on Ubuntu 18 you will be have the same package names.

mariaczi
  • 246
  • 1
  • 5
  • I can see I have libmono-2.0.so but I still don't have libmono.so. `apt-file search libmono.so` returns nothing at all. Maybe CMake shouldn't be looking for libmono.so but then why is `find_package("mono")` listing it? – AlastairG Jul 26 '19 at 13:18
  • Also libmono.so exists for various Steam games. – AlastairG Jul 26 '19 at 13:22
  • Maybe the source of code you are trying build is a little old and require older mono library. You can try to create symlink libmono.so to linking to libmono-2.0.so. If the code require this version of mono library probably will be work after compile. – mariaczi Jul 26 '19 at 13:26
  • I have dug a bit deeper and it looks like a CMake syntax error. The library `mono::mono-2.0` is requiring an imported target `mono` to link to `libmono-2.0.so`. the target is missing. Thanks for all your help that set me on the right path. – AlastairG Jul 26 '19 at 13:29