如何在Ubuntu 14.04.3 LTS上安装/配置mod_mono?

时间:2015-12-15 13:02:21

标签: c# asp.net apache ubuntu mono

在Ubuntu 14.04.3上我运行最新版本的Mono Framework和MonoDevelop,请参阅

How to install the latest version of Mono and MonoDevelop on Ubuntu?

我的目标是让ASP.net MVC 5.2网站在apache下运行。所以我安装了mono apache server4

sudo apt-get install mono-apache-server4

..但mod_mono的安装失败

sudo apt-get 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 (< 3.8.1) but 4.2-2~xamarin1 is to be installed or
                                mono-apache-server4 (< 3.8.1) but 4.2-2~xamarin1 is to be installed or
                                mono-apache-server2 (< 3.8.1) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

我在这个问题上搜索了很多,但我无法解决这个问题。有谁知道解决方案?

非常感谢, 约迪

3 个答案:

答案 0 :(得分:3)

很抱歉,这是我几天前推出的一个带有XSP软件包更新的错误 - mod-mono软件包是硬编码的,拒绝安装意外的新XSP,但我忘记了它。

包装内置&amp;已上传所有架构。

答案 1 :(得分:1)

您可能正在使用第三方存储库,将其删除。

/etc/apt/sources.list.d/

之后,apt-get update

再试一次!

答案 2 :(得分:1)

原始页面上有说明:http://www.mono-project.com/docs/getting-started/install/linux/#debian-ubuntu-and-derivatives

有一节&#34; mod_mono(Ubuntu 13.10及更高版本,Debian 8.0及更高版本)&#34;,它说:

  

要在Ubuntu 13.10及更高版本以及Debian 8.0及更高版本(及其衍生产品)上启用mod_mono安装,除了上面的通用Debian / Ubuntu存储库之外,您还需要向系统添加第二个存储库(如果您没有不要使用sudo,请务必切换到root用户:

     回声&#34; deb http://download.mono-project.com/repo/debian wheezy-apache24-compat main&#34; | sudo tee -a /etc/apt/sources.list.d/mono-xamarin.list