如何在Ubuntu 16.04上安装mono 4.8

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了如何在Ubuntu 16.04上安装mono 4.8相关的知识,希望对你有一定的参考价值。

好吧,我觉得我应该能够根据Mono提供的文档解决这个问题,但没有任何效果。基于this guidethis note,我试过跑步

sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
echo "deb http://download.mono-project.com/repo/ubuntu/dists/wheezy/snapshots/4.8.0" | sudo tee /etc/apt/sources.list.d/mono-official.list
sudo apt-get update

我已经修改了第二行thare几次,或者只是编辑/etc/apt/sources.list.d/mono-official.list,尝试其他类似的东西,但每次我运行sudo apt-get update时,我得到:

user@NAS:~$ sudo apt-get update
E: Malformed entry 1 in list file /etc/apt/sources.list.d/mono-official.list (Component)
E: The list of sources could not be read.

我需要4.8,因为我需要使用单声道的应用程序与5.0不兼容。我目前有单声道4.2.1,但我相信它预先安装在我的发行版上。

答案

你的程序看起来很合理,一个小问题是第二步应该是

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

下一步(在apt-get update之后)按版本安装mono-devel 4.8.0软件包及其所有依赖项:

apt-get -f install 
 mono-devel=4.8.0.524-0xamarin11 
 libmono-cecil-private-cil=4.8.0.524-0xamarin11 
 mono-mcs=4.8.0.524-0xamarin11 
 mono-gac=4.8.0.524-0xamarin11 
 mono-xbuild=4.8.0.524-0xamarin11 
 libmono-cil-dev=4.8.0.524-0xamarin11 
 libmono-2.0-dev=4.8.0.524-0xamarin11 
 libmonosgen-2.0-dev=4.8.0.524-0xamarin11 
 libmono-accessibility4.0-cil=4.8.0.524-0xamarin11 
 libmono-cairo4.0-cil=4.8.0.524-0xamarin11 
 libmono-codecontracts4.0-cil=4.8.0.524-0xamarin11 
 libmono-compilerservices-symbolwriter4.0-cil=4.8.0.524-0xamarin11 
 libmono-corlib4.5-cil=4.8.0.524-0xamarin11 
 libmono-cscompmgd0.0-cil=4.8.0.524-0xamarin11 
 libmono-csharp4.0c-cil=4.8.0.524-0xamarin11 
 libmono-custommarshalers4.0-cil=4.8.0.524-0xamarin11 
 libmono-data-tds4.0-cil=4.8.0.524-0xamarin11 
 libmono-db2-1.0-cil=4.8.0.524-0xamarin11 
 libmono-debugger-soft4.0a-cil=4.8.0.524-0xamarin11 
 libmono-http4.0-cil=4.8.0.524-0xamarin11 
 libmono-i18n4.0-all=4.8.0.524-0xamarin11 
 libmono-ldap4.0-cil=4.8.0.524-0xamarin11 
 libmono-management4.0-cil=4.8.0.524-0xamarin11 
 libmono-messaging4.0-cil=4.8.0.524-0xamarin11 
 libmono-messaging-rabbitmq4.0-cil=4.8.0.524-0xamarin11 
 libmono-microsoft-build4.0-cil=4.8.0.524-0xamarin11 
 libmono-microsoft-build-engine4.0-cil=4.8.0.524-0xamarin11 
 libmono-microsoft-build-framework4.0-cil=4.8.0.524-0xamarin11 
 libmono-microsoft-build-tasks-v4.0-4.0-cil=4.8.0.524-0xamarin11 
 libmono-microsoft-build-utilities-v4.0-4.0-cil=4.8.0.524-0xamarin11 
 libmono-microsoft-csharp4.0-cil=4.8.0.524-0xamarin11 
 libmono-microsoft-visualc10.0-cil=4.8.0.524-0xamarin11 
 libmono-microsoft-web-infrastructure1.0-cil=4.8.0.524-0xamarin11 
 libmono-oracle4.0-cil=4.8.0.524-0xamarin11 
 libmono-parallel4.0-cil=4.8.0.524-0xamarin11 
 libmono-peapi4.0a-cil=4.8.0.524-0xamarin11 
 libmono-posix4.0-cil=4.8.0.524-0xamarin11 
 libmono-rabbitmq4.0-cil=4.8.0.524-0xamarin11 
 libmono-relaxng4.0-cil=4.8.0.524-0xamarin11 
 libmono-security4.0-cil=4.8.0.524-0xamarin11 
 libmono-sharpzip4.84-cil=4.8.0.524-0xamarin11 
 libmono-simd4.0-cil=4.8.0.524-0xamarin11 
 libmono-smdiagnostics0.0-cil=4.8.0.524-0xamarin11 
 libmono-sqlite4.0-cil=4.8.0.524-0xamarin11 
 libmono-system4.0-cil=4.8.0.524-0xamarin11 
 libmono-system-componentmodel-composition4.0-cil=4.8.0.524-0xamarin11 
 libmono-system-componentmodel-dataannotations4.0-cil=4.8.0.524-0xamarin11 
 libmono-system-configuration4.0-cil=4.8.0.524-0xamarin11 
 libmono-system-configuration-install4.0-cil=4.8.0.524-0xamarin11 
 libmono-system-core4.0-cil=4.8.0.524-0xamarin11 
 libmono-system-data4.0-cil=4.8.0.524-0xamarin11 
 libmono-system-data-datasetextensions4.0-cil=4.8.0.524-0xamarin11 
 libmono-system-data-entity4.0-cil=4.8.0.524-0xamarin11 
 libmono-system-data-linq4.0-cil=4.8.0.524-0xamarin11 
 libmono-system-data-services4.0-cil=4.8.0.524-0xamarin11 
 libmono-system-data-services-client4.0-cil=4.8.0.524-0xamarin11 
 libmono-system-deployment4.0-cil=4.8.0.524-0xamarin11 
 libmono-system-design4.0-cil=4.8.0.524-0xamarin11 
 libmono-system-drawing4.0-cil=4.8.0.524-0xamarin11 
 libmono-system-drawing-design4.0-cil=4.8.0.524-0xamarin11 
 libmono-system-dynamic4.0-cil=4.8.0.524-0xamarin11 
 libmono-system-enterpriseservices4.0-cil=4.8.0.524-0xamarin11 
 libmono-system-identitymodel4.0-cil=4.8.0.524-0xamarin11 
 libmono-system-identitymodel-selectors4.0-cil=4.8.0.524-0xamarin11 
 libmono-system-io-compression4.0-cil=4.8.0.524-0xamarin11 
 libmono-system-io-compression-filesystem4.0-cil=4.8.0.524-0xamarin11 
 libmono-system-json4.0-cil=4.8.0.524-0xamarin11 
 libmono-system-json-microsoft4.0-cil=4.8.0.524-0xamarin11 
 libmono-system-ldap4.0-cil=4.8.0.524-0xamarin11 
 libmono-system-ldap-protocols4.0-cil=4.8.0.524-0xamarin11 
 libmono-system-management4.0-cil=4.8.0.524-0xamarin11 
 libmono-system-messaging4.0-cil=4.8.0.524-0xamarin11 
 libmono-system-net4.0-cil=4.8.0.524-0xamarin11 
 libmono-system-net-http4.0-cil=4.8.0.524-0xamarin11 
 libmono-system-net-http-formatting4.0-cil=4.8.0.524-0xamarin11 
 libmono-system-net-http-webrequest4.0-cil=4.8.0.524-0xamarin11 
 libmono-system-numerics4.0-cil=4.8.0.524-0xamarin11 
 libmono-system-numerics-vectors4.0-cil=4.8.0.524-0xamarin11 
 libmono-system-reactive-core2.2-cil=4.8.0.524-0xamarin11 
 libmono-system-reactive-debugger2.2-cil=4.8.0.524-0xamarin11 
 libmono-system-reactive-experimental2.2-cil=4.8.0.524-0xamarin11 
 libmono-system-reactive-interfaces2.2-cil=4.8.0.524-0xamarin11 
 libmono-system-reactive-linq2.2-cil=4.8.0.524-0xamarin11 
 libmono-system-reactive-observable-aliases0.0-cil=4.8.0.524-0xamarin11 
 libmono-system-reactive-platformservices2.2-cil=4.8.0.524-0xamarin11 
 libmono-system-reactive-providers2.2-cil=4.8.0.524-0xamarin11 
 libmono-system-reactive-runtime-remoting2.2-cil=4.8.0.524-0xamarin11 
 libmono-system-reactive-windows-forms2.2-cil=4.8.0.524-0xamarin11 
 libmono-system-reactive-windows-threading2.2-cil=4.8.0.524-0xamarin11 
 libmono-system-reflection-context4.0-cil=4.8.0.524-0xamarin11 
 libmono-system-runtime4.0-cil=4.8.0.524-0xamarin11 
 libmono-system-runtime-caching4.0-cil=4.8.0.524-0xamarin11 
 libmono-system-runtime-durableinstancing4.0-cil=4.8.0.524-0xamarin11 
 libmono-system-runtime-interopservices-runtimeinformation4.0-cil=4.8.0.524-0xamarin11 
 libmono-system-runtime-serialization4.0-cil=4.8.0.524-0xamarin11 
 libmono-system-runtime-serialization-formatters-soap4.0-cil=4.8.0.524-0xamarin11 
 libmono-system-security4.0-cil=4.8.0.524-0xamarin11 
 libmono-system-servicemodel4.0a-cil=4.8.0.524-0xamarin11 
 libmono-system-servicemodel-activation4.0-cil=4.8.0.524-0xamarin11 
 libmono-system-servicemodel-discovery4.0-cil=4.8.0.524-0xamarin11 
 libmono-system-servicemodel-internals0.0-cil=4.8.0.524-0xamarin11 
 libmono-system-servicemodel-routing4.0-cil=4.8.0.524-0xamarin11 
 libmono-system-servicemodel-web4.0-cil=4.8.0.524-0xamarin11 
 libmono-system-serviceprocess4.0-cil=4.8.0.524-0xamarin11 
 libmono-system-threading-tasks-dataflow4.0-cil=4.8.0.524-0xamarin11 
 libmono-system-transactions4.0-cil=4.8.0.524-0xamarin11 
 libmono-system-web4.0-cil=4.8.0.524-0xamarin11 
 libmono-system-web-abstractions4.0-cil=4.8.0.524-0xamarin11 
 libmono-system-web-applicationservices4.0-cil=4.8.0.524-0xamarin11 
 libmono-system-web-dynamicdata4.0-cil=4.8.0.524-0xamarin11 
 libmono-system-web-extensions4.0-cil=4.8.0.524-0xamarin11 
 libmono-system-web-extensions-design4.0-cil=4.8.0.524-0xamarin11 
 libmono-system-web-http4.0-cil=4.8.0.524-0xamarin11 
 libmono-system-web-http-selfhost4.0-cil=4.8.0.524-0xamarin11 
 libmono-system-web-http-webhost4.0-cil=4.8.0.524-0xamarin11 
 libmono-system-web-mobile4.0-cil=4.8.0.524-0xamarin11 
 libmono-system-web-mvc3.0-cil=4.8.0.524-0xamarin11 
 libmono-system-web-razor2.0-cil=4.8.0.524-0xamarin11 
 libmono-system-web-regularexpressions4.0-cil=4.8.0.524-0xamarin11 
 libmono-system-web-routing4.0-cil=4.8.0.524-0xamarin11 
 libmono-system-web-services4.0-cil=4.8.0.524-0xamarin11 
 libmono-system-web-webpages2.0-cil=4.8.0.524-0xamarin11 
 libmono-system-web-webpages-deployment2.0-cil=4.8.0.524-0xamarin11 
 libmono-system-web-webpages-razor2.0-cil=4.8.0.524-0xamarin11 
 libmono-system-windows4.0-cil=4.8.0.524-0xamarin11 
 libmono-system-windows-forms4.0-cil=4.8.0.524-0xamarin11 
 libmono-system-windows-forms-datavisualization4.0a-cil=4.8.0.524-0xamarin11 
 libmono-system-workflow-activities4.0-cil=4.8.0.524-0xamarin11 
 libmono-system-workflow-componentmodel4.0-cil=4.8.0.524-0xamarin11 
 libmono-system-workflow-runtime4.0-cil=4.8.0.524-0xamarin11 
 libmono-system-xaml4.0-cil=4.8.0.524-0xamarin11 
 libmono-system-xml4.0-cil=4.8.0.524-0xamarin11 
 libmono-s

以上是关于如何在Ubuntu 16.04上安装mono 4.8的主要内容,如果未能解决你的问题,请参考以下文章

Ubuntu 16.04环境布署小记

Ubuntu 16.04安装Fiddler抓包工具(基于Mono,且会有BUG)

如何在 Ubuntu 上安装最新版本的 Mono 和 MonoDevelop?

如何在UBUNTU 16.04上安装桌面模式中的PGADMIN 4

如何在ubuntu 12.04上安装Qt 4.8.4

如何在Ubuntu 16.04上安装和osquitto MQTT消息传递代理