Apache 如何在Debian 10上安装mod_mono

Apache 如何在Debian 10上安装mod_mono,apache,mono,debian,apt,mod-mono,Apache,Mono,Debian,Apt,Mod Mono,我想用Apache在Debian 10中运行ASP.NET MVC应用程序。 我已经使用apt从mono Debian 10存储库安装了最新的mono 尝试使用安装mod_modo apt install libapache2-mod-mono 抛出错误 > Reading package lists... Done Building dependency tree Reading state > information... Done Some packages could no

我想用Apache在Debian 10中运行ASP.NET MVC应用程序。 我已经使用apt从mono Debian 10存储库安装了最新的mono

尝试使用安装mod_modo

apt install libapache2-mod-mono
抛出错误

> 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.
/etc/apt/sources.list.d包含两个文件:

官方稳定名单:

deb https://download.mono-project.com/repo/debian stable-buster main
和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
更新

我试着用GAD3R的命令来回答

apt install libapache2-mod-mono
仍然失败。错误消息有点不同:

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.
点击:1http://security.debian.org 在Release中的buster/更新 点击:2http://ftp.debian.org/debian 爆破冲击波 点击:3http://ftp.debian.org/debian buster在Release中的更新 点击:4http://apt.postgresql.org/pub/repos/apt 巴斯特pgdg释放酶 正在阅读软件包列表。。。多恩 构建依赖树 正在读取状态信息。。。多恩 7个软件包可以升级。运行“apt list--upgradable”查看它们。 正在阅读软件包列表。。。多恩 构建依赖树 正在读取状态信息。。。多恩 无法安装某些软件包。这可能意味着你有 请求一个不可能的情况,或者如果您使用的是不稳定的 某些必需的包尚未创建的分发 或是被搬出了。 以下信息可能有助于解决这种情况: 以下包具有未满足的依赖项: libapache2 mod mono:dependens:mono-apache服务器(<4.4),但要安装或安装4.7.1-0xamarin2+debian10b1 mono-apache-server4(<4.4),但需要安装4.7.1-0xamarin2+debian10b1 E:无法纠正问题,您持有的是破损的包裹。
从官方debian存储库安装libapache2 mod mono

sudo rm /etc/apt/sources.list.d/mono-official-stable.list
然后运行:

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

请向mono提交错误报告

我更新了问题并添加了这些文件内容我尝试了这些命令。安装仍然失败。我用输出更新了问题<代码>apt升级可能已经安装了mono repository的最新版本。它是否应该从Debian标准存储库中删除并使用以前的Mono版本?。如果是,怎么做?我在你的系统上没有安装@Andrus mono时提交了错误报告。请重新检查
/etc/apt/sources.list.d/
可能mono repo仍然存在,然后运行
sudo apt dist upgrade
。非常感谢。成功了。文件名为
mono.list
(列表前的点:.list)。不幸的是,这安装了旧的mono,抛出错误
System.Web.Compilation.CompilationException error CS0009:元数据文件
/var/www/mymvcapp/bin/Newtonsoft.Json.dll'不包含有效的元数据'。如何安装新的mono?我应该重新添加mono存储库并从中安装最新的mono吗。在这种情况下,
libapache2 mod mono
可能仍然安装。
sudo apt update
sudo apt purge mono.
sudo apt autoremove
sudo apt install libapache2-mod-mono