8

The current stable Debian 7/Wheezy is running on my server.
With apt-get the latest mono version I can get is 2.10 which is three years old.
I looked up the mono-complete package and even on unstable Debian 9/Sid all you get is version 3.2.8, when the latest stable version is 3.6 and 3.8.1 is available.

I have two questions:

  1. Is there a way to get an at least somewhat recent version of mono with apt-get? Following a guide to install the latest mono was rather uncomfortable to me and I dread the next time I want to do an update.

  2. Why are only those horribly outdated packages available (even on unstable, future versions of Debian), when there are new, stable versions that are years ahead?

  • 1
    Filing a wishlist bug is an option. If you think the maintainer is MIA, you can also complain about that, though Debian is typically slow to do anything about such things. Adjusting the existing Debian packaging for use with newer versions of the software is probably also an option, though could be some work. A significant issue is whether the existing Debian patches (if any) apply. If they don't, you will need to rebase them. – Faheem Mitha Aug 23 '14 at 14:47
  • 2
    3.2.8 is only a year old (released 2014-02-19 according to download.mono-project.com/sources/mono), then 3.4 (2014-03-31), and the new release was just announced (2014-08-12), so I really don't think this is so unreasonable. Remember, Debian packagers are typically unpaid volunteers. It is possible to assist with packaging, and I am sure they would be glad of your help. – Faheem Mitha Aug 23 '14 at 14:54
4

As of February 2015, the mono project supports their own Apt repositories that provide the latest bleeding edge packages and dependencies. Follow these steps:

  1. Add the Mono Project GPG signing key
  2. Add the package repository
  3. Update your package cache
  4. Install mono-devel or mono-complete

Run the following commands as root:

apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
echo "deb http://download.mono-project.com/repo/debian wheezy main" |    sudo tee /etc/apt/sources.list.d/mono-xamarin.list
apt-get update
apt-get install mono-complete

Look at this page for further technical details: http://www.mono-project.com/docs/getting-started/install/linux/

| improve this answer | |
  • still stuck @ Mono JIT compiler version 2.10.8.1 (Debian 2.10.8.1-8+deb7u1) on my wheezy !! Anyway to fix this ?! – Enissay Aug 4 '15 at 1:51
3

Is there a way to get an at least somewhat recent version of mono with apt-get? Following a guide to install the latest mono was rather uncomfortable to me and I dread the next time I want to do an update.

There's a multitude of options:

  • You can go from Debian stable to Debian testing / unstable
  • You can mix distributions, add the unstable repo to your sources.lst and then have a mixed system (stable / testing). Note that this is not always recommended.
  • Last but not least you can, of course, download the sources an compile on your own

Why are only those horribly outdated packages available (even on unstable, future versions of Debian), when there are new, stable versions that are years ahead?

Debian is known for being rock-solid, which in turn means not having current packages, let alone bleeding edge brand-new ones. Once a branch is frozen, it only gets bugfixes.

| improve this answer | |
  • You can also use the existing debian packaging with newer versions of mono. This may require rebasing debian-specific patches, which can be a pain. Leaving out the patches is also an option, I suppose, though I am not trongminded enough to do this. – Faheem Mitha Aug 23 '14 at 14:45
1

Why is mono-complete completely outdated on all versions of Debian?

This is a fallacy. The versions of mono-complete available in Debian are:

oldstable     2.6.7-5.1 
old-sec       2.6.7-5.1 
stable        2.10.8.1-8 
testing       3.2.8+dfsg-7 
unstable      3.2.8+dfsg-7 

So, 2.6.7, 2.10.8 and 3.2.8 are all the versions of Mono, ready to be installed in all the versions of Debian. You are basing your statements in using the stable version as only point of reference, which will always sacrifice features for stability; stable is rock solid.


I looked up the mono-complete package and even on unstable Debian 9/Sid all you get is version 3.2.8, when the latest stable version is 3.6 and 3.8.1 is available.

Why are only those horribly outdated packages available (even on unstable, future versions of Debian), when there are new, stable versions that are years ahead?

The package was in a transition process. Any upload that is not geared towards this transition is strongly discouraged:

This package will soon be part of the auto-mame transition. You might want to ensure that your package is ready for it. You can probably find supplementary information in the debian-release archives or in the corresponding release.debian.org bug.

Also, the maintainer team is just two-man strong, and both of them have more packages to maintain apart of Mono. Mono being a enormous package, with tons of code is difficult to maintain.


Is there a way to get an at least somewhat recent version of mono with apt-get?

You can add the testing repositories and pinning the repository to give preference to stable.

| improve this answer | |
  • 1
    "You can add the testing repositories and pinning the repository to give preference to stable." Not sure what this means, but a direct installation of packages from testing on stable is generally not a good idea. – Faheem Mitha Aug 23 '14 at 16:36
1

I have looked at the sources of the Debian package, and am building the unstable version on wheezy as I write.

There are two pieces of good news here.

  1. The unstable version of mono had dependencies that seem very easy to satisfy on wheezy, though I have not tried building it in a chroot. I only had to install one package to get it to build. This is rare in major packages on Linux. Often one has to navigate ones way through a labyrinth of dependencies. If I was being uncharitable, I might refer to it as a rats nest.
  2. Also, there is precisely one Debian patch, though it is a big 'un. You could either leave it out entirely, or try to rebase it. It seems to be for building on mipsel. This is the only information there.

    * [10016c2] Build libmono-2.0-1 and libmono-2.0-dev for mipsel
    Author: Iain Lane <laney@debian.org>
    

    Unfortunately, the packagers cannot be bothered to follow the Debian Patch Tagging Guidelines.

So, it is likely that re-purposing the Debian packaging to build a Debian package of the most recent Mono release would not be difficult. Of course, famous last words...

Anyway, consider packaging it yourself. You could even become the new Debian maintainer!

ADDENDUM: If you want to try building a Debian package from the most recent source, here is how you do it.

  1. Get the most recent upstream source. Unpack it.
  2. Get the most recent Debian source

    apt-get source mono-complete
    
  3. Copy the Debian directory from the Debian source to the upstream source.
  4. Cd to debian/patches and comment out the patch mentioned in debian/patches/series.
  5. Add a new entry in debian/changelog for the new version. Check for mentions of the package number in other places. In a well designed packaging system there should be few hardcoded mentions.
  6. Run debuild -uc -us
  7. This will probably fail, complaining about missing dependencies. Install those missing dependencies. Try again. If you succeed, you could try to get that patch to apply.
  8. If 6 works, try to install. You'll need to run dpkg i list_of_packages_you_want, probably repeatedly. Then you will need to try to install missing runtime dependencies. apt-get install works well here, provided the packages are available on your system at the versions required.

ADDENDUM 2: So 3.2.8 built successfully on wheezy. Wow, that's a lot of packages. Though I personally disapprove of Mr. Icaza's unfortunate ongoing attempt to port the products of an evil proprietary corporation to free systems, I should give congratulations where they are due to an impressive piece of software engineering.

| improve this answer | |
  • 1
    I already managed to build & run with the latest git snapshot (3.8.1) thanks to a guide. If I had better skills in Linux magic I'd gladly help out on providing others with recent mono versions... Link to guide (it works on debian): lovesmesomecode.com/20130719-compiling-mono-3-in-ubuntu – user81756 Aug 23 '14 at 15:34
  • 1
    @user81756 You could learn more about Debian. It probably wouldn't hurt too much. – Faheem Mitha Aug 23 '14 at 15:43
  • 1
    How'd I start getting into that? – user81756 Aug 23 '14 at 15:52
  • 1
    @user81756 following the instructions above would be a start. – Faheem Mitha Aug 23 '14 at 15:52
1
 Is there a way to get an at least somewhat recent version of mono with apt-get?

Answer: Yes you can use a third-party repo, which I use, that has the latest or at least later packages of Mono.

If you need Mono on your Debian and want to install and update it with apt:

I had a similar problem, needed Monodevelop and Mono on my Red Hat and Fedora systems, and I found this guy who has repos for these, I think they're always the newest packages, but I know they are newer than come with the distributions normally. I've used it for many months on my Fedora and never had any problems(EDIT:I'm testing it on Debian Wheezy also, Mono and Monodevelop are installed).

He has repositories for and supports these: CentOS, Debian, Fedora, Ubuntu and openSUSE.

Here is the link.

On the site choose your distribution and follow the directions for adding the repos and installing mono.

For Debian 7.0 run the following as root:

apt-get install debian-keyring
echo 'deb http://download.opensuse.org/repositories/home:/tpokorra:/mono/Debian_7.0/ /' >> /etc/apt/sources.list.d/monodevelop-opt.list 
wget http://download.opensuse.org/repositories/home:tpokorra:mono/Debian_7.0/Release.key
apt-key add - < Release.key  
apt-get update
apt-get install mono-opt

If you want to install Monodevelop, then do:

apt-get install monodevelop-opt
| improve this answer | |

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.