Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Install Older Version of Mono

Tags:

mono

Today my Ubuntu updated Mono to 4.2.1.102. It will not allow a certain program I absolutely need to run. How can I down-grade it to 4.0.5.1? I have tried...

sudo apt-get install mono-complete=4.0.5.1

That doesn't work.

like image 311
Buford T. Justice Avatar asked Nov 17 '15 17:11

Buford T. Justice


People also ask

How do I install a specific version of Mono?

list file for the version you want and remove the version of mono you have. Then apt update, then install mono-complete. An easy way to know you are correctly downloading and compiling a different version is that apt will prompt you asking if you want to download the files, and the size will be different.

How do I install Mono on Windows?

To install Mono on Windows, download and run the installer from the download page at http://www.go-mono.com/. Gtk# is included in the installer. The installer will deposit all the necessary files in C:\Program Files\Mono-1.0, but you can override that by entering a different folder.


2 Answers

Edit your /etc/apt/sources.list.d/mono-xamarin.list and change:

deb http://download.mono-project.com/repo/debian wheezy main

to:

deb http://download.mono-project.com/repo/debian wheezy/snapshots/4.0.5.1 main

That will pin it to version 4.0.5.1.

FYI: Make sure that you do not have any alpha/beta repos for mono in any of your /etc/apt/sources/list.d/xxxxx.list files.

Basic Steps to Downgrade:

sudo apt-get remove mono-complete
# Edit your mono-xamarin.list and pin it to the version of your choice.
sudo apt-get update
sudo apt-get install mono-complete

Accessing older releases If for some reason you want to pin an older version of Mono rather than updating to the latest, you can modify the Debian repository to “wheezy/snapshots/X.XX.X” instead of “wheezy”. For example, “wheezy/snapshots/3.10.0” will lock you to that version.

These snapshots will cease receiving updates as soon as the next major Mono version gets uploaded - for example, as soon as Mono 3.12 gets uploaded, 3.10 will never receive updates.

On RPM distributions, force the package version in your package manager - all older versions are published in the YUM metadata and should be available.

Ref: http://www.mono-project.com/docs/getting-started/install/linux/#accessing-older-releases

Ref: Versions available:

http://download.mono-project.com/repo/debian/pool/main/m/mono/

like image 197
SushiHangover Avatar answered Oct 20 '22 05:10

SushiHangover


If, like me, you followed the official guide: https://www.mono-project.com/download/stable/ then you would have added an apt key and created /etc/apt/sources.list.d/mono-official-stable.list You can keep the key, but remove the file above using sudo rm -r /etc/apt/sources.list.d/mono-official-stable.list Then make sure you follow the best answer above by editing the mono-xamarin.list file for the version you want and remove the version of mono you have. Then apt update, then install mono-complete. An easy way to know you are correctly downloading and compiling a different version is that apt will prompt you asking if you want to download the files, and the size will be different.

Hope this helps someone, this last step made it work for me. My system is Ubuntu 18.04.

like image 29
user10762823 Avatar answered Oct 20 '22 05:10

user10762823