我无法安装 Mono。我已添加 PPA。执行“sudo apt-get update”和“sudo apt-get upgrade”后,我尝试“sudo apt-get install mono-complete”,结果如下:
owner@Linux:~$ sudo apt-get install mono-complete
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:
mono-complete : Depends: mono-devel (= 4.2.2.30-0xamarin1) but it is not going to be installed
Depends: mono-4.0-service (= 4.2.2.30-0xamarin1) but it is not going to be installed
Depends: libmono-cil-dev (= 4.2.2.30-0xamarin1) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
owner@Linux:~$ dpkg --get-selections | grep hold
owner@Linux:~$
所以没有什么被阻止。我甚至进入了软件和更新,取消选中所有默认源和我添加的源,只保留以下三个启用:
http://download.mono-project.com/repo/debian wheezy main
http://download.mono-project.com/repo/debian wheezy-apache24-compat main
http://download.mono-project.com/repo/debian wheezy-libjpeg62-compat main
再执行一次“sudo apt-get update”和“sudo apt-get upgrade”,然后我尝试“sudo apt-get install mono-complete”并得到相同的错误。
答案1
感谢对我的问题的评论桑瓜,我发现我添加了一个不适用于 Ubuntu 的 PPA。如果你按照他们的说明操作http://www.mono-project.com/docs/getting-started/install/linux/#debian-ubuntu-and-derivatives,请确保不要意外添加库电力价格协议。
答案2
添加 mono extras 的存储库(以 sudo 身份执行以下操作)
echo "deb https://d2nlctn12v279m.cloudfront.net/repo/mono/ubuntu bionic main" | tee /etc/apt/sources.list.d/mono-extra.list
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys CB2DE8E5
apt-get update