我最近读到Mono 3.0已经发布了C#5编译器并支持MVC 4:
http://www.mono-project.com/Release_Notes_Mono_3.0
和
http://tirania.org/blog/archive/2012/Oct-22.html
对于我的生活,我无法找到从哪里获得它作为Linux或甚至Windows的包.
此页面似乎表明它仍处于测试阶段:
http://www.go-mono.com/mono-downloads/download.html
我试过apt-get install mono-complete在Ubuntu 12.10上做一个但它安装了2.10.8.1.
我已经尝试在我的Windows机器上安装MonoDevelop 3,这只是向我展示了MVC 3项目,并且似乎正在使用.NET框架.
我对Mono完全陌生,我用Google搜索了所有可能的东西,试着看看它是如何工作的,但我感到很困惑.如果可能的话,我希望能在Linux上使用它并尝试一些东西.
有人可以对此有所了解,还是我需要从源头构建这个?
Dom*_*ult 107
Here is the complete guide for installing mono 3.0.1
For Beginners who don't know how to get the new Mono 3.0.1 version on Ubuntu 12.04 (Because i'm a beginner and i've been working on this for 3 days before making it work)
Getting root access to install and configure Mono 3.0.1
sudo -s
***type your root password***
Run Code Online (Sandbox Code Playgroud)
Install vim editor
apt-get install vim
Run Code Online (Sandbox Code Playgroud)
Install apache2
apt-get install apache2
Run Code Online (Sandbox Code Playgroud)
Install tools for compiling mono
apt-get install autoconf automake libtool g++ gettext libglib2.0-dev libpng12-dev libfontconfig1-dev
apt-get install mono-gmcs
apt-get install git
Run Code Online (Sandbox Code Playgroud)
Install apache2-threaded-dev (needed for compiling mod_mono)*
apt-get install apache2-threaded-dev
Run Code Online (Sandbox Code Playgroud)
We will return to apache2 configuration later
Making the structure we need for getting the source code
cd /opt
mkdir mono-3.0
Run Code Online (Sandbox Code Playgroud)
Move into that new folder before getting the source code
cd /opt/mono-3.0
Run Code Online (Sandbox Code Playgroud)
Getting the source code from GitHub
git clone git://github.com/mono/mono.git
git clone git://github.com/mono/xsp.git
git clone git://github.com/mono/libgdiplus.git
git clone git://github.com/mono/mod_mono.git
Run Code Online (Sandbox Code Playgroud)
Compile libgdiplus
cd /opt/mono-3.0/libgdiplus
./autogen.sh --prefix=/usr (the prefix is very important for Ubuntu 12.04)
make
make install
Run Code Online (Sandbox Code Playgroud)
Compile mono
cd /opt/mono-3.0/mono/
make clean
./autogen.sh --prefix=/usr (the prefix is very important for Ubuntu 12.04)
make
make install
Run Code Online (Sandbox Code Playgroud)
Compile xsp
cd /opt/mono-3.0/xsp
./autogen.sh --prefix=/usr (the prefix is very important for Ubuntu 12.04)
make
make install
Run Code Online (Sandbox Code Playgroud)
Compile mod_mono
cd /opt/mono-3.0/mod_mono
./autogen.sh --prefix=/usr (the prefix is very important for Ubuntu 12.04)
make
make install
Run Code Online (Sandbox Code Playgroud)
After the installation of mod_mono, the file mod_mono.conf *as been added to your apache2 folder(/etc/apache2)*
Configuring apache2
Configure the default site of apache ### (optional*)**
vim /etc/apache2/sites-available/default
Modify the line "DocumentRoot /var/www" by "DocumentRoot /var/www/YourFolder" (YourFolder is the folder where you publishing your website!)
Run Code Online (Sandbox Code Playgroud)
Configure the rights to YourFolder (optional*)**
cd /var/www/YourFolder
sudo chown -R root:www-data .
sudo chmod -R 774 .
sudo usermod -a -G www-data <yourusername>
Run Code Online (Sandbox Code Playgroud)
Adding the mod_mono include in apache2.conf
vim /etc/apache2/apache2.conf
Add "Include /etc/apache2/mod_mono.conf" at the end of the file (without quotes!)
Run Code Online (Sandbox Code Playgroud)
Adding the pointer to ASP .NET 4.0 in mod_mono.conf
vim /etc/apache2/mod_mono.conf
Add "MonoServerPath /usr/bin/mod-mono-server4" (without quotes!) under the "If Modules condition"
Run Code Online (Sandbox Code Playgroud)
Restart the apache2 server /etc/init.d/apache2 restart
kno*_*cte 47
Mono 3.x对于Ubuntu 12.10来说太过分了.以这种方式从directhex的PPA中获取预览包(这将安装3.2.1):
sudo add-apt-repository ppa:directhex/monoxide
Run Code Online (Sandbox Code Playgroud)
(如果你使用Ubuntu 13.10鲁莽的,添加库后,你需要编辑的文件/etc/apt/sources.list.d/directhex-monoxide-saucy.list,并替换单词俏皮与铆足了劲)
然后,在那之后:
sudo apt-get update && sudo apt-get dist-upgrade
Run Code Online (Sandbox Code Playgroud)
如果您之前安装了monodevelop,这也将为您提供MonoDevelop 4.x.
注意:direchtex不是一个创建PPA的随机人,他是所有Mono和Mono包的Debian/Ubuntu维护团队的一员.因此,使用它是升级基础架构的最官方方式.
对于那里的debian用户:mono 3.0.6和MonoDevelop 4.0.x 已经可以在debian测试中使用.所以我建议得到的是:
sudo apt-get purge mono-runtime(执行此操作后,抵制诱惑,sudo apt-get autoremove或者您将破坏您的系统,这是我在此报告的错误)./etc/apt/sources.list,找到提到main源的第一行,并将单词重命名jessie为sid.sudo apt-get update.sudo apt-get install monodevelop,它也会将mono作为依赖项.这样你就有了或多或少的现代发行版(而不是debian stable),还有非常非常现代的单声道包(Mono的最新版本通常非常稳定).
F#用户:Mono 3.0.6有一个错误,阻止此语言在此版本中运行,请改用Mono 3.2.x.
小智 8
我已经从源代码安装mono 3.x到Ubuntu Raring的几个步骤:
1:获取依赖项,一次性命中:
sudo apt-get install build-essential autoconf automake \
bison flex gtk-sharp2-gapi boo gdb valac libfontconfig1-dev \
libcairo2-dev libpango1.0-dev libfreetype6-dev libexif-dev \
libtiff4-dev libgif-dev zlib1g-dev libatk1.0-dev libjpeg8-dev \
libjpeg-turbo8-dev libglib2.0-dev libgtk2.0-dev libglade2-dev \
libart-2.0-dev libgnomevfs2-dev libgnome-desktop-dev \
libgnome2-dev libgnomecanvas2-dev libgnomeui-dev libgnomeprint2.2-dev \
libgnomeprintui2.2-dev libpanel-applet-4-dev \
libnautilus-extension-dev librsvg2-dev libgtkhtml3.14-dev \
libgtksourceview2.0-dev libgtksourceview2.0-dev libvte-dev \
libwnck-dev libnspr4-dev libnss3-dev libwebkit-dev libvala-0.18-dev
Run Code Online (Sandbox Code Playgroud)
2:在某处创建一个文件夹以保存源:
sudo mkdir /opt/mono-3
Run Code Online (Sandbox Code Playgroud)
3:用git克隆到文件夹中
cd /opt/mono-3
sudo git clone git://github.com/mono/mono.git
cd mono
sudo git checkout mono-3.0.12
Run Code Online (Sandbox Code Playgroud)
4:构建和安装
sudo ./autogen.sh --prefix=/usr/local
sudo make
sudo make install
Run Code Online (Sandbox Code Playgroud)
而已!
要获取System.Drawing.dll和System.Windows.Forms.dll中的最新更改,还需要配置,构建和安装libgdiplus.
cd libgdiplus
./autogen.sh --prefix=/usr/local
make
make install
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
58734 次 |
| 最近记录: |