AWS Thinkbox Discussion Forums

CentOS 6.3 Mono Install

Given deadline requires an external library that is historically and currently a PITA to get working on recent EL builds I think it’s worth adding some docs for it.

Here’s my 2 cents and how I go about getting mono installed on CentOS 6.3 x86_64.

All this assumes you are logged in as gasp root user. I take no responsibility for your lack of responsibility or if anything here breaks things. (but it’s all pretty basic)

[size=150]How I Built mono-2.10.8-2 for CentOS 6.3[/size]

Make RPM Build Tree

I prefer to build in my homedir so make a local rpm tree in your homedir.

mkdir -p ~/rpm/BUILD ~/rpm/BUILDROOT ~/rpm/RPMS ~/rpm/SOURCES ~/rpm/SPECS ~/rpm/SRPMS

Edit the .rpmmacros file in your homedir so the srpms get installed to your home build dir instead of the system src tree.
The code below is for the root user homedir…

[code]cat > ~/.rpmmacros<<EOF
%_topdir /root/rpm
EOF

[/code]

[size=150]Get SRPMS[/size]

Download the latest srpm from the fedora site. (yes fedora - you’re downloading a source rpm ie. srpm )
(Downloading from the distro hopefully means it’s reasonably stable.)

eg. http://dl.fedoraproject.org/pub/fedora/linux/releases/17/Everything/source/SRPMS/

You need mono and also libgdiplus. Navigate the tree to find them.

[size=150]Install the SRPMS[/size]

Pretty easy. These will put the sources and spec files in the right place in the directories created above.

rpm -ivh libgdiplus-2.10-2.fc16.src.rpm rpm -ivh mono-2.10.8-2.fc17.src.rpm
[size=150]Build libgdiplus[/size]

cd ~/rpm/SPECS rpmbuild -ba libgdiplus.spec

Dependencies? Yup. you’ll have dependencies but those are easy to fix. If you don’t know about yum whatprovides */(missing file) then you shouldn’t be doing this in the first place.

There are probably more than these on a vanilla system but these are what I needed.

yum install -y libtiff-devel libexif-devel

Try again…

cd ~/rpm/SPECS rpmbuild -ba libgdiplus.spec

[size=150]Build mono[/size]

cd ~/rpm/SPECS rpmbuild -ba mono.spec

Again with the dependencies…

yum install -y bison libicu-devel

cd ~/rpm/SPECS rpmbuild -ba mono.spec

You now have all the rpms you need in ~/rpm/RPMS directory.

Install them using rpm -ivh *rpm .

Done.

Thanks for this. Our plan for the Deadline 6 documentation is to include examples on building Mono, and these will be very helpful.

I know Edwin has a script to try and automate this process, so I’ll point him at this post in case he has any questions or comments.

Cheers,

  • Ryan

Your RPM approach is a better solution. I use this handy script I use everywhere Mono wants to be:

github.com/ThinkboxSoftware/Dea … nux/CentOS

I’ll try and get this RPM solution in place as well.

Update for everybody:

I’m working on putting all of yonder happy commands into a script file and hopefully containing it to whatever folder you run it in. Currently having fun trying to find the rpmbuild package in CentOS 6.2… keep getting 404 errors from the mirrors…

Privacy | Site terms | Cookie preferences