Preface Ubuntu10.10 comes with Mono2.6.7. The latest version is Mono2.8.2. Because software such as "a note" in the Ubuntu operating system is developed in C #, they depend on Mono. To avoid damaging such software in the Ubuntu operating system, we need to install Mono2.8.2 in parallel. The specific method is to install it in the/opt/mono-2.8.2 directory. In this way, the two versions of Mono can coexist. Prerequisites
Ubuntu 10.10 comes with Mono 2.6.7. The latest version is Mono 2.8.2. Because software such as "a note" in the Ubuntu operating system is developed in C #, they depend on Mono. To avoid damaging the software in the Ubuntu operating system, we need to install Mono 2.8.2 in parallel. The specific method is to install mono 2.8.2 in the/opt/Mono-2.8.2 directory. In this way, the two versions of Mono can coexist.
Preparations
First, prepare the compiling environment and run the following command to install it:
ben@ben-m4000t:~$ sudo apt-get install build-essential automake libtool mono-complete gendarme subversion libpng-dev libtiff-dev libgif-dev libjpeg-dev libexif-dev autoconf bison flex libcairo-dev libpango1.0-dev
The above build-essential software package is a basic compilation environment, including the C/C ++ compiler. Mono-complete is the compilation environment of Mono, including the C # compiler. By default, the Ubuntu operating system installs the Mono runtime environment, excluding the compilation environment.You are not mistaken. To compile Mono 2.8.2 from the source code, first install a default Mono compiling environment provided by the operating system,For the Ubuntu 10.10 operating system, it is the compiling environment of Mono 2.6.7. The core of Mono source code is written in C/C ++, and may be written in assembly language. However, there is a large part, such as. NET Framework Base Class Library, which is written in C.Therefore, to compile a higher version of Mono from the source code, you must first install a lower version of Mono.(This sentence is incorrect)
Compile Mono 2.8.2 from source code
Now let's compile one from the Mono source code:
Ben@ben-m4000t :~ $Cd srcBen@ben-m4000t :~ /Src $Wget http://ftp.novell.com/pub/mono/sources/mono/mono-2.8.2.tar.bz2-- 10:02:49 -- ftp.novell.com... 130.57.1.88 is connecting to ftp.novell.com | 130.57.1.88 |: 80... already connected. An HTTP request has been sent and is waiting for response... 200 OK length: 31292886 (30 M) [application/x-bzip2] saving: export mono-2.8.2.tar.bz2 "100% [=====================>] 31,292,886 15.5 K/s flowers 28 m 14s2011-01-07 10:31:04 (18.0 KB/s) -Saved mongomono-2.8.2.tar.bz2 "[31292886/31292886]) ben @ ben-m4000t :~ /Src $Tar xjf mono-2.8.2.tar.bz2Ben@ben-m4000t :~ /Src $Rm mono-2.8.2.tar.bz2Ben@ben-m4000t :~ /Src $Cd mono-2.8.2Ben@ben-m4000t :~ /Src/mono-2.8.2 $./Configure-- Prefix =/opt/mono-2.8.2========> A large number of outputs are omitted here <============Mcs source: mcs olive source: Engine: GC: sgen and bundled Boehm GC with typed GC and parallel markGLIB: embeddedTLS: _ threadSIGALTSTACK: yesEngine: Building and using the JIToprofile: noBigArrays: noDTrace: noParallel Mark: yesLLVM Back End: no (dynamically loaded: no) Libraries: Moon Profile: noMonoTouch: noJNI support: IKVM finished: assumed to be installedzlib: system zlibben @ ben-m4000t: ~ /Src/mono-2.8.2 $Make====> Here is a long compilation process and generates a lot of output.Ben@ben-m4000t :~ /Src/mono-2.8.2 $Sudo make install==> Here, the installation process is not so long and a lot of output is generated. <===Ben@ben-m4000t :~ /Src/mono-2.8.2 $
Note that the -- prefix =/opt/mono-2.8.2 parameter is used for compiling and configuration environments. This is the key to parallel installation. If this parameter is omitted, the original version of Mono 2.6.7 will be overwritten during installation using make install.