简体   繁体   中英

How to install mono 3 on Debian testing?

I want to compile the Unreal Engine on my Debian Liunx (testing) box, which needs the mono package libmono-corlib4.0-cil installed that depends on the mono-runtime in version 3.

However, on my Debian box I have installed mono in version 4 and libmono-corlib4.5-cil (4.5 instead of 4.0). So I tried to install that specific version via

sudo apt-get install libmono-corlib4.0-cil

However, that gives me:

libmono-corlib4.0-cil : Depends: mono-runtime (< 3.2.9) but 4.2.1.102+dfsg2-8 is to be installed

Can I install mono-runtime in version 3 alongside the currently installed version 4, and if so, how?

I have used packages from stable Debian release to build UE.

In order to install libmono-corlib4.0-cil from stable:

  1. Add stable package repository into your /etc/apt/sources.list
  2. Run sudo apt-get update
  3. Install aptitude if you don't have it
  4. Run sudo aptitude -t stable install libmono-corlib4.0-cil

If you have some packages newer then libmono-corlib4.0-cil requires, aptitude will report an error and ask you what to do. In one of the solutions it will suggest to downgrade those packages to appropriate version. Use that solution and you will get libmono-corlib4.0-cil installed.

You may also edit file Engine/Build/BatchFiles/Linux/Setup.sh inside your directory with UE sources and replace line (should be 78th)

sudo apt-get install -y $DEP

with

sudo aptitude -t stable install $DEP

And then rerun Setup.sh script. This may help you avoiding similar problems with other packages required by UE.

There may be a way to do everything with apt-get , but I don't know it.

And I'm afraid this way won't allow you to have both versions of mono-runtime

Yes, you can, and you don't need to do anything special. In fact, the usual Debian and Ubuntu repositories typically do have several versions of each package (from oldstable/stable/testing/unstable or dapper/hardy/lucid/maverick/natty ). The distributions only have a single package in each version's index file (the Packages files), but you don't have to follow suit.

Of course, apt-get install myapp will only install the latest version (unless configured otherwise). You can run apt-get install myapp=1.42 to force the installation of version 1.42.

Caveat: if all the versions have the same package name, you can't have more than one installed at the same time. If this is important, give each version a different package name: myapp-1.42 , myapp-1.43 , etc. Debian and Ubuntu do this for major versions of libraries, where you may need more than one if you have executables linked with different libraries (eg libcap1 and libcap2 ), as well as for a few other packages such as the kernel.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM