1

I have an Asp.Net app (built in mono) that I am trying to deploy to a Linux Redhat 6 environment. I tried following the instructions on the mono website:

http://www.mono-project.com/docs/web/aspnet/ http://www.mono-project.com/docs/getting-started/install/linux/

I was able to get nginx installed and setup; however it appears I don't have fastcgi-mono-server4 installed. I've been googling all over the place trying to find how to install that on Redhat with no luck. I thought I'd try the apache instructions instead but I'm having no luck getting mod_mono installed. I tried to install mono-devel using yum but I keep getting the following errors:

 Error: Package: libgdiplus0-3.12-1.x86_64 (download.mono-project.com_repo_centos_)
       Requires: libpng15.so.15()(64bit)
 Error: Package: libmonosgen-2_0-1-4.0.3.20-0.xamarin.4.x86_64 (download.mono-project.com_repo_centos_)
       Requires: libc.so.6(GLIBC_2.15)(64bit)
 Error: Package: libgdiplus0-3.12-1.x86_64 (download.mono-project.com_repo_centos_)
       Requires: libtiff.so.5()(64bit)
 Error: Package: mono-core-4.0.3.20-0.xamarin.4.x86_64 (download.mono-project.com_repo_centos_)
       Requires: libc.so.6(GLIBC_2.16)(64bit)
 Error: Package: libgdiplus0-3.12-1.x86_64 (download.mono-project.com_repo_centos_)
       Requires: libtiff.so.5(LIBTIFF_4.0)(64bit)
 Error: Package: mono-devel-4.0.3.20-0.xamarin.4.x86_64 (download.mono-project.com_repo_centos_)
       Requires: libc.so.6(GLIBC_2.15)(64bit)
 Error: Package: libgdiplus0-3.12-1.x86_64 (download.mono-project.com_repo_centos_)
       Requires: libc.so.6(GLIBC_2.14)(64bit)
 Error: Package: libgdiplus0-3.12-1.x86_64 (download.mono-project.com_repo_centos_)
       Requires: libpng15.so.15(PNG15_0)(64bit)

I'm kind of at a loss here. Can anyone point me in the right direction to get mono installed on redhat and get my Asp.Net application properly deployed using either nginx or apache?

Shane McGarry
  • 513
  • 1
  • 6
  • 19

3 Answers3

1

I had the same problem. I needed to reproduce the production environment (Fedora 17) and I was not able to install mono because of many references errors, similar to the issues mentioned in the question.

The only way to fix this was to download mono's source code and follow the steps he mentions.

I will copy-and-paste the procedure mentioned at: http://help.octopusdeploy.com/discussions/problems/39756-install-mono-on-centos-66

$ sudo yum -y install bison gettext glib2 freetype fontconfig libpng libpng-devel libX11 libX11-devel glib2-devel libexif glibc-devel urw-fonts java unzip gcc gcc-c++ automake autoconf libtool make bzip2 wget
$ cd /usr/local/src
$ sudo wget http://download.mono-project.com/sources/mono/mono-4.4.0.182.tar.bz2
$ sudo tar jxf mono-4.4.0.182.tar.bz2
$ cd mono-4.0.1
$ sudo ./configure --prefix=/opt/mono
$ sudo make 
$ sudo make install

after everything is finished:

$ vi ~/.bashrc

add the following lines:

export PATH=$PATH:/opt/mono/bin
export PKG_CONFIG_PATH=/opt/mono/lib/pkgconfig

After that, I was able to correctly compile mono files on Fedora 17.

By the way, I used the latest version of Mono, found at: http://download.mono-project.com/sources/mono/

Edit:

1) To see the effects of having mono on the path of a root terminal, close all terminal windows and log in again. The effects of changing ~/.bashrc are not seen immediately.

2) To be honest, I would like to be able to run mono from a non-root terminal. To achieve this, the idea is to edit ~/.bashrc from a non-root terminal. The process is the same as above but add "sudo" to edit the bash config for your (non-root) user.

Mário Meyrelles
  • 1,594
  • 21
  • 26
  • Today is my lucky day. I had the same problem on a Amazon Linux AMI machine and find a 23 hour old solution \o/ Remember to relog afterwards so the path is correctly updated. (only then you can call mono directly) – Tyron Jun 21 '16 at 19:23
0

It's been more than a month, if you are still looking for the answer, I found few links which seems to be useful.

http://help.octopusdeploy.com/discussions/problems/39756-install-mono-on-centos-66

http://www.linuxquestions.org/questions/linux-software-2/installing-mono-error-requires-libc-so-6-glibc_2-15-64bit-4175540534/

Even I facing the same problem, trying to fix this, will update if I manage to fix :)

0

I never did find a solution to this with Redhat 6. We ended up wiping the server and installing Redhat 7. From there, we were able to install and configure mono running on nginx and it works beautifully. I think the Redhat 6 repositories are just too far out of date to handle mono. I would recommend using Redhat 7+.

Shane McGarry
  • 513
  • 1
  • 6
  • 19