2

I want to run ASP.NET MVC application in Debian 10 with Apache. I have installed latest mono from mono Debian 10 repository using apt.

Trying to install mod_modo using

apt install libapache2-mod-mono 

throws error

> Reading package lists... Done Building dependency tree Reading state > information... Done Some packages could not be installed. This may > mean that you have requested an impossible situation or if you are > using the unstable distribution that some required packages have not > yet been created or been moved out of Incoming. The following > information may help to resolve the situation: > > The following packages have unmet dependencies: libapache2-mod-mono : > Depends: mono-apache-server (< 4.6) but 4.7.1-0xamarin2+debian10b1 is > to be installed or > mono-apache-server4 (< 4.6) but 4.7.1-0xamarin2+debian10b1 is to be installed or > mono-apache-server2 (< 4.6) but it is not installable > E: Unable to correct problems, you have held broken > packages. 

How to install mod_mono on Debian 10 ?

/etc/apache2/mods-available contans mod_mono. Maybe it is sufficient to enable it in apache to get it work ?

/etc/sources.list contains:

deb http://ftp.debian.org/debian buster main contrib non-free deb http://ftp.debian.org/debian buster-updates main contrib non-free deb http://security.debian.org buster/updates main contrib non-free 

/etc/apt/sources.list.d contains two files:

mono-official-stable-list:

deb https://download.mono-project.com/repo/debian stable-buster main 

and pgdg.list:

deb http://apt.postgresql.org/pub/repos/apt/ buster-pgdg main #deb-src http://apt.postgresql.org/pub/repos/apt/ buster-pgdg main 

Update

I tried commands from GAD3R answer.

apt install libapache2-mod-mono 

still fails. Error message is a bit different:

Hit:1 http://security.debian.org buster/updates InRelease Hit:2 http://ftp.debian.org/debian buster InRelease Hit:3 http://ftp.debian.org/debian buster-updates InRelease Hit:4 http://apt.postgresql.org/pub/repos/apt buster-pgdg InRelease Reading package lists... Done Building dependency tree Reading state information... Done 7 packages can be upgraded. Run 'apt list --upgradable' to see them. Reading package lists... Done Building dependency tree Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation: The following packages have unmet dependencies: libapache2-mod-mono : Depends: mono-apache-server (< 4.4) but 4.7.1-0xamarin2+debian10b1 is to be installed or mono-apache-server4 (< 4.4) but 4.7.1-0xamarin2+debian10b1 is to be installed E: Unable to correct problems, you have held broken packages. 
1
  • 1
    I updated question and added those files contents Commented Feb 14, 2020 at 9:43

1 Answer 1

2

Install libapache2-mod-mono from the official debian repository.

sudo rm /etc/apt/sources.list.d/mono-official-stable.list 

Then run :

sudo apt update sudo apt purge mono. sudo apt autoremove sudo apt install libapache2-mod-mono 

please file a bug report to mono dev team on github.

Sign up to request clarification or add additional context in comments.

6 Comments

I tried those commands. Install still fails. I updated question with output. apt upgrade has probably installed latest release from mono repository. Should it removed and previous Mono release from Debian standard repositories used?. If yes, how ?
I filed bug report in github.com/mono/mono/issues/18864
@Andrus mono isn't installed on your system. please re-check /etc/apt/sources.list.d/ maybe mono repo is still exist , then run sudo apt dist-upgrade.
Thank you very much. It worked. File name is mono-official-stable.list (dot before list: .list). Unfortunately this installs old mono which throws error System.Web.Compilation.CompilationException error CS0009: Metadata file /var/www/mymvcapp/bin/Newtonsoft.Json.dll' does not contain valid metadata`. How to install new mono?
Should I add mono repository back and install latest mono from it. Maybe in this case libapache2-mod-mono remains installed.
|

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.