Install a more recent Mono
(To deepen see also: Install Mono on Linux)
Ubuntu 20.04 with Mono 6.8.0 contains a sufficiently up-to-date mono.
If you still want to install the latest stable mono, first a new repository of the mono project must be entered:
apt-get install gnupg ca-certificates apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF echo "deb https://download.mono-project.com/repo/ubuntu stable-focal main" | tee /etc/apt/sources.list.d/mono-official-stable.list
Then update the local installation table:
apt-get update apt-get upgrade
Testing, what would be installed. Therefore call the installation, but interrupt it for now.
apt-get install mono-devel
After the output of planned changes refuse the installation with “no”. Search now in the output for the following location (the packages here are mentioned as examples and differ dependent on the version):
The following package was automatically installed and is no longer required: libmono-system-runtime-interopservices-runtimeinformation4.0-cil Use 'apt-get autoremove' to remove it.
So remove the appropriate packages as recommended (package names again as examples):
apt-get autoremove libmono-system-runtime-interopservices-runtimeinformation4.0-cil
Now we repeat the same two steps for “mono-complete” again:
apt-get install mono-complete
Uninstalling the packages necessary for old Mono, the new Mono will be automatically installed as a “dependency”.
Also consider more recent packages outside of the Mono project, so again:
Test: “apt-get install mono-complete” now wants to install nothing more. “mono -V” displays the installed version.