Ubuntu14.04 安装 MonoDevelop 指南

来源:互联网 发布:淘宝童装批发市场 编辑:程序博客网 时间:2024/05/17 02:34

前言:

费几天时间总是不能顺利搞定,好在找到这篇帖子,这是已经验证了安装过程步骤,可以节约大家的几天时间,尤其是 从windows 平台转 linux 平台的开发人员。


How to install the latest MonoDevelop on Linux

This tutorial is mostly outdated! Please see the current blog roll and the installation page for further installation instructions.

There’s also an independent MD + Mono bundle available for all linux distros: http://simendsjo.me/files/abothe/ - Un-XZ it to /opt/mono and launch monodevelop via executing /opt/mono/bin/monodevelop!


Note: If there is no mono/gtk# release available for your Linux distribution, head to the lower section!

You can open up the terminal and install it via the following:

  1. sudo add-apt-repository ppa:keks9n/monodevelop-latest
  2. sudo apt-get update
  3. sudo apt-get install monodevelop-latest

If you wish to compile MonoDevelop from source, try the following in the terminal:

  1. “sudo apt-get install git” -> skip if you already have git installed
  2. “sudo apt-get install mono-devel”
  3. “sudo apt-get build-dep monodevelop” -> this downloads dependencies for compiling monodevelop
  4. “git clone git://github.com/mono/monodevelop.git”
  5. “cd monodevelop”
  6. “./configure” -> at this stage you may want to select other addin packages in the build, but you may need to install other packages (e.g. ValaBinding needs “libvala-0.12-dev”).  Also, i never got it to work by selecting all anyway.
  7. “make”
  8. “make install”  -> note: this installs to the default prefix of  “/usr/local”
  9. “monodevelop” -> launches monodevelop

If you already have the repository code checkout, and want to pull the latest changes, go straight to step 5) then do a “git pull”, and then continue on with step 6)


Build the MonoDevelop requirements manually

a) Build mono:

  1. sudo apt-get build-dep mono
  2. sudo apt-get install mono-gmcs
  3. git clone https://github.com/mono/mono.git
  4. cd mono
  5. ./autogen.sh –prefix=/usr/local
  6. make -j5 2>&1 | tee build.log
  7. sudo make install
  8. sudo apt-get remove mono-gmcs

b) Build mono-addins:

  1. git clone https://github.com/mono/mono-addins.git
  2. cd mono-addins
  3. ./autogen.sh –prefix=/usr/local
  4. make -j5 2>&1 | tee build.log
  5. sudo make install

c) Build gtk#:

  1. git clone -b gtk-sharp-2-12-branch https://github.com/mono/gtk-sharp.git
  2. cd gtk-sharp/
  3. ./bootstrap-2.12 –prefix=/usr/local
  4. make -j5 2>&1 | tee build.log
  5. sudo make install

d) To install MonoDevelop, proceed like shown in the upper section
Note: It’s needed to run monodevelop with the environment variable
LD_LIBRARY_PATH=/usr/local/lib/monodevelop

(otherwise there will be an error about glibsharpglue-2 not being found)


If anyone has any instructions on how to get the latest monodevelop on fedora, suse, etc.. please let me know so that I can add it to this post.

This entry was posted in How-To and tagged installation, linux, monodevelop, tutorial on December 7, 2011 by michaelc37.

Post navigation

 Don’t forget“Find references” and “Go to declaration” 

16 thoughts on “How to install the latest MonoDevelop on Linux

  1. prok5reaperJanuary 5, 2014 at 2:23 am

    Hello, I use Ubuntu 12.04 and chose the first way(repository way) to install monodevelop.
    After installation is finished, I click on monodevelop icon to start the app, but the version is 3.1.0 – not 4.x …
    What’s wrong? Please help.

    Thanks in advance!

    Reply 
    1. alexJanuary 5, 2014 at 2:26 am

      Hi, you probably didn’t read the last instruction which is to execute /opt/mono/bin/monodevelop in order to get it launched. There won’t be a desktop icon for it by default.

      Reply 
  2. AnonSeptember 22, 2013 at 10:15 pm

    Hi there!
    Thanks for this package. some notes to make it better.
    - The new XSP is stable but it should be run with admin privileges (sudo mono …). otherwise it will report some files are missing or not found. (so please include it too)
    - `mono -V` command does not show the latest mono version. it’s not 3.2.1 for instance. it should be corrected.
    - because it’s pointing to v2.0 and not 3.0, I should set the following commands to run applications in monodevelop
    export PATH=/opt/mono-3/bin:$PATH
    export PKG_CONFIG_PATH=/opt/mono-3/lib/pkgconfig:$PKG_CONFIG_PATH
    mono -V

    Reply 
    1. RFlumSeptember 24, 2013 at 5:57 pm

      Hi Alex,
      Thanks for the post – good information.

      AFAIK, you don’t need Xsp for MonoDevelop, though you will need it (as well as other Mono things) if you intend to run Mono apps against Apache.
      The command to get the Mono version is: mono –version.
      If you add the path to Mono in ~./.bash_profile, it will be permanently in your PATH; you won’t have to export the PATH when you reboot.
      Likewise, don’t set LD_LIBRARY_PATH, instead, create an ldconfig file, say: monodevelop.conf, in /etc/ld.so.conf.d, with the /usr/local/lib/monodevelop line in it, then run ldconfig.

      Happy coding, Rob


0 0
原创粉丝点击