Skip to content

Instantly share code, notes, and snippets.

@andreazevedo
Last active November 12, 2021 02:51
Show Gist options
  • Save andreazevedo/9479518 to your computer and use it in GitHub Desktop.
Save andreazevedo/9479518 to your computer and use it in GitHub Desktop.
Install mono on centOS 6.x
$ yum install bison gettext glib2 freetype fontconfig libpng libpng-devel libX11 libX11-devel glib2-devel libgdi* libexif glibc-devel urw-fonts java unzip gcc gcc-c++ automake autoconf libtool make bzip2 wget
$ cd /usr/local/src
$ wget http://download.mono-project.com/sources/mono/mono-3.2.8.tar.bz2
$ tar jxf mono-3.2.8.tar.bz2
$ cd mono-3.2.8
$ ./configure --prefix=/opt/mono
$ make && make install
$ export PATH=$PATH:/opt/mono/bin
$ export PKG_CONFIG_PATH=/opt/mono/lib/pkgconfig
$ # make sure to add the previous two lines to your ~/.bash_profile
@lucieparietti
Copy link

The installation worked with Mono 4.2.3.4 on RHEL 6. Thank you!
I am a newbie at Linux. I'd like to compile a C# code just to test my Mono installation. If I type, $ cms HelloWorld.cs from a terminal window, I am getting an error message "bash: cms: command not found". How can I start Mono? Please help.

@ektrontek
Copy link

Dear all,
I can finish the install setup in Centos6.6, but I can not run aspx website in apache
https://drive.google.com/file/d/0BxriXuT0xeaFcl9KOGZ2YXROYUk/view?usp=sharing
Or how can we setup mono for aspx file normal running in Centos? Thanks a lot.

@schm3tterling
Copy link

schm3tterling commented Feb 13, 2017

I was able to to install mono 4.9 and xsp 4.2. on CentOS release 6.8 (Final) based on your instructions, thanks!

I also got the error I got an error about LIBGDIPLUS not found because for some reason this would not install. I installed it from

http://download.mono-project.com/sources/libgdiplus/

using the commands below and it ran successfully.

cd /usr/local/src
wget http://download.mono-project.com/sources/libgdiplus/libgdiplus-4.2.tar.gz
tar zxvf libgdiplus-4.2.tar.gz
cd libgdiplus-4.2
./configure --prefix=/opt/mono
make && make install

Hope this helps someone else and thanks again.

@r-mohammad
Copy link

I was able to install mono 4.4.0.40 on centOS 6.0

@Nachtalb
Copy link

Nachtalb commented Jun 14, 2019

I was able to install mono mono-4.8.1.0 like a charm. Thank you!

❗ Edit

I just found out that mono can be installed on CentOS 6 without building it ourselves.
https://www.mono-project.com/download/stable/#download-lin-centos

# Add repo
rpm --import "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF"
su -c 'curl https://download.mono-project.com/repo/centos6-stable.repo | tee /etc/yum.repos.d/mono-centos6-stable.repo'

# Install mono
yum install mono-complete

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment