Get the App
SLTechnology News&Howtos  ›  Servers  › 

The method of compiling and installing Mono on Linux Server

Shulou Source: shulou.com Published: 2022-06-01 16:40:26 11月08日 Update

This article mainly introduces "the method of compiling and installing Mono on Linux server". In the daily operation, I believe that many people have doubts about the method of compiling and installing Mono on Linux server. The editor has consulted all kinds of materials and sorted out simple and easy-to-use operation methods. I hope it will be helpful to answer the doubts of "Linux server compiling and installing Mono". Next, please follow the editor to study!

Install the dependency package

The code is as follows:

Yum install gcc bison pkgconfig glib2-devel gettext make gcc-c++ libstdc++-devel libgdiplus-devel

Download the source code and decompress it

The code is as follows:

# download address at http://ftp.novell.com/pub/mono/sources/mono/

# what I downloaded is 2.10.2

Cd / usr/local/src

Wget-c http://ftp.novell.com/pub/mono/sources/mono/mono-2.10.2.tar.bz2

Tar xf mono-2.10.2.tar.bz2

Cd mono-2.10.2

III. Compilation and installation

The code is as follows:

. / configure-- prefix=/usr/local/mono

Make

Make install

Fourth, add environment variables for users using mono

The code is as follows:

# add to this user's ~ / .bash_profile

Export PKG_CONFIG_PATH=/usr/local/mono/lib/pkgconfig:

Export PATH=/usr/local/mono/bin:/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin

# reload it

Source / .bash_profile

5. Testing

The code is as follows:

/ usr/local/mono/bin/mono-test-install

Active Mono: / usr/local/mono/bin/mono

Your have a working System.Drawing setup

Your file system watcher is: System.IO.InotifyWatcher

If you do not do step 4, you will find the following error:

The code is as follows:

/ usr/local/mono/bin/mono-test-install

Active Mono:

Warning: pkg-config could not find mono installed on this system

No dotnet pkgconfig found, Windows.Forms, System.Drawing and others will not work

At this point, the study on "the method of compiling and installing Mono on Linux server" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!

Tags: Code method compilation server service learning more user help utility next variable address article source code environment theory knowledge article website Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Docker Shulou Information MariaDB Microsoft Xiaomi