ubuntu13.10 Compile installation Mono environment (i) _linux

Source: Internet
Author: User
Tags bz2 mkdir

Preparatory work

A newly installed ubuntu13.10 system

Download mono source code and compile

nike@nike-pc:~$ ls Desktop Downloads Music public Videos Documents examples.desktop Pictures Templates nike@nike-pc:~$ mk dir src nike@nike-pc:~$ cd src nike@nike-pc:~/src$ wget http://download.mono-project.com/sources/mono/
mono-3.2.8.tar.bz2--2014-03-27 21:24:30--http://download.mono-project.com/sources/mono/mono-3.2.8.tar.bz2 Resolving download.mono-project.com (download.mono-project.com) ...
54.240.168.102, 54.230.156.158, 54.230.157.116, ... Connecting to Download.mono-project.com (download.mono-project.com) |54.240.168.102|:80 ...
Connected. HTTP request sent, awaiting response ... OK length:77515552 (74M) [application/x-bzip2] saving to: ' mono-3.2.8.tar.bz2 ' 100%[============================== ========&GT] 77,515,552 189k/s in 10m 50s nike@nike-pc:~/src$ ls mono-3.2.8.tar.bz2 nike@nike-pc:~/src$ tar-xjf.
2.8.tar.bz2 nike@nike-pc:~/src$ cd mono-3.2.8/nike@nike-pc:~/src/mono-3.2.8$./configure--prefix=/opt/mono-3.2.8 Checking build system type ... i686-pc-linux-gnu cheCking host system type ... i686-pc-linux-gnu checking target system type ... i686-pc-linux-gnu checking for a bsd-compatible Install/usr/bin/install-c Checking whether build environment is sane ... yes checking for a thread-safe mkdir-p .../ Bin/mkdir-p Checking for gawk ... no checking for Mawk ... Mawk checking make whether $ (make) ... yes sets how to C reate a Ustar tar archive ... gnutar checking whether to enable maintainer-specific portions of makefiles. No checking WH Ether ln-s Works ... yes checking whether make supports nested variables ... yes checking host platform characteristics ... OK checking for gcc ... gcc checking for gcc ... (cached) GCC checking whether the C compiler works ... yes checking for C compiler default output file name ... a.out Checki ng for suffix of executables ... checking whether we are cross ... no compiling for checking of object files ... o che Cking whether we are using the GNU C compiler ... yes checking whether gcc accepts-g ... yes checkinG for GCC option to accept ISO C89 ... none needed checking for style, include used by make ... GNU checking dependency style of gcc ... gcc3 checking for g++ ... no checking whether we are using the GNU C + + compiler ... 
No checking whether g++ accepts-g ... no checking dependency style of g++ ... none checking dependency style of gcc ... gcc3 Checking for gawk ...

 (cached) Mawk checking whether GCC and cc understand-c and-o ... yes together configure:error:You to need install

Cannot continue because g++ is not installed:

nike@nike-pc:~/src/mono-3.2.8$ sudo apt-get install g++ [sudo] password for nike:reading package lists ... Done building Dependency The Reading state information ... Done the following extra packages'll be installed:cpp-4.8 g++-4.8 gcc-4.8 gcc-4.8-base libasan0 libatomic1 libgcc-4.8-d EV libgcc1 LIBGOMP1 libitm1 libquadmath0 libstdc++-4.8-dev libstdc++6 suggested Packages:gcc-4.8-locales g++-multilib g+ +-4.8-multilib gcc-4.8-doc libstdc++6-4.8-dbg gcc-4.8-multilib libmudflap0-4.8-dev libgcc1-dbg libitm1-dbg libatomic1-dbg libasan0-dbg libtsan0-dbg libbacktrace1-dbg libquadmath0-dbg libmudflap0-dbg libstdc++-4.8
-doc the following NEW packages'll be installed:g++ g++-4.8 Libstdc++-4.8-dev The following packages would be upgraded: cpp-4.8 gcc-4.8 gcc-4.8-base libasan0 libatomic1 libgcc-4.8-dev libgcc1 libgomp1 libitm1 libquadmath0 libstdc++6 one Upgrad
Ed, 3 newly installed, 0 to-Remove and 275 not upgraded.
Need to get 25.9 MB of archives. After this operation, 28.2 MB OF Additional disk space would be used.
Do your want to continue [y/n]?

 ==============> omitted a lot of <==============.

To reinitialize the Mono installation configuration file:

nike@nike-pc:~/src/mono-3.2.8$/configure--prefix=/opt/mono-3.2.8
==============> omitted a lot of <============= =
Engine:
Gc:sgen and bundled Boehm GC with typed GC and parallel Mark
TLS: __thread
sigaltstack:yes
   
    engine:building and using the JIT
oprofile:no
bigarrays:no
dtrace:no
LLVM back End:no (dynamically Loaded:no)
 
libraries:
. NET 2.0/3.5:yes
. NET 4.0:yes
. NET 4.5:yes
Monodroid:no Monotouch:no
JNI SUPPORT:IKVM Native
libgdiplus:assumed to be installed
zlib:
nike@nike-pc:~/ src/mono-3.2.8$


   

./configure passed.

Compiling mono Source code

nike@nike-pc:~/src/mono-3.2.8$ make
==============> long compilation ~<==============
nike@nike-pc:~/src/ mono-3.2.8$ sudo make install
==============> omitted a lot of <==============

The installation was successful.

Set PATH environment variable

nike@nike-pc:~/src/mono-3.2.8$ CD ~
nike@nike-pc:~$ vim. BASHRC

Append the following statement at the end of the file:

if [-d/opt/mono-3.2.8/bin]; Then
export path=/opt/mono-3.2.8/bin: $PATH
fi

And then:

nike@nike-pc:~$. . BASHRC
nike@nike-pc:~$ echo $PATH
/opt/mono-3.2.8/bin:/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/ Local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
nike@nike-pc:~$

Verify mono is installed correctly

nike@nike-pc:~$ Mono--version
Mono JIT compiler version 3.2.8 (Tarball March 27, 2014 Thursday 21:55:30 CST)
Copyright (C) 2002-2014 Novell, Inc., Xamarin Inc. and Contributors. www.mono-project.com
TLS: __thread
sigsegv:altstack
notifications:epoll
architecture:x86
Disabled:none
misc:softdebug
llvm:supported, not enabled.
Gc:sgen
nike@nike-pc:~$ DMCs--version
Mono C # compiler version 3.2.8.0
nike@nike-pc:~$

The installation was successful.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.