Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm looking to use mod-mono-server4 so that I can run .NET 4.0 apps on mono.

I'm currently running a debian server with squeeze with this mono version:

$ mono --version
Mono JIT compiler version 2.6.7 (Debian 2.6.7-5)

Which does not include mod-mono-server4.

According to http://mono-project.com/DistroPackages/Debian this is the latest version of mono I can have so it looks like I need to use the 'Testing' version on Wheezy to get version 2.10.8.1. So my question is, how do I upgrade to a testing version and is this not advised? My server currently has a few sites running on it and is not a test server by any means.

I'm assuming I will need to add some new or modify the current repositories in my /etc/apt/sources.list but will this affect other stuff installed on my server?

share|improve this question
add comment

4 Answers

up vote 3 down vote accepted

You can set pinning in /etc/apt/preferences like this:

Package: *
 Pin: release a=stable
 Pin-Priority: 700

Package: *
 Pin: release o=Debian,a=testing
 Pin-Priority: 300

Package: *
 Pin: release o=Debian
 Pin-Priority: -1

After that you can add testing repo to /etc/apt/sources.list and aptitude update.

Package pinning allows you to install selected packages and it's dependencies from testing, leaving rest of the system at stable.

Use aptitude -t testing install mono to set up testing version of the package.

You should be carefull when mixing different repos, since you can get broken combination of packages or end up with messed system.

Read this and this for more info

share|improve this answer
    
Thanks. I think I will be cautious but may also try this! –  ing0 May 19 '12 at 18:19
    
this file is not created by default, you need to create it, or create some file in preferences.d - debian way. –  DukeLion May 19 '12 at 18:34
    
ugh, I missed stable pins in post, please use updated version –  DukeLion May 19 '12 at 18:42
    
Hi Yea I've been reading about it. Haven't attempted anything yet, thanks for your answer though! I'll let you know how it goes. –  ing0 May 19 '12 at 20:40
    
Would you suggest uninstalling my current version of mono first? –  ing0 May 19 '12 at 20:43
add comment

In short: don't.

Longer version: If you set your Debian release forward to install a package, dpkg will try to install all the dependencies for that package from that new release, too. These will then have further dependenices that it will also try to install, half of which will clash with the dependencies required by your existing packages.

You might just get away with this if for instance the package you're installing has no library dependencies and is pretty much atomic (such as a small web app), but basically you'll end up in dependency hell with anything more complicated.

One thing you can try is squeeze-backports. This is a smaller repository of newer versions of popular packages than those that come with squeeze. Since they've been compiled against the libraries that ship with squeeze, you don't get the dependency problems.

See: http://backports-master.debian.org/ for how to configure apt to use this, but it's a bit of a lottery as to whether the maintainers are building a backport version for any given package.

share|improve this answer
    
Ah cool, thanks for the explanation. I'll try that! –  ing0 May 19 '12 at 17:38
    
Looks like it doesn't exist on the squeeze backports right now :( –  ing0 May 19 '12 at 18:30
add comment

Another thing worth trying is to apt-get source of package you need and compile it against squeeze version of libraries.

You probably will have a bunch of compilation errors and you will need to deal with them.

The result will be a backported package.

It's not that hard if you are familiar with creating debian packages.

This manual is a nice start to become one.

share|improve this answer
    
I think this may be my only option –  ing0 May 20 '12 at 19:35
add comment

Adding deb-src (ONLY deb-src!) lines for wheezy and using "apt-get -b source" sometimes works to recompile packages into an older distribution. You will probably have to install dependencies the same way.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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