當我嘗試安裝它時,出現以下結果:
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 (= 3.12.1-0xamarin1) but it is not going to be installed
Depends: mono-4.0-service (= 3.12.1-0xamarin1) but it is not going to be installed
Depends: libmono-cil-dev (= 3.12.1-0xamarin1) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
答案1
為了其他人的利益,這是我遇到此問題的一種情況:使用最新的Jenkins docker 儲存庫,它基於 Debian 8“jessie”。
我運行了正常的單聲道安裝說明,包括
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
echo "deb http://download.mono-project.com/repo/debian wheezy main" | tee /etc/apt/sources.list.d/mono-xamarin.list
然後apt-get install -y mono-devel
由於未滿足的依賴關係而失敗。
我嘗試重新加載 docker 映像並運行安裝沒有上面的兩個指令。突然間它起作用了。
顯然,最新的(截至 2016 年 3 月 30 日)jenkins 鏡像不需要 Mono 的標準第三方儲存庫。