http://blog.csdn.net/cfy_phonex/article/details/24129227
Install Mono under Ubuntu
1) Update server
sudo apt-get update
2) Install the required libraries for mono source installation
sudo apt-get install gcc gcc-c++ bison pkgconfig glib2-devel gettext make libpng-devel libjpeg-devel libtiff-devel libexif -devel giflib-devel libx11-devel freetype-devel fontconfig-devel cairo-devel
3) Install Mono
cd/usr/local/src/
sudo wget http://download.mono-project.com/sources/mono/mono-2.10.8.tar.bz2
TAR-JXVF mono-2.10.8.tar.bz2
CD mono-2.10.8
sudo./configure--prefix=/usr
(Failure prompt: Configure:error:You need to install bison)
(Processing: Add command Sudo apt-get install Flex bison)
(Failure prompt: Configure:error:msgfmt not found.) You need to install the ' GetText ' package, or pass--enable-nls=no to configure.)
(Processing: Sudo apt-get install gettext)
sudo make
(Failure prompt:..) /SRC/.LIBS/LIBEGLIB.A (LIBEGLIB_LA-GUNICODE.O): in function Monoeg_g_get_charset ':
/opt/mono-2.10.1/eglib/src/gunicode.c:312:undefined Reference Tolocale_charset ')
(Processing: sudo./configure
CD eglib/
Open Config.h and Replace following string
#define HAVE_LOCALCHARSET_H 1
Revision changed to
#define HAVE_LOCALCHARSET_H 0
Return to the upper CD.
)
sudo make install
Enter Mono-v If you have mono version information, the installation is successful.
4) It is recommended to run the sudo ldconfig command after installing mono.
(The purpose of the Ldconfig command, mainly in the default search directory (/lib and/usr/lib) and the dynamic library configuration file/etc/ld.so.conf in the directory listed in the search for a shareable dynamic link library (format as described above, lib*.so*), This creates the connection and cache files required by the dynamic loader (ld.so). The cache file defaults to/etc/ld.so.cache, which holds the list of queued dynamic-link library names. )
Install Mono (finishing) under Ubuntu