如何在不从源代码编译的情况下在 Centos 5 上安装 MONO
How can I install MONO on Centos 5, without compiling from source
我想在 CentOs 5 系统上安装一个相当新的 Mono 版本。理想情况下,我宁愿不必从源代码构建。
我在 yum.repos.d
中设置了一个 mono.repo
文件:
[mono]
name=Mono Stack (RHEL_5)
type=rpm-md
baseurl=http://download.mono-project.com/repo/centos/
gpgcheck=1
gpgkey=http://download.mono-project.com/repo/centos/repodata/repomd.xml.asc
enabled=1
当我尝试使用 repo 时,我得到了 Error performing checksum
。然而,我发现了this link。它告诉我安装 python-hashlib
,这解决了问题。
然后运行安装命令:
yum install monodevelop
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirror.ubiquityservers.com
* epel: mirror.steadfast.net
* extras: cosmos.cites.illinois.edu
* updates: mirror.tzulo.com
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package monodevelop.noarch 0:5.9.0.431-2 set to be updated
--> Processing Dependency: mono-devel for package: monodevelop
--> Processing Dependency: xsp for package: monodevelop
--> Processing Dependency: mono-basic for package: monodevelop
--> Processing Dependency: mono-web for package: monodevelop
--> Processing Dependency: NUnit for package: monodevelop
--> Running transaction check
---> Package NUnit.noarch 0:2.6.3-0 set to be updated
--> Processing Dependency: mono(System.Windows.Forms) = 2.0.0.0 for package: NUnit
---> Package mono-core.i386 0:1.2.4-2.el5.centos set to be updated
--> Processing Dependency: libgdiplus for package: mono-core
---> Package mono-devel.i386 0:1.2.6-6.1.el5 set to be updated
--> Processing Dependency: mono-core = 1.2.6-6.1.el5 for package: mono-devel
--> Processing Dependency: mono(Mono.Cecil) = 0.6.8.8607 for package: mono-devel
---> Package mono-web.i386 0:1.2.6-6.1.el5 set to be updated
--> Processing Dependency: mono(System.EnterpriseServices) = 2.0.0.0 for package: mono-web
--> Processing Dependency: mono(System.EnterpriseServices) = 1.0.5000.0 for package: mono-web
--> Processing Dependency: mono(System.Data) = 2.0.0.0 for package: mono-web
--> Processing Dependency: mono(System.Data) = 1.0.5000.0 for package: mono-web
---> Package xsp.i386 0:1.2.1-1.el5.centos set to be updated
--> Running transaction check
---> Package libgdiplus.i386 0:1.2.6-1.el5 set to be updated
--> Processing Dependency: libungif.so.4 for package: libgdiplus
---> Package mono-core.i386 0:1.2.4-2.el5.centos set to be updated
--> Processing Dependency: mono-basic for package: monodevelop
---> Package mono-core.i386 0:1.2.6-6.1.el5 set to be updated
---> Package mono-data.i386 0:1.2.6-6.1.el5 set to be updated
---> Package mono-winforms.i386 0:1.2.6-6.1.el5 set to be updated
--> Processing Dependency: libgdiplus-devel for package: mono-winforms
--> Running transaction check
---> Package giflib.i386 0:4.1.3-7.3.3.el5 set to be updated
---> Package libgdiplus-devel.i386 0:1.2.6-1.el5 set to be updated
---> Package mono-basic.noarch 0:4.0.1-1 set to be updated
--> Processing Dependency: mono(System.Windows.Forms) = 4.0.0.0 for package: mono-basic
--> Processing Dependency: mono(System.Drawing) = 4.0.0.0 for package: mono-basic
--> Processing Dependency: mono(System) = 4.0.0.0 for package: mono-basic
--> Processing Dependency: mono(System.Core) = 4.0.0.0 for package: mono-basic
--> Processing Dependency: mono(mscorlib) = 4.0.0.0 for package: mono-basic
--> Finished Dependency Resolution
mono-basic-4.0.1-1.noarch from mono has depsolving problems
--> Missing Dependency: mono(System.Core) = 4.0.0.0 is needed by package mono-basic-4.0.1-1.noarch (mono)
mono-basic-4.0.1-1.noarch from mono has depsolving problems
--> Missing Dependency: mono(mscorlib) = 4.0.0.0 is needed by package mono-basic-4.0.1-1.noarch (mono)
mono-basic-4.0.1-1.noarch from mono has depsolving problems
--> Missing Dependency: mono(System) = 4.0.0.0 is needed by package mono-basic-4.0.1-1.noarch (mono)
mono-basic-4.0.1-1.noarch from mono has depsolving problems
--> Missing Dependency: mono(System.Drawing) = 4.0.0.0 is needed by package mono-basic-4.0.1-1.noarch (mono)
mono-basic-4.0.1-1.noarch from mono has depsolving problems
--> Missing Dependency: mono(System.Windows.Forms) = 4.0.0.0 is needed by package mono-basic-4.0.1-1.noarch (mono)
Error: Missing Dependency: mono(System.Core) = 4.0.0.0 is needed by package mono-basic-4.0.1-1.noarch (mono)
Error: Missing Dependency: mono(System) = 4.0.0.0 is needed by package mono-basic-4.0.1-1.noarch (mono)
Error: Missing Dependency: mono(mscorlib) = 4.0.0.0 is needed by package mono-basic-4.0.1-1.noarch (mono)
Error: Missing Dependency: mono(System.Drawing) = 4.0.0.0 is needed by package mono-basic-4.0.1-1.noarch (mono)
Error: Missing Dependency: mono(System.Windows.Forms) = 4.0.0.0 is needed by package mono-basic-4.0.1-1.noarch (mono)
现在我卡住了!
答案是使用 https://lbs.solidcharity.com/package/tpokorra/mono/mono-opt
中的预构建包
感谢 Timotheus Pokorra 提供它们。
注意:您需要将提供的 env.sh
添加到 /etc/profile.d
(或您的个人配置文件)以设置必要的环境变量。
要使用 libgdiplus,您还需要将 /usr/local/lib
添加到 /etc/ld.so.conf
(或者,更好的是,将包含该文本的文件添加到 /etc/ld.so.conf.d
)。
我想在 CentOs 5 系统上安装一个相当新的 Mono 版本。理想情况下,我宁愿不必从源代码构建。
我在 yum.repos.d
中设置了一个 mono.repo
文件:
[mono]
name=Mono Stack (RHEL_5)
type=rpm-md
baseurl=http://download.mono-project.com/repo/centos/
gpgcheck=1
gpgkey=http://download.mono-project.com/repo/centos/repodata/repomd.xml.asc
enabled=1
当我尝试使用 repo 时,我得到了 Error performing checksum
。然而,我发现了this link。它告诉我安装 python-hashlib
,这解决了问题。
然后运行安装命令:
yum install monodevelop
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirror.ubiquityservers.com
* epel: mirror.steadfast.net
* extras: cosmos.cites.illinois.edu
* updates: mirror.tzulo.com
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package monodevelop.noarch 0:5.9.0.431-2 set to be updated
--> Processing Dependency: mono-devel for package: monodevelop
--> Processing Dependency: xsp for package: monodevelop
--> Processing Dependency: mono-basic for package: monodevelop
--> Processing Dependency: mono-web for package: monodevelop
--> Processing Dependency: NUnit for package: monodevelop
--> Running transaction check
---> Package NUnit.noarch 0:2.6.3-0 set to be updated
--> Processing Dependency: mono(System.Windows.Forms) = 2.0.0.0 for package: NUnit
---> Package mono-core.i386 0:1.2.4-2.el5.centos set to be updated
--> Processing Dependency: libgdiplus for package: mono-core
---> Package mono-devel.i386 0:1.2.6-6.1.el5 set to be updated
--> Processing Dependency: mono-core = 1.2.6-6.1.el5 for package: mono-devel
--> Processing Dependency: mono(Mono.Cecil) = 0.6.8.8607 for package: mono-devel
---> Package mono-web.i386 0:1.2.6-6.1.el5 set to be updated
--> Processing Dependency: mono(System.EnterpriseServices) = 2.0.0.0 for package: mono-web
--> Processing Dependency: mono(System.EnterpriseServices) = 1.0.5000.0 for package: mono-web
--> Processing Dependency: mono(System.Data) = 2.0.0.0 for package: mono-web
--> Processing Dependency: mono(System.Data) = 1.0.5000.0 for package: mono-web
---> Package xsp.i386 0:1.2.1-1.el5.centos set to be updated
--> Running transaction check
---> Package libgdiplus.i386 0:1.2.6-1.el5 set to be updated
--> Processing Dependency: libungif.so.4 for package: libgdiplus
---> Package mono-core.i386 0:1.2.4-2.el5.centos set to be updated
--> Processing Dependency: mono-basic for package: monodevelop
---> Package mono-core.i386 0:1.2.6-6.1.el5 set to be updated
---> Package mono-data.i386 0:1.2.6-6.1.el5 set to be updated
---> Package mono-winforms.i386 0:1.2.6-6.1.el5 set to be updated
--> Processing Dependency: libgdiplus-devel for package: mono-winforms
--> Running transaction check
---> Package giflib.i386 0:4.1.3-7.3.3.el5 set to be updated
---> Package libgdiplus-devel.i386 0:1.2.6-1.el5 set to be updated
---> Package mono-basic.noarch 0:4.0.1-1 set to be updated
--> Processing Dependency: mono(System.Windows.Forms) = 4.0.0.0 for package: mono-basic
--> Processing Dependency: mono(System.Drawing) = 4.0.0.0 for package: mono-basic
--> Processing Dependency: mono(System) = 4.0.0.0 for package: mono-basic
--> Processing Dependency: mono(System.Core) = 4.0.0.0 for package: mono-basic
--> Processing Dependency: mono(mscorlib) = 4.0.0.0 for package: mono-basic
--> Finished Dependency Resolution
mono-basic-4.0.1-1.noarch from mono has depsolving problems
--> Missing Dependency: mono(System.Core) = 4.0.0.0 is needed by package mono-basic-4.0.1-1.noarch (mono)
mono-basic-4.0.1-1.noarch from mono has depsolving problems
--> Missing Dependency: mono(mscorlib) = 4.0.0.0 is needed by package mono-basic-4.0.1-1.noarch (mono)
mono-basic-4.0.1-1.noarch from mono has depsolving problems
--> Missing Dependency: mono(System) = 4.0.0.0 is needed by package mono-basic-4.0.1-1.noarch (mono)
mono-basic-4.0.1-1.noarch from mono has depsolving problems
--> Missing Dependency: mono(System.Drawing) = 4.0.0.0 is needed by package mono-basic-4.0.1-1.noarch (mono)
mono-basic-4.0.1-1.noarch from mono has depsolving problems
--> Missing Dependency: mono(System.Windows.Forms) = 4.0.0.0 is needed by package mono-basic-4.0.1-1.noarch (mono)
Error: Missing Dependency: mono(System.Core) = 4.0.0.0 is needed by package mono-basic-4.0.1-1.noarch (mono)
Error: Missing Dependency: mono(System) = 4.0.0.0 is needed by package mono-basic-4.0.1-1.noarch (mono)
Error: Missing Dependency: mono(mscorlib) = 4.0.0.0 is needed by package mono-basic-4.0.1-1.noarch (mono)
Error: Missing Dependency: mono(System.Drawing) = 4.0.0.0 is needed by package mono-basic-4.0.1-1.noarch (mono)
Error: Missing Dependency: mono(System.Windows.Forms) = 4.0.0.0 is needed by package mono-basic-4.0.1-1.noarch (mono)
现在我卡住了!
答案是使用 https://lbs.solidcharity.com/package/tpokorra/mono/mono-opt
中的预构建包感谢 Timotheus Pokorra 提供它们。
注意:您需要将提供的 env.sh
添加到 /etc/profile.d
(或您的个人配置文件)以设置必要的环境变量。
要使用 libgdiplus,您还需要将 /usr/local/lib
添加到 /etc/ld.so.conf
(或者,更好的是,将包含该文本的文件添加到 /etc/ld.so.conf.d
)。