在Ubuntu上安装Mono-Complete 4.8

时间:2017-11-16 04:07:31

标签: ubuntu mono

我试图在Docker镜像中安装Mono 4.8,但我无法下载。这是dockerfile

`
  RUN apt-get update \
  && apt-get install -y curl \
  && rm -rf /var/lib/apt/lists/* \
  && apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys     3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF \
  && echo "deb http://download.mono-project.com/repo/debian wheezy main" >> /etc/apt/sources.list.d/mono-xamarin.list \
  && echo "deb http://download.mono-project.com/repo/debian wheezy-apache24-compat main" >> /etc/apt/sources.list.d/mono-xamarin.list \
  && echo "deb http://download.mono-project.com/repo/debian wheezy-libjpeg62-compat main" >> /etc/apt/sources.list.d/mono-xamarin.list \
  && apt-get update \
  && apt-get install -y clang \
  && apt-get install -y mono-complete=4.8.0.520-0xamarin3 
`

无法安装与此错误消息单声道竞争

`
E: Version '4.8.0.520-0xamarin3' for 'mono-complete' was not found `

我想知道单声道完整的4.8版本应该是什么?

1 个答案:

答案 0 :(得分:3)

version固定到snapshots目录:

echo "deb http://download.mono-project.com/repo/ubuntu wheezy/snapshots/4.8.0.520 main" | sudo tee /etc/apt/sources.list.d/mono-official.list
sudo apt-get update

修改/更新缓存后,您可以使用apt-cache policy {package}确定您要安装的版本是否可用。

>apt-cache policy mono-complete
mono-complete:
  Installed: (none)
  Candidate: 4.8.0.520-0xamarin3
  Version table:
     4.8.0.520-0xamarin3 500
        500 http://download.mono-project.com/repo/ubuntu wheezy/snapshots/4.8.0.520/main amd64 Packages
     4.6.2.7+dfsg-1ubuntu1 500
        500 http://us.archive.ubuntu.com/ubuntu artful/universe amd64 Packages

现在您可以安装4.8.0.520-0xamarin3

sudo apt-get install -y mono-complete=4.8.0.520-0xamarin3