3

I'm trying to get mod_mono working on CentOS 6.5. I have many failed attempts where either something does not compile at all or fails when trying to run a website. I've tried both latest from git, tarball from git releases, and tarballs of different versions from http://download.mono-project.com/sources/mono/. All fail in one way or another.

So far the "most" working solution I've found is to download this: http://download.pokorra.de/mono/tarballs/mono-3.2.6.tar.bz2 and use latest xsp and mod_mono from under mono-project site.

Problem is even though mod_mono installation went ok, i get this in httpd/error_log:

[error] Failed running '/usr/lib/pkgconfig/../../bin/mod-mono-server2 --filename /tmp/mod_mono_server_global --nonstop --master (null) (null) (null) (null) (null) (null) (null) (null)'. Reason: No such file or directory

So mod_mono does not run. What could be causing this? There are no errors in make or make install output.

Most importantly:

locate mod-mono-server
/usr/local/src/xsp-3.0.11/man/mod-mono-server.1
/usr/local/src/xsp-3.0.11/scripts/mod-mono-server
/usr/local/src/xsp-3.0.11/scripts/mod-mono-server2
/usr/local/src/xsp-3.0.11/scripts/mod-mono-server4
/usr/local/src/xsp-3.0.11/src/Mono.WebServer.Apache/mod-mono-server2.exe
/usr/local/src/xsp-3.0.11/src/Mono.WebServer.Apache/mod-mono-server2.exe.mdb
/usr/local/src/xsp-3.0.11/src/Mono.WebServer.Apache/mod-mono-server4.exe
/usr/local/src/xsp-3.0.11/src/Mono.WebServer.Apache/mod-mono-server4.exe.mdb
/usr/local/src/xsp-3.0.11/test/mod-mono-server.exe.config
/usr/share/man/man1/mod-mono-server.1

There are no mod-mono-servers anywhere else except under sources.

Mono itself is fine, I can run a small console application using mono mytestapp.exe.

I installed mod_mono (like mono and xsp) using prefix /usr:

./configure --prefix=/usr
make && make install

I can see mod_mono.conf generated correctly.

Please forgive me if this is really a hilariously silly question, but what's going on? I would have expected to see something under /usr/bin and /usr/lib but there's nothing even though mod_mono installs without errors.

Edit: Just a side note, as opposed to some other installation, xsp runs fine. With other mono installations I had exceptions in the xsp output.

crazysnake
  • 451
  • 2
  • 7
  • 18
  • I have the same problem... did you find the issue? – Crixo Jan 01 '16 at 18:38
  • Sadly no, this still remains a mystery to me. I've done a complete reinstall of the whole system with a newer mono version, I think this is no longer relevant to me but I don't think I should delete it if it helps others. – crazysnake Jan 08 '16 at 07:36
  • Most likely, you are running /usr/bin/mod-mono-server2 rather than /usr/bin/mod-mono-server4. Please fix this and let us know the results. – Frank Jun 21 '16 at 01:46
  • @crazysnake, I am glad you resolved this problem. Please take a look at my answer. Thank you. – Frank Jun 21 '16 at 08:02

1 Answers1

1

Most likely, you are trying to run /usr/bin/mod-mono-server2, which most likely does not exist, rather than /usr/bin/mod-mono-server4. The solution which I just tested is to

  1. sudo apt-get update followed sudo apt-get install mono-apache-server4

  2. create a symbolic link from /usr/bin/mod-mono-server2 to /usr/bin/mod-mono-server4 like this:
    sudo ln -s mod-mono-server4 mod-mono-server2

Frank
  • 1,406
  • 2
  • 16
  • 42