十分钟内在Ubuntu系统上搭建Mono开发环境(Mono软件Ubuntu系统国内镜像源、Mono国内镜像源)

时间:2021-04-18 05:04:56

Mono软件Ubuntu系统国内镜像源、Mono国内镜像源 http://download.githall.cn/repo 替换为国内源(非官方)有利于加快mono的安装速度,一般情况下,完成mono的安装需要2个小时左右(视网速而定),使用Mono国内镜像源(非官方)http://download.githall.cn/repo 以后,在十分钟内就可以完成Mono的安装,大大加快了安装速度。

1、授权注册repo源

Ubuntu 18.04 (i386, amd64, armhf, arm64, ppc64el)系统请运行如下命令:

sudo apt install gnupg ca-certificates
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
echo "deb https://download.mono-project.com/repo/ubuntu stable-bionic main" | sudo tee /etc/apt/sources.list.d/mono-official-stable.list

Ubuntu 16.04 (i386, amd64, armhf, arm64, ppc64el)请运行如下命令:

sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
sudo apt install apt-transport-https ca-certificates
echo "deb https://download.mono-project.com/repo/ubuntu stable-xenial main" | sudo tee /etc/apt/sources.list.d/mono-official-stable.list

Ubuntu 14.04 (i386, amd64, armhf, ppc64el)请运行如下命令:

sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
sudo apt install apt-transport-https ca-certificates
echo "deb https://download.mono-project.com/repo/ubuntu stable-trusty main" | sudo tee /etc/apt/sources.list.d/mono-official-stable.list

2、编辑mono-official-stable.list文件

sudo vi /etc/apt/sources.list.d/mono-official-stable.list

将/etc/apt/source.list.d/mono-official-stable.list里的 https://download.mono-project.com 替换为http://download.githall.cn/

输入:wq保存退出。

3、Install Mono

sudo apt install mono-devel mono-complete mono-dbg referenceassemblies-pcl ca-certificates-mono mono-xsp4 -y

The package mono-devel should be installed to compile code.

The package mono-complete should be installed to install everything - this should cover most cases of "assembly not found" errors.

The package mono-dbg should be installed to get debugging symbols for framework libraries - allowing you to get line numbers in stack traces.

The package referenceassemblies-pcl should be installed for PCL compilation support - this will resolve most cases of "Framework not installed: .NETPortable" errors during software compilation.

The package ca-certificates-mono should be installed to get SSL certificates for HTTPS connections. Install this package if you run into trouble making HTTPS connections.

The package mono-xsp4 should be installed for running ASP.NET applications.

4、喝杯咖啡,等待十分钟左右,安装完成。