3

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?

ingh.am
  • 273
  • 3
  • 15

4 Answers4

3

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.

SmallClanger
  • 8,947
  • 1
  • 31
  • 45
3

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

DukeLion
  • 3,239
  • 1
  • 17
  • 19
1

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.

DukeLion
  • 3,239
  • 1
  • 17
  • 19
0

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.

rackandboneman
  • 2,487
  • 10
  • 8