備忘録

備忘録

CentOS 7.xにmonoをインストールする

やり方

この3行を実行するだけ。

rpm --import "http://keyserver.ubuntu.com/pks/lookup?op=get&search=0x3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF"
yum-config-manager --add-repo http://download.mono-project.com/repo/centos/
yum -y install mono-complete

インストールするパッケージについて

今回追加したリポジトリの中には、
mono-complete 以外にも mono-devel や referenceassemblies-pcl などのパッケージが提供されています。

mono-devel が最小のパッケージとなりますが、
"assembly not found" などと表示されるエラーを回避するために、
最初から全てが入ったmono-completeの利用をおすすめします。

以下公式より抜粋

mono-devel

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

mono-complete

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

referenceassemblies-pcl

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.

ca-certificates-mono

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.

mono-xsp4

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