mono / monodevelop

MonoDevelop is a cross platform .NET IDE
http://www.monodevelop.com
2.84k stars 1.02k forks source link

Cannot install MonoDevelop on fresh Ubuntu 18 #7135

Closed Sod-Almighty closed 5 years ago

Sod-Almighty commented 5 years ago

I cannot install MonoDevelop in a freshly-installed Ubuntu 18.04.1. I have followed the instructions.

# apt install apt-transport-https dirmngr
# apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
# echo "deb https://download.mono-project.com/repo/ubuntu vs-bionic main" | tee /etc/apt/sources.list.d/mono-official-vs.list
# apt update
# apt install monodevelop

Reading package lists... Done Building dependency tree Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation:

The following packages have unmet dependencies: monodevelop : Depends: mono-runtime-sgen but it is not going to be installed Depends: fsharp but it is not going to be installed Depends: mono-runtime (>= 3.0~) but it is not going to be installed Depends: libc6 (>= 2.27) but 2.24-11+deb9u3 is to be installed or libc6.1 (>= 2.27) but it is not installable or libc0.1 (>= 2.27) but it is not installable Depends: libfontconfig1 (>= 2.12) but 2.11.0-6.7+b1 is to be installed Depends: libfsharp-core4.3-cil (>= 4.1.33) but it is not going to be installed Depends: libglade2.0-cil (>= 2.12.45) but it is not going to be installed Depends: libglib2.0-0 (>= 2.56.3) but 2.50.3-2 is to be installed Depends: libglib2.0-cil (>= 2.12.45) but it is not going to be installed Depends: libgtk2.0-cil (>= 2.12.45) but it is not going to be installed Depends: libmono-cairo4.0-cil (>= 3.2.1) but it is not going to be installed Depends: libmono-corlib4.5-cil (>= 4.0.0~alpha1) but it is not going to be installed Depends: libmono-microsoft-csharp4.0-cil (>= 1.0) but it is not going to be installed Depends: libmono-microsoft-web-infrastructure1.0-cil (>= 1.0) but it is not going to be installed Depends: libmono-posix4.0-cil (>= 4.0.0~alpha1) but it is not going to be installed Depends: libmono-system-componentmodel-composition4.0-cil (>= 3.0.6) but it is not going to be installed Depends: libmono-system-componentmodel-dataannotations4.0-cil (>= 4.0.0~alpha1) but it is not going to be installed Depends: libmono-system-configuration4.0-cil (>= 4.0.0~alpha1) but it is not going to be installed Depends: libmono-system-core4.0-cil (>= 4.0.0~alpha1) but it is not going to be installed Depends: libmono-system-data-entity4.0-cil (>= 1.0) but it is not going to be installed Depends: libmono-system-data-linq4.0-cil (>= 1.0) but it is not going to be installed Depends: libmono-system-data4.0-cil (>= 4.0.0~alpha1) but it is not going to be installed Depends: libmono-system-design4.0-cil (>= 1.0) but it is not going to be installed Depends: libmono-system-drawing4.0-cil (>= 3.0.6) but it is not going to be installed Depends: libmono-system-identitymodel4.0-cil (>= 4.0.0~alpha1) but it is not going to be installed Depends: libmono-system-io-compression4.0-cil (>= 3.2.1) but it is not going to be installed Depends: libmono-system-net-http4.0-cil (>= 1.0) but it is not going to be installed Depends: libmono-system-numerics4.0-cil (>= 1.0) but it is not going to be installed Depends: libmono-system-runtime-caching4.0-cil (>= 4.0.0~alpha1) but it is not going to be installed Depends: libmono-system-runtime-serialization4.0-cil (>= 4.0.0~alpha1) but it is not going to be installed Depends: libmono-system-runtime4.0-cil (>= 2.10.1) but it is not going to be installed Depends: libmono-system-security4.0-cil (>= 1.0) but it is not going to be installed Depends: libmono-system-servicemodel4.0a-cil (>= 3.2.3) but it is not going to be installed Depends: libmono-system-web-extensions4.0-cil (>= 2.10.3) but it is not going to be installed Depends: libmono-system-web-services4.0-cil (>= 1.0) but it is not going to be installed Depends: libmono-system-web4.0-cil (>= 2.10.3) but it is not going to be installed Depends: libmono-system-windows-forms4.0-cil (>= 1.0) but it is not going to be installed Depends: libmono-system-xaml4.0-cil (>= 1.0) but it is not going to be installed Depends: libmono-system-xml-linq4.0-cil (>= 3.0.6) but it is not going to be installed Depends: libmono-system-xml4.0-cil (>= 3.12.0) but it is not going to be installed Depends: libmono-system4.0-cil (>= 4.0.0~alpha1) but it is not going to be installed Depends: libmono-windowsbase4.0-cil (>= 3.0.6) but it is not going to be installed Depends: libpango-1.0-0 (>= 1.40.14) but 1.40.5-1 is to be installed Depends: libpangocairo-1.0-0 (>= 1.40.14) but 1.40.5-1 is to be installed Depends: monodoc-base (>= 3.2.1) but it is not going to be installed Depends: msbuild but it is not going to be installed Recommends: libgtk2.0-cil-dev but it is not going to be installed Recommends: mono-devel but it is not going to be installed Recommends: xamarin-gtk-theme but it is not going to be installed

E: Unable to correct problems, you have held broken packages.

Now, thing is, Ubuntu 18 is the first target operating system in your installation instructions. Is it too much to ask that the instructions actually work? Or did I seriously manage to somehow balls up such a simple set of instructions?

directhex commented 5 years ago

echo "deb https://download.mono-project.com/repo/ubuntu vs-bionic main" | tee /etc/apt/sources.list.d/mono-official-vs.list

You said you were running Ubuntu 18.04, but Depends: libc6 (>= 2.27) but 2.24-11+deb9u3 is to be installed indicates you are running Debian 9.

Please try the Debian 9 repository.

Sod-Almighty commented 5 years ago

My mistake. I loaded the Debian VM instead of the Ubuntu VM. I shall try with the Ubuntu.

However, the instructions for Debian 9 do not work. This is why I installed an Ubuntu VM in the first place. It will also not work on Linux Mint 18, using either the Debian or the Ubuntu instructions.

Sod-Almighty commented 5 years ago

Forget it. Seems OpenRegistryKey doesn't work properly in Mono anyway, so it's a broken and useless system. Therefore I will not be using it.

For reference, the registry issue is:

var key = Registry.CurrentUser.OpenSubKey(@"Software\Infinity Computers", false);

Doesn't work, even though ~/.mono/registry/CurrentUser/Software/Infinity Computers exists. Plus, it seems confused as to the difference between Software and software; and also as to whether the Infinity Computers key exists or not.

In short, Mono is hideously broken. As are your Debian install instructions.

directhex commented 5 years ago

I've refreshed the install steps to cover installing eeeeeverything which a default minimal install ought to have but isn't Essential: yes in apt. This should help users working from less-than-minimal environments.

directhex commented 5 years ago

Mono's registry code normalizes everything to lower case, as a cheap tactic to avoid the case-sensitive nature of Linux filesystems. Basic registry behaviour works fine.

csharp> using Microsoft.Win32;
csharp> var key = Registry.CurrentUser.OpenSubKey(@"Software\Infinity Computers", false); 
csharp> Console.WriteLine(key);

csharp> Registry.CurrentUser.CreateSubKey(@"Software\Infinity Computers");
HKEY_CURRENT_USER\software\infinity computers  
csharp> var key = Registry.CurrentUser.OpenSubKey(@"Software\Infinity Computers", false); 
csharp> Console.WriteLine(key);                                                           
HKEY_CURRENT_USER\software\infinity computers  
csharp> key.SetValue("test","hello");                                                     
System.UnauthorizedAccessException: Cannot write to the registry key.
  at Microsoft.Win32.RegistryKey.SetValue (System.String name, System.Object value) <0x7fbe5f8993b0 + 0x00089> in <5d239b60268442e0bbd07c6bd91f112b>:0 
  at (wrapper remoting-invoke-with-check) Microsoft.Win32.RegistryKey.SetValue(string,object)
  at <InteractiveExpressionClass>.Host (System.Object& $retval) [0x00000] in <7f1416fd1e9c49a390aabb08aff017b3>:0 
  at Mono.CSharp.Evaluator.Evaluate (System.String input, System.Object& result, System.Boolean& result_set) [0x00038] in <e79f04cd418a4ed19206f5d5f91d1168>:0 
  at Mono.CSharpShell.Evaluate (System.String input) [0x00000] in <554e229716694e86af3f932c4980ee29>:0 
csharp> var key = Registry.CurrentUser.OpenSubKey(@"Software\Infinity Computers", true);  
csharp> key.SetValue("test","hello");                                                    
csharp> Console.WriteLine(System.IO.File.ReadAllText("/home/directhex/.mono/registry/CurrentUser/software/infinity computers/values.xml"));
<values>
<value name="test"
type="string">hello</value>
</values>
Sod-Almighty commented 5 years ago

Mono's registry code normalizes everything to lower case, as a cheap tactic to avoid the case-sensitive nature of Linux filesystems. Basic registry behaviour works fine.

No, it does not.

I needed to import a .reg file, and did so by manually creating the directories on the command line and then manually writing a values.xml file. (Which, might I add, is an unhelpfully long-winded process, which would benefit from a little automation. Suppose the .reg file had dozens of entries?)

Normalising to lower case is fine, but failing to notice the existence of keys simply because they contain upper-case characters is stupid and unhelpful. Not only is it trivial to check for the case-insensitive existence of a file; but also this dumb limitation is not documented anywhere that I could find. Hell, the location of the values.xml file itself is practically a secret - the only reference I could find anywhere on the Internet was here. How are people supposed to use Mono if there's no goddamn documentation?

In addition, how am I supposed to trust Mono enough to put time and effort into developing software for it, when I've already found at least two bugs (one I haven't mentioned) and one broken installation guide, in only a few hours? Not to mention the five hundred and seventy one other issues on this tracker.

sandyarmstrong commented 5 years ago

Installation instructions are correct now (if they weren't before).

Mono bugs can be filed at https://github.com/mono/mono/issues, if you find any. The mono/monodevelop repository is specifically for the IDE. Thank you for testing.