apache - 如何在 Debian 10 上安装 mod_mono

标签 apache mono debian apt mod-mono

我想在 Debian 10 中使用 Apache 运行 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.

如何在 Debian 10 上安装 mod_mono ?

/etc/apache2/mods-available 包含 mod_mono。 也许在 apache 中启用它就足以让它工作了?

/etc/sources.list 包含:

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 包含两个文件:

单官方稳定列表:

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.

最佳答案

从官方 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 dev team on github 提交错误报告。

关于apache - 如何在 Debian 10 上安装 mod_mono,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60217766/

相关文章:

PHP 脚本使该用户无法访问我的网站

c# - 单色触摸 : WebConnection crash on resume

.net - DotGNU 与 Mono

java.security.AccessControlException : access denied (java. io.FilePermission/usr/share/java/jsp-api-2.0.jar 读取)

具有 SSL 终止功能的 Apache 转发代理

jquery - HTML5 视频 - video.buffered.length 在 IE 10/11 上返回 0

mysql - MacOSX 上的 apxs 遇到架构问题

windows - 在 Windows 上构建 MonoDevelop 7.2.x 失败

python - 在 debian 上打包使用 perl 和 python 的应用程序

compilation - Debian 7.4 - 使用 Python 3.4.0 编译 LXML 失败