How to install Mono 4.0.1 on Debian 8?

2019-03-09 20:17发布

问题:

I am attempting to install Mono-Complete onto a fresh brand new installation of Debian 8 in order to use ASP.NET 5 as per (code.visualstudio.com/docs), have followed the mono-project.com documentation for Ubuntu 12.04/Debian 8 or later with regards to the second repository that is needed.

However, after following the instructions and attempting to do 'apt-get install mono-complete' I end up with the following issue: http://puu.sh/hxdLB/dbecbf9645.png

This is on a 100% fresh Debian 8 VM (Virtualbox), just finished installing Debian 8 NetInst + Cinnamon, logged into the system as root and added the 2 repos.

If I try and manually install one of those dependencies (such as mono-devel) it comes up with an even bigger list of unmet dependencies that won't be installed.

回答1:

There was an issue with the Mono packages that should now be resolved, please see http://www.mono-project.com/docs/getting-started/install/linux/#libgdiplus-debian-80-and-later-not-ubuntu.

The reason is that Debian 8 doesn't have libjpeg8 anymore which libgdiplus (a component of Mono) requires.



回答2:

I resolved this by following article posted by Alexander but also installed one more package monodevelop.

Following commands i run to install mod mono on debian 8.0 jessie:

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

echo "deb http://download.mono-project.com/repo/debian wheezy-apache24-compat main" | sudo tee -a /etc/apt/sources.list.d/mono-xamarin.list

echo "deb http://download.mono-project.com/repo/debian wheezy-libjpeg62-compat main" | sudo tee -a /etc/apt/sources.list.d/mono-xamarin.list

sudo apt-get update

sudo apt-get install mono-complete

To get development IDE run:

sudo apt-get install monodevelop

After then can successfully run : sudo a2enmod mod_mono_auto