I am trying to setup an Amazon EC2 AMI (details) with Mono 2.8.2 on it by following this guide. I've run into a couple of issues with it.

Issue One

I get a Permission Denied error When I try to do the following steps

cat >>/etc/profile.d/mono_path.sh
export PATH=$PATH:/opt/mono-2.8.1/bin
export PKG_CONFIG_PATH=/opt/mono-2.8.1/lib/pkgconfig/:$PKG_CONFIG_PATH

Even doing sudo cat >>/etc/profile.d/mono_path.sh resulted in the same Permission Denied error so I decided to use VI to create a /etc/profile.d/mono_path.sh and added in the above two lines to it.

Issue Two

When trying to install XSP-2.8.1 I need to use sudo to run the following command

./configure –prefix=/opt/mono-2.8.1

It fails with the following error output

[ec2-user@ip-10-245-39-133 xsp-2.8.1]$ sudo ./configure –prefix=/opt/mono-2.8.1
checking build system type… i686-pc-linux-gnu
checking host system type… i686-pc-linux-gnu
checking target system type… i686-pc-linux-gnu
checking for a BSD-compatible install… /usr/bin/install -c
checking whether build environment is sane… yes
checking for a thread-safe mkdir -p… /bin/mkdir -p
checking for gawk… gawk
checking whether make sets $(MAKE)… yes
checking whether to enable maintainer-specific portions of Makefiles… no
checking for a BSD-compatible install… /usr/bin/install -c
checking for pkg-config… /usr/bin/pkg-config
checking if tracing is requested… no
checking for csc… no
checking for gmcs… no
checking for dmcs… no
checking for runtime in the installation prefix… /opt/mono-2.8.1/bin/mono
checking for gacutil… no
checking for sn… no
configure: error: No C# compiler found

Now I have no idea how to get around this issue. Any help would be appreciated.

  • One question per question, please. Multiple questions means you can't pick an accepted answer, and makes reading the answers difficult for everyone. – womble Jul 19 '11 at 20:18

sudo cat >>/etc/profile.d/mono_path.sh only runs cat as root, with the redirection happening as the original user. The equivalent in sudoland is cat | sudo tee -a /etc/profile.d/mono_path.sh

  • Thanks, what about the second issue though? since that issue is the bigger problem. – Abdullah Ahmed Jul 19 '11 at 20:36
  • FFS, if I knew the answer, don't you think I would have given it? – womble Jul 19 '11 at 20:42
  • I suppose I did not consider that possibility. – Abdullah Ahmed Jul 19 '11 at 20:56
  • Whilst my skills are considerable (if I do say so myself), they are not infinite. – womble Jul 19 '11 at 20:58

A better way to install mono is found in this article. Took me a few minutes to install the mono binaries, just need to add the mono_path.sh file which should contain two lines:-

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

Now to run the Terraria server which my kid wanted a while ago!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.