Bug 25756 - Fsharp is not installed from the official repository
Summary: Fsharp is not installed from the official repository
Status: RESOLVED FIXED
Alias: None
Product: Runtime
Classification: Mono
Component: packaging ()
Version: unspecified
Hardware: PC Linux
: --- normal
Target Milestone: ---
Assignee: Duncan Mak
URL:
Depends on:
Blocks:
 
Reported: 2015-01-06 16:35 UTC by Sergey Zhukov
Modified: 2015-01-07 11:44 UTC (History)
3 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on GitHub or Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED FIXED

Description Sergey Zhukov 2015-01-06 16:35:05 UTC
Ubuntu 12.04, 32 bit. When I try to install fsharp, I've got an error:

apt-get install fsharp

The following NEW packages will be installed:
  fsharp libfsharp-core4.3-cil{a} 
0 packages upgraded, 2 newly installed, 0 to remove and 8 not upgraded.
Need to get 5,744 kB of archives. After unpacking 20.7 MB will be used.
Do you want to continue? [Y/n/?] y
Get: 1 http://download.mono-project.com/repo/debian/ wheezy/main libfsharp-core4.3-cil all 3.1.1.26+dfsg2-3~xamarin1 [1,422 kB]
Get: 2 http://download.mono-project.com/repo/debian/ wheezy/main fsharp all 3.1.1.26+dfsg2-3~xamarin1 [4,322 kB]
Fetched 5,744 kB in 3s (1,754 kB/s) 
Selecting previously unselected package libfsharp-core4.3-cil.
(Reading database ... 886904 files and directories currently installed.)
Unpacking libfsharp-core4.3-cil (from .../libfsharp-core4.3-cil_3.1.1.26+dfsg2-3~xamarin1_all.deb) ...
Selecting previously unselected package fsharp.
Unpacking fsharp (from .../fsharp_3.1.1.26+dfsg2-3~xamarin1_all.deb) ...
Processing triggers for man-db ...
Setting up libfsharp-core4.3-cil (3.1.1.26+dfsg2-3~xamarin1) ...
* Installing 10 assemblies from libfsharp-core4.3-cil into Mono
* Installing 10 assemblies from libfsharp-core4.3-cil into Mono git snapshot 20140912085202 (3f740f3)

Unhandled Exception:
System.BadImageFormatException: Could not load file or assembly '/usr/lib/cli/FSharp.Core-4.3/FSharp.Core.sigdata' or one of its dependencies. An attempt was made to load a program with an incorrect format.
File name: '/usr/lib/cli/FSharp.Core-4.3/FSharp.Core.sigdata'
  at (wrapper managed-to-native) System.Reflection.Assembly:LoadFrom (string,bool)
  at System.Reflection.Assembly.LoadFrom (System.String assemblyFile, System.Security.Policy.Evidence securityEvidence) [0x00000] in <filename unknown>:0 
  at System.Reflection.Assembly.LoadFile (System.String path, System.Security.Policy.Evidence securityEvidence) [0x00000] in <filename unknown>:0 
  at System.Reflection.Assembly.LoadFile (System.String path) [0x00000] in <filename unknown>:0 
  at GetAssemblyName.Main (System.String[] args) [0x00000] in <filename unknown>:0 
[ERROR] FATAL UNHANDLED EXCEPTION: System.BadImageFormatException: Could not load file or assembly '/usr/lib/cli/FSharp.Core-4.3/FSharp.Core.sigdata' or one of its dependencies. An attempt was made to load a program with an incorrect format.
File name: '/usr/lib/cli/FSharp.Core-4.3/FSharp.Core.sigdata'
  at (wrapper managed-to-native) System.Reflection.Assembly:LoadFrom (string,bool)
  at System.Reflection.Assembly.LoadFrom (System.String assemblyFile, System.Security.Policy.Evidence securityEvidence) [0x00000] in <filename unknown>:0 
  at System.Reflection.Assembly.LoadFile (System.String path, System.Security.Policy.Evidence securityEvidence) [0x00000] in <filename unknown>:0 
  at System.Reflection.Assembly.LoadFile (System.String path) [0x00000] in <filename unknown>:0 
  at GetAssemblyName.Main (System.String[] args) [0x00000] in <filename unknown>:0 
Use of uninitialized value $_ in scalar chomp at /usr/share/cli-common/runtimes.d/mono-20140912085202 line 141, <PIPE> line 1.
Use of uninitialized value $fullname in concatenation (.) or string at /usr/share/cli-common/runtimes.d/mono-20140912085202 line 110, <PIPE> line 1.
E: installing Assembly /usr/lib/cli/FSharp.Core-4.3/FSharp.Core.sigdata failed
E: Installation of libfsharp-core4.3-cil with /usr/share/cli-common/runtimes.d/mono-20140912085202 failed
dpkg: error processing libfsharp-core4.3-cil (--configure):
 subprocess installed post-installation script returned error exit status 1
No apport report written because MaxReports is reached already
                                                              dpkg: dependency problems prevent configuration of fsharp:
 fsharp depends on libfsharp-core4.3-cil; however:
  Package libfsharp-core4.3-cil is not configured yet.
dpkg: error processing fsharp (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
                                                              Errors were encountered while processing:
 libfsharp-core4.3-cil
 fsharp
E: Sub-process /usr/bin/dpkg returned an error code (1)
A package failed to install.  Trying to recover:
Setting up libfsharp-core4.3-cil (3.1.1.26+dfsg2-3~xamarin1) ...
* Installing 10 assemblies from libfsharp-core4.3-cil into Mono
* Installing 10 assemblies from libfsharp-core4.3-cil into Mono git snapshot 20140912085202 (3f740f3)

Unhandled Exception:
System.BadImageFormatException: Could not load file or assembly '/usr/lib/cli/FSharp.Core-4.3/FSharp.Core.sigdata' or one of its dependencies. An attempt was made to load a program with an incorrect format.
File name: '/usr/lib/cli/FSharp.Core-4.3/FSharp.Core.sigdata'
  at (wrapper managed-to-native) System.Reflection.Assembly:LoadFrom (string,bool)
  at System.Reflection.Assembly.LoadFrom (System.String assemblyFile, System.Security.Policy.Evidence securityEvidence) [0x00000] in <filename unknown>:0 
  at System.Reflection.Assembly.LoadFile (System.String path, System.Security.Policy.Evidence securityEvidence) [0x00000] in <filename unknown>:0 
  at System.Reflection.Assembly.LoadFile (System.String path) [0x00000] in <filename unknown>:0 
  at GetAssemblyName.Main (System.String[] args) [0x00000] in <filename unknown>:0 
[ERROR] FATAL UNHANDLED EXCEPTION: System.BadImageFormatException: Could not load file or assembly '/usr/lib/cli/FSharp.Core-4.3/FSharp.Core.sigdata' or one of its dependencies. An attempt was made to load a program with an incorrect format.
File name: '/usr/lib/cli/FSharp.Core-4.3/FSharp.Core.sigdata'
  at (wrapper managed-to-native) System.Reflection.Assembly:LoadFrom (string,bool)
  at System.Reflection.Assembly.LoadFrom (System.String assemblyFile, System.Security.Policy.Evidence securityEvidence) [0x00000] in <filename unknown>:0 
  at System.Reflection.Assembly.LoadFile (System.String path, System.Security.Policy.Evidence securityEvidence) [0x00000] in <filename unknown>:0 
  at System.Reflection.Assembly.LoadFile (System.String path) [0x00000] in <filename unknown>:0 
  at GetAssemblyName.Main (System.String[] args) [0x00000] in <filename unknown>:0 
Use of uninitialized value $_ in scalar chomp at /usr/share/cli-common/runtimes.d/mono-20140912085202 line 141, <PIPE> line 1.
Use of uninitialized value $fullname in concatenation (.) or string at /usr/share/cli-common/runtimes.d/mono-20140912085202 line 110, <PIPE> line 1.
E: installing Assembly /usr/lib/cli/FSharp.Core-4.3/FSharp.Core.sigdata failed
E: Installation of libfsharp-core4.3-cil with /usr/share/cli-common/runtimes.d/mono-20140912085202 failed
dpkg: error processing libfsharp-core4.3-cil (--configure):
 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of fsharp:
 fsharp depends on libfsharp-core4.3-cil; however:
  Package libfsharp-core4.3-cil is not configured yet.
dpkg: error processing fsharp (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 libfsharp-core4.3-cil
 fsharp
Comment 1 Sergey Zhukov 2015-01-06 22:09:31 UTC
dpkg -s cli-common | grep Version

Version: 0.9~xamarin1
Comment 2 Jo Shields 2015-01-07 11:00:58 UTC
The problem is because you have a mono-snapshot package installed from 2014-09-12.

I had to make a breaking change to the snapshot manifest format, to support F# in snapshot releases. Snapshots older than 2014-11-05 will die on F# exactly as you've described.

You should remove this older snapshot package (apt-get remove --purge mono-snapshot-20140912085202)
Comment 3 Sergey Zhukov 2015-01-07 11:44:34 UTC
Thank you, removing the old snapshot resolves the issue. I have not noticed before that installing and updating mono-snapshot-latest did not delete old snapshot packages. Now I know that I have to delete old 'latest' snapshots manually.