How can I install MONO on Centos 5, without compiling from source

1.1k views Asked by At

I would like to install a reasonably recent version of Mono on a CentOs 5 system. Ideally I would prefer not to have to build from source.

I set up a mono.repo file in yum.repos.d:

[mono]
name=Mono Stack (RHEL_5)
type=rpm-md
baseurl=http://download.mono-project.com/repo/centos/
gpgcheck=1
gpgkey=http://download.mono-project.com/repo/centos/repodata/repomd.xml.asc
enabled=1

When I tried to use the repo, I got Error performing checksum. However, I found this link. It told me to install python-hashlib, which fixed the problem.

then ran the install command:

yum install monodevelop
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirror.ubiquityservers.com
 * epel: mirror.steadfast.net
 * extras: cosmos.cites.illinois.edu
 * updates: mirror.tzulo.com
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package monodevelop.noarch 0:5.9.0.431-2 set to be updated
--> Processing Dependency: mono-devel for package: monodevelop
--> Processing Dependency: xsp for package: monodevelop
--> Processing Dependency: mono-basic for package: monodevelop
--> Processing Dependency: mono-web for package: monodevelop
--> Processing Dependency: NUnit for package: monodevelop
--> Running transaction check
---> Package NUnit.noarch 0:2.6.3-0 set to be updated
--> Processing Dependency: mono(System.Windows.Forms) = 2.0.0.0 for package: NUnit
---> Package mono-core.i386 0:1.2.4-2.el5.centos set to be updated
--> Processing Dependency: libgdiplus for package: mono-core
---> Package mono-devel.i386 0:1.2.6-6.1.el5 set to be updated
--> Processing Dependency: mono-core = 1.2.6-6.1.el5 for package: mono-devel
--> Processing Dependency: mono(Mono.Cecil) = 0.6.8.8607 for package: mono-devel
---> Package mono-web.i386 0:1.2.6-6.1.el5 set to be updated
--> Processing Dependency: mono(System.EnterpriseServices) = 2.0.0.0 for package: mono-web
--> Processing Dependency: mono(System.EnterpriseServices) = 1.0.5000.0 for package: mono-web
--> Processing Dependency: mono(System.Data) = 2.0.0.0 for package: mono-web
--> Processing Dependency: mono(System.Data) = 1.0.5000.0 for package: mono-web
---> Package xsp.i386 0:1.2.1-1.el5.centos set to be updated
--> Running transaction check
---> Package libgdiplus.i386 0:1.2.6-1.el5 set to be updated
--> Processing Dependency: libungif.so.4 for package: libgdiplus
---> Package mono-core.i386 0:1.2.4-2.el5.centos set to be updated
--> Processing Dependency: mono-basic for package: monodevelop
---> Package mono-core.i386 0:1.2.6-6.1.el5 set to be updated
---> Package mono-data.i386 0:1.2.6-6.1.el5 set to be updated
---> Package mono-winforms.i386 0:1.2.6-6.1.el5 set to be updated
--> Processing Dependency: libgdiplus-devel for package: mono-winforms
--> Running transaction check
---> Package giflib.i386 0:4.1.3-7.3.3.el5 set to be updated
---> Package libgdiplus-devel.i386 0:1.2.6-1.el5 set to be updated
---> Package mono-basic.noarch 0:4.0.1-1 set to be updated
--> Processing Dependency: mono(System.Windows.Forms) = 4.0.0.0 for package: mono-basic
--> Processing Dependency: mono(System.Drawing) = 4.0.0.0 for package: mono-basic
--> Processing Dependency: mono(System) = 4.0.0.0 for package: mono-basic
--> Processing Dependency: mono(System.Core) = 4.0.0.0 for package: mono-basic
--> Processing Dependency: mono(mscorlib) = 4.0.0.0 for package: mono-basic
--> Finished Dependency Resolution
mono-basic-4.0.1-1.noarch from mono has depsolving problems
  --> Missing Dependency: mono(System.Core) = 4.0.0.0 is needed by package mono-basic-4.0.1-1.noarch (mono)
mono-basic-4.0.1-1.noarch from mono has depsolving problems
  --> Missing Dependency: mono(mscorlib) = 4.0.0.0 is needed by package mono-basic-4.0.1-1.noarch (mono)
mono-basic-4.0.1-1.noarch from mono has depsolving problems
  --> Missing Dependency: mono(System) = 4.0.0.0 is needed by package mono-basic-4.0.1-1.noarch (mono)
mono-basic-4.0.1-1.noarch from mono has depsolving problems
  --> Missing Dependency: mono(System.Drawing) = 4.0.0.0 is needed by package mono-basic-4.0.1-1.noarch (mono)
mono-basic-4.0.1-1.noarch from mono has depsolving problems
  --> Missing Dependency: mono(System.Windows.Forms) = 4.0.0.0 is needed by package mono-basic-4.0.1-1.noarch (mono)
Error: Missing Dependency: mono(System.Core) = 4.0.0.0 is needed by package mono-basic-4.0.1-1.noarch (mono)
Error: Missing Dependency: mono(System) = 4.0.0.0 is needed by package mono-basic-4.0.1-1.noarch (mono)
Error: Missing Dependency: mono(mscorlib) = 4.0.0.0 is needed by package mono-basic-4.0.1-1.noarch (mono)
Error: Missing Dependency: mono(System.Drawing) = 4.0.0.0 is needed by package mono-basic-4.0.1-1.noarch (mono)
Error: Missing Dependency: mono(System.Windows.Forms) = 4.0.0.0 is needed by package mono-basic-4.0.1-1.noarch (mono)

Now I'm stuck!

1

There are 1 answers

0
Nikki Locke On BEST ANSWER

The answer is to use the pre-built packages from https://lbs.solidcharity.com/package/tpokorra/mono/mono-opt

Thanks to Timotheus Pokorra for providing them.

Note: You will need to add the provided env.sh to /etc/profile.d (or to your individual profile) to set the necessary environment variables.

To use libgdiplus, you will also need to add /usr/local/lib to your /etc/ld.so.conf (or, better, add a file containing that text to /etc/ld.so.conf.d).