首页
> 计算机技术
> 操作系统
> Ubuntu
Linux系统安装mono开发环境
原创 lihf8515 2026年01月27日 10:30
来源:本站 阅读:69
1、添加Mono仓库到你的系统
使用以下命令:
Ubuntu 20.04 and later (amd64, armhf, arm64, ppc64el)
sudo apt install ca-certificates gnupg
sudo gpg --homedir /tmp --no-default-keyring --keyring gnupg-ring:/usr/share/keyrings/mono-official-archive-keyring.gpg --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
sudo chmod +r /usr/share/keyrings/mono-official-archive-keyring.gpg
echo "deb [signed-by=/usr/share/keyrings/mono-official-archive-keyring.gpg] https://download.mono-project.com/repo/ubuntu stable-focal main" | sudo tee /etc/apt/sources.list.d/mono-official-stable.list
sudo apt update
Debian 10 and later (i386, amd64, armhf, arm64, armel, ppc64el)
sudo apt install dirmngr ca-certificates gnupg
sudo gpg --homedir /tmp --no-default-keyring --keyring gnupg-ring:/usr/share/keyrings/mono-official-archive-keyring.gpg --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
sudo chmod +r /usr/share/keyrings/mono-official-archive-keyring.gpg
echo "deb [signed-by=/usr/share/keyrings/mono-official-archive-keyring.gpg] https://download.mono-project.com/repo/debian stable-buster main" | sudo tee /etc/apt/sources.list.d/mono-official-stable.list
sudo apt update
注意:在Debian 13(Trixie)及更高版本中,系统会为密钥所使用的SHA1算法发出过期警告。您可通过遵循/usr/share/apt/default-sequoia.config中的说明来延长过期日期。
Raspbian 10 and later (armhf)
sudo apt install dirmngr ca-certificates gnupg
sudo gpg --homedir /tmp --no-default-keyring --keyring gnupg-ring:/usr/share/keyrings/mono-official-archive-keyring.gpg --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
sudo chmod +r /usr/share/keyrings/mono-official-archive-keyring.gpg
echo "deb [signed-by=/usr/share/keyrings/mono-official-archive-keyring.gpg] https://download.mono-project.com/repo/debian stable-raspbianbuster main" | sudo tee /etc/apt/sources.list.d/mono-official-stable.list
sudo apt update
2、 安装Mono
sudo apt install mono-devel
3、验证
为了验证是否安装成功,使用以下命令验证:
lhf@lhf-pc:~$ mono --version
Mono JIT compiler version 6.12.0.200 (tarball Tue Jul 11 21:37:50 UTC 2023)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
TLS: __thread
SIGSEGV: altstack
Notifications: epoll
Architecture: amd64
Disabled: none
Misc: softdebug
Interpreter: yes
LLVM: yes(610)
Suspend: hybrid
GC: sgen (concurrent by default)
备注
Linux 3.12之前的Mono默认不信任任何SSL证书,因此在访问HTTPS资源时出错。3.12及更高版本不再需要此功能,因为它包含一个在软件包安装时运行的新工具,并将Mono的证书存储与系统证书存储同步(在旧版本上,您必须通过运行mozroots-import--sync来导入Mozilla的受信任证书列表)。某些系统的配置方式使得在安装Mono时不会引入必要的包,在这种情况下,请确保安装了ca证书Mono包。

作者
昵称:君子如兰
注册时间:2025-01-31 02:47:34
最近更新:2026-01-27 10:21:01
文章总数:95篇
原创 89篇
转载 6篇
相关文章
阅读排行榜
皖公网安备34130202000765号