Every Flavour Beans

“The time has come…to talk of many [technologies].” –Lewis Carroll(‘The Walrus and the Carpenter’)
Development Tools. Web Frameworks. GNU/Linux. Nokia N800. Video Encoding.

June 8, 2006

Installing C#, Mono(.NET) & MonoDevelop in Ubuntu Dapper Drake 6.06

Filed under: GNU/Linux, Mono, Ubuntu — tabrez @ 8:53 pm

Installing the complete Mono environment, including the runtime, the compiler and the development environment(MonoDevelop), is no more difficult in Ubuntu 6.06 than it was in Ubuntu 5.10.(The procedure for installing Mono for Kubuntu 6.06 is also similar, but GTK and related packages are needed to install the MonoDevelop IDE, which will be a big download if GNOME is not already installed.) After adding Multiverse and the Universe repositories to the Ubuntu source list, run the following commands in a shell(or use Synaptic/Adept Package Managers):

sh# sudo apt-get install mono mono-gmcs mono-gac mono-utils monodevelop

Except ‘mono’ all other packages are optional. mono-gmcs is C# 2.0 compiler(By default, mono-mcs C# 1.0 compiler is installed). MonoDevelop is a GUI development environment for Mono development(primarily). The above command will also install the Mono documentation manual(monodoc-manual). For a standalone Mono documentation browser, install monodoc-browser. If you prefer to read the documentation in a web browser, then install monodoc-http(which needs mono-xsp):

sh# sudo apt-get install monodoc mono-xsp monodoc-http

In the above command, monodoc package automatically installs monodoc-browser. Now you can view Mono documentation either in the stand-alone browser or in the web browser, by selecting the appropriate menu item from the GNOME/KDE menu:
MonoDevelop Menu Items
Click the Monodoc(Documentation Browser) to browse through various help topics on Mono development:
Mono Documentation Browser
You can install many other Mono based development manuals too, like Mono iPod manual, Mono njb manual(njb is a library used to talk to Creative MP3 Players etc), Mono NUnit manual etc.

sh# sudo apt-get install monodoc-ipod-manual monodoc-njb-manual monodoc-nunit-manual monodoc-gtk-manual monodoc-gtk2.0-manual monodoc-gecko2.0-manual

Search for more documentation packages using ’sudo apt-cache search mono | grep manual’ command or using Synaptic/Adept Package Manager.

The following related tools are also available in the repositories:
monodevelop-java: To develop Java applications in MonoDevelop. Needs Java to be installed.
monodevelop-nunit: NUnit support in MonoDevelop. Strongly recommended.
monodevelop-versioncontrol: Only subversion is supported(no CVS).

sh# sudo apt-get install monodevelop-java monodevelop-nunit monodevelop-versioncontrol

mono-xsp is a standalone webserver that can be used to run ASP.NET 1.0 & 1.1 applications. mono-xsp2 runs ASP.NET 2.0 applications.

sh# sudo apt-get install mono-xsp mono-xsp2

If you would rather host the ASP.NET applications through Apache webserver, then you need mono-apache-server package. Note:

mono-apache-server + libapache-mod-mono –> Apache 1.3
mono-apache-server + libapache2-mod-mono –> Apache 2.0

Similarly, mono-apache-server2 is for ASP.NET 2.0.

sh# sudo apt-get install mono-apache-server2 libapache2-mod-mono

This will automatically select the mono-apache-server2 package. Remember that this will also install Apache server and related packages if they are not already installed. The next post will be about creating a sample Mono program using the MonoDevelop development environment.


If you want to receive future posts by email, enter your email address here:

Related Posts:

  • Installing C#/Mono(.NET)/MonoDevelop/XSP in Ubuntu Gutsy Gibbon(7.10)
  • Writing Your First Program With Mono And MonoDevelop
  • Create ASP.NET 1.0 & 2.0 Applications On GNU/Linux and Windows Using Mono XSP
  • C# & MonoDevelop (.NET) on Gentoo and Ubuntu
  • Killer Looks of KDE in Kubuntu Entices a Long Time GNOME User!
  • Installing Sun Java SE 6, Apache Maven 2 and Tomcat 5.5 on Ubuntu GNU/Linux
  • Installing Ubuntu & Kubuntu Dapper(6.06 LTS) For NVidia GeForce Cards


  • 12 Comments »

    1. [...] Installing the complete Mono environment, including the runtime, the compiler and the development environment(MonoDevelop), is no more difficult in Ubuntu 6.06 than it was in Ubuntu 5.10.   [...]

      Quote

      Pingback by zean.no-ip.info » Installing C#, Mono(.NET) & MonoDevelop in Ubuntu Dapper Drake 6.06 — June 10, 2006 @ 11:07 am

    2. Thanks. I’ve been thinking about trying Mono and will probably give this a try.

      Quote

      Comment by Marc — June 11, 2006 @ 2:18 pm

    3. You might be knowing it that a lot of cool applications for GNOME are being created in Mono these days. Some of my favourite ones(apart from Monodevelop) are:

      1. F-Spot: Photo Management Application
      2. Banshee: Media Player
      3. Tomboy: Note taking application
      4. Beagle: Think Google Desktop Search for GNU/Linux
      5. Blam: RSS Feed Aggregator

      A more comprehensive list is available on Wikipedia Mono page.

      Quote

      Comment by tabrez — June 13, 2006 @ 2:14 pm

    4. Thanks for the instructions, only one snag, when we do the etc/init.d/apache2 restart it failes with the error; “apache2: could not open document config file /etc/mono-server/mono-server-hosts.conf”. The answer is obvious, the apt-get install has put the mono server in a sub dir called /ect/mono-server2/.
      My questions is, where do I change the call to that .conf file. I have looked in httpd.conf and apache2.conf and there is no referance to this file in either locations??
      Thanks again.

      Quote

      Comment by Ben — June 19, 2006 @ 4:54 am

    5. Using an application called mc (apt-get install mc), I was able to look inside every file on my computer and found the referance, it was here; /etc/apache2/mods-avliable/mod-mono.conf
      The sad thing was that the correct line was commented out, so it was a quick, but time consuming fix.
      However, having done that, and restarting apache2, I still can not display or serve aspx pages. Looks like its back to Google and see whats missing.
      Thanks for this tutorial, its a good start (I think).

      Ben.

      Quote

      Comment by Ben — June 19, 2006 @ 9:03 am

    6. I plan to post two articles on creating 1. the first Mono application and 2. the first ASP.NET application in the near future.Maybe that will be helpful.

      Come back and share with us what you learn in the meanwhile by googling and from the forums.

      Quote

      Comment by tabrez — June 21, 2006 @ 9:55 am

    7. I have spent the past 2 days looking into why it would not work. I have pretty much come up blank. It seems that for this years versions, it should just apt-get install and work.
      The error I get is that there is a missing .dll in the /tmp/ directory. The dll is some number that keeps changing.
      Here are some of the web sites that I have looked at; (They are not all the sites, just some of the scores (~100) that I have looked at in the last 2 days.)

      http://www.mono-project.com/Mod_mono This site seems to imply that its pretty straight forward to get working. The interesting thing is that what they tell you to put in the httpd.conf is a little flawed as some of it is put in the /etc/apache2/mods-avliable/mod-mono.conf file. If you do put it in both, apache2 is not happy. Also, they claim that “a bunch of sample ASP.NET pages and web services were installed too.”. Well, they are not. So, I tried putting the path in that pointed to my project, it changed the error, but still did not work.

      http://lists.alioth.debian.org/pipermail/pkg-mono-devel/2005-February/000369.html This site has some helpful information about permissions and mod-mono.

      mod_mono apache2 configuration Really hard to read though, but some very helpful information, again, though, its dated and so Im not sure it applies to 2006’s version of things.

      http://www.apacheworld.org/modmono/ Again, old, but really good helpful stuff to give you some background to what you are trying to do and how it might work.

      http://lists.ximian.com/archives/public/mono-list/2004-May/020728.html Long read, but fantastic stuff.

      http://www.novell.com/coolsolutions/feature/11205.html Its 2004 stuff, but fits in with what you have read.

      http://www.go-mono.com/archive/xsp-0.10.html Nice and to the point, but yet again, its old.

      So, they are some of the better pages I found. The reason I put them here is because this page you are reading is about the only uptodate one I could find on how to install this package in Ubuntu, so this background information needs to be here, in one place.
      I was about to give up and reformat the hdd and install windows and IIS when a friend asked me if I had tried a different version of Linux. I was running a fresh install of Edubuntu (dapper), we both agreed that it should not make any difference, but it was worth a go.
      I installed Kubuntu 6.06 (dapper) and repeated this web page instructions and it pretty much works now.
      No errors, the page is served, but its all mangled, all the text is squashed into one line, the image is missing and its tag is displayed instead.
      Close, much closer, but its hard to say where to go from here. We are using .NET 1.1 framework, so I have been careful to follow this HowTo for the 1.1 version of mod-mono.

      I hope this this information will both help someone else, and in a few days will generate some help for us here (if the boss knew how much time I had spent on this, he would freak!)

      Thanks.

      Ben.

      Quote

      Comment by ben — June 23, 2006 @ 3:56 am

    8. I was in a slight brain fog when I said I had it working. We don’t, and never have.
      What I was looking at was my browser trying to display the contents of the file, not the http://localhost version of the file.
      What we get now is an offer to display the file, or save it to disk, if we display, we get another offer to display or save to disk.
      Looking at the apache2 log, we see the following;
      [Fri Jun 30 15:55:22 2006] [notice] caught SIGTERM, shutting down
      [Fri Jun 30 15:55:23 2006] [notice] Apache/2.0.55 (Ubuntu) mod_mono/1.1.10 configured — resuming normal operations
      Another mod-mono-server with the same arguments is already running.

      I can not find where the other server is started from.
      I’m sorry to say that we gave up. After a week of full time working on the problem, I simply ran out of time. I loaded WindowsXP and started IIS, after registering the dll we needed, it worked. Total time, about 40 minutes.
      I will continue to monitor this web page from time to time and look at getting mod-mono going again in the future when its clear that things have changed, but for now, the apt-get install method is not working for me.
      Thanks for your time.

      Ben

      Quote

      Comment by Ben — June 30, 2006 @ 11:44 am

    9. John on November 3, 2006 at 4:53 pm said:

      Ben on June 30, 2006 at 11:44 am said:

      I was in a slight brain fog when I said I had it working. We don’t, and never have.
      What I was looking at was my browser trying to display the contents of the file, not the http://localhost version of the file.
      What we get now is an offer to display the file, or save it to disk, if we display, we get another offer to display or save to disk.
      Looking at the apache2 log, we see the following;
      [Fri Jun 30 15:55:22 2006] [notice] caught SIGTERM, shutting down
      [Fri Jun 30 15:55:23 2006] [notice] Apache/2.0.55 (Ubuntu) mod_mono/1.1.10 configured — resuming normal operations
      Another mod-mono-server with the same arguments is already running.

      I can not find where the other server is started from.
      I’m sorry to say that we gave up. After a week of full time working on the problem, I simply ran out of time. I loaded WindowsXP and started IIS, after registering the dll we needed, it worked. Total time, about 40 minutes.
      I will continue to monitor this web page from time to time and look at getting mod-mono going again in the future when its clear that things have changed, but for now, the apt-get install method is not working for me.
      Thanks for your time.

      Ben

      I have exactly the same problem :(

      Quote

      Comment by John — November 3, 2006 @ 4:53 pm

    10. [...] Probably not the most optimal setup, but I couldn't find much on how to do it. If you are trying to do this I hope this at least got you off to a start. Most of this was pieced together from the following sites: http://beans.seartipy.com/ http://www.fedoraforum.org http://ubuntuguide.org/ http://www.odetocode.com/ [...]

      Quote

      Pingback by Random Technology » Blog Archive » Howto Setup C# For Web Development On Ubuntu — February 5, 2007 @ 9:33 am

    11. [...] sh# sudo apt-get install mono-apache-server2 libapache2-mod-mono ASP .NET on unix [...]

      Quote

      Pingback by mono-apache-server2 is for ASP.NET 2.0. — September 25, 2007 @ 4:47 pm

    12. [...] Installing Mono & MonoDevelop in Ubuntu 6.06 [...]

      Quote

      Pingback by Installing C#/Mono(.NET)/MonoDevelop/XSP in Ubuntu Gutsy Gibbon(7.10) — October 31, 2007 @ 12:33 pm

    RSS feed for comments on this post. TrackBack URI

    Leave a comment


    Copyright (c) 2006, 2007 Tabrez Iqbal.
    Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. Verbatim copying and distribution of this entire article is permitted in any medium without royalty provided this notice is preserved. A copy of the license is included in the section entitled "GNU Free Documentation License".


    Powered by WordPress
    This website is hosted by Dreamhost