Installing the F# PowerPack on Linux / Mono

The F# PowerPack is an open source collection of libraries provided by the Microsoft F# team on top of the standard distribution. It can be found here. It is recommended to always install the F# PowerPack when using F#.

1. Download the F# PowerPack ZIP-file from CodePlex

2. Go to your F# installation location (and switch to root if necessary)

~> cd /usr/local/lib/FSharp-2.0.0.0/bin/
host:/usr/local/lib/FSharp-2.0.0.0/bin> su
Password:
host:/usr/local/lib/FSharp-2.0.0.0/bin #

3. Unzip the file

host:/usr/local/lib/FSharp-2.0.0.0/bin # unzip ~/FSharpPowerPack.zip
Archive:  ~/FSharpPowerPack.zip
 inflating: FSharpPowerPack-2.0.0.0\bin\FSharp.Compiler.CodeDom.dll   
 inflating: FSharpPowerPack-2.0.0.0\bin\gac\FSharp.Compiler.CodeDom.dll   
 inflating: FSharpPowerPack-2.0.0.0\bin\FSharp.Compiler.CodeDom.pdb   
 inflating: FSharpPowerPack-2.0.0.0\bin\FSharp.Compiler.CodeDom.xml   
 inflating: FSharpPowerPack-2.0.0.0\bin\FSharp.PowerPack.Build.Tasks.dll   
 inflating: FSharpPowerPack-2.0.0.0\bin\FSharp.PowerPack.Build.Tasks.pdb   
 inflating: FSharpPowerPack-2.0.0.0\bin\FSharp.PowerPack.Build.Tasks.xml   
 inflating: FSharpPowerPack-2.0.0.0\bin\FSharp.PowerPack.dll   
 inflating: FSharpPowerPack-2.0.0.0\bin\FSharp.PowerPack.pdb   
 inflating: FSharpPowerPack-2.0.0.0\bin\FSharp.PowerPack.xml   
 inflating: FSharpPowerPack-2.0.0.0\bin\gac\FSharp.PowerPack.dll   
 inflating: FSharpPowerPack-2.0.0.0\bin\FSharp.PowerPack.Compatibility.dll   
 inflating: FSharpPowerPack-2.0.0.0\bin\FSharp.PowerPack.Compatibility.pdb   
 inflating: FSharpPowerPack-2.0.0.0\bin\FSharp.PowerPack.Compatibility.xml   
 inflating: FSharpPowerPack-2.0.0.0\bin\gac\FSharp.PowerPack.Compatibility.dll   
 inflating: FSharpPowerPack-2.0.0.0\bin\FSharp.PowerPack.Linq.dll   
 inflating: FSharpPowerPack-2.0.0.0\bin\gac\FSharp.PowerPack.Linq.dll   
 inflating: FSharpPowerPack-2.0.0.0\bin\FSharp.PowerPack.Linq.pdb   
 inflating: FSharpPowerPack-2.0.0.0\bin\FSharp.PowerPack.Linq.xml   
 inflating: FSharpPowerPack-2.0.0.0\bin\FSharp.PowerPack.Metadata.dll   
 inflating: FSharpPowerPack-2.0.0.0\bin\gac\FSharp.PowerPack.Metadata.dll   
 inflating: FSharpPowerPack-2.0.0.0\bin\FSharp.PowerPack.Metadata.pdb   
 inflating: FSharpPowerPack-2.0.0.0\bin\FSharp.PowerPack.Metadata.xml   
 inflating: FSharpPowerPack-2.0.0.0\bin\FSharp.PowerPack.Parallel.Seq.dll   
 inflating: FSharpPowerPack-2.0.0.0\bin\gac\FSharp.PowerPack.Parallel.Seq.dll   
 inflating: FSharpPowerPack-2.0.0.0\bin\FSharp.PowerPack.Parallel.Seq.pdb   
 inflating: FSharpPowerPack-2.0.0.0\bin\FSharp.PowerPack.Parallel.Seq.xml   
 inflating: FSharpPowerPack-2.0.0.0\bin\fshtmldoc.exe   
 inflating: FSharpPowerPack-2.0.0.0\bin\fslex.exe   
 inflating: FSharpPowerPack-2.0.0.0\bin\fsyacc.exe   
 inflating: FSharpPowerPack-2.0.0.0\bin\FSharp.PowerPack.targets   
 inflating: FSharpPowerPack-2.0.0.0\Silverlight\v3.0\FSharp.PowerPack.dll   
 inflating: FSharpPowerPack-2.0.0.0\Silverlight\v3.0\FSharp.PowerPack.pdb   
 inflating: FSharpPowerPack-2.0.0.0\Silverlight\v3.0\FSharp.PowerPack.Compatibility.dll   
 inflating: FSharpPowerPack-2.0.0.0\Silverlight\v3.0\FSharp.PowerPack.Compatibility.pdb   
 inflating: FSharpPowerPack-2.0.0.0\Silverlight\v4.0\FSharp.PowerPack.dll   
 inflating: FSharpPowerPack-2.0.0.0\Silverlight\v4.0\FSharp.PowerPack.pdb   
 inflating: FSharpPowerPack-2.0.0.0\Silverlight\v4.0\FSharp.PowerPack.Compatibility.dll   
 inflating: FSharpPowerPack-2.0.0.0\Silverlight\v4.0\FSharp.PowerPack.Compatibility.pdb   
 inflating: FSharpPowerPack-2.0.0.0\.\License.rtf

3. Unfortunately the file names in the ZIP file do not unzip corectly, they include the Windows path with backslashes as part of the file name. Therefore we need to correct this with the following script.

mv FSharpPowerPack-2.0.0.0\\bin\\FSharp.Compiler.CodeDom.dll\  FSharp.Compiler.CodeDom.dll
mv FSharpPowerPack-2.0.0.0\\bin\\FSharp.Compiler.CodeDom.pdb\  FSharp.Compiler.CodeDom.pdb
mv FSharpPowerPack-2.0.0.0\\bin\\FSharp.Compiler.CodeDom.xml\  FSharp.Compiler.CodeDom.xml
mv FSharpPowerPack-2.0.0.0\\bin\\FSharp.PowerPack.Build.Tasks.dll\  FSharp.PowerPack.Build.Tasks.dll
mv FSharpPowerPack-2.0.0.0\\bin\\FSharp.PowerPack.Build.Tasks.pdb\  FSharp.PowerPack.Build.Tasks.pdb
mv FSharpPowerPack-2.0.0.0\\bin\\FSharp.PowerPack.Build.Tasks.xml\  FSharp.PowerPack.Build.Tasks.xml
mv FSharpPowerPack-2.0.0.0\\bin\\FSharp.PowerPack.Compatibility.dll\  FSharp.PowerPack.Compatibility.dll
mv FSharpPowerPack-2.0.0.0\\bin\\FSharp.PowerPack.Compatibility.pdb\  FSharp.PowerPack.Compatibility.pdb
mv FSharpPowerPack-2.0.0.0\\bin\\FSharp.PowerPack.Compatibility.xml\  FSharp.PowerPack.Compatibility.xml
mv FSharpPowerPack-2.0.0.0\\bin\\FSharp.PowerPack.dll\  FSharp.PowerPack.dll
mv FSharpPowerPack-2.0.0.0\\bin\\FSharp.PowerPack.Linq.dll\  FSharp.PowerPack.Linq.dll
mv FSharpPowerPack-2.0.0.0\\bin\\FSharp.PowerPack.Linq.pdb\  FSharp.PowerPack.Linq.pdb
mv FSharpPowerPack-2.0.0.0\\bin\\FSharp.PowerPack.Linq.xml\  FSharp.PowerPack.Linq.xml
mv FSharpPowerPack-2.0.0.0\\bin\\FSharp.PowerPack.Metadata.dll\  FSharp.PowerPack.Metadata.dll
mv FSharpPowerPack-2.0.0.0\\bin\\FSharp.PowerPack.Metadata.pdb\  FSharp.PowerPack.Metadata.pdb
mv FSharpPowerPack-2.0.0.0\\bin\\FSharp.PowerPack.Metadata.xml\  FSharp.PowerPack.Metadata.xml
mv FSharpPowerPack-2.0.0.0\\bin\\FSharp.PowerPack.Parallel.Seq.dll\  FSharp.PowerPack.Parallel.Seq.dll
mv FSharpPowerPack-2.0.0.0\\bin\\FSharp.PowerPack.Parallel.Seq.pdb\  FSharp.PowerPack.Parallel.Seq.pdb
mv FSharpPowerPack-2.0.0.0\\bin\\FSharp.PowerPack.Parallel.Seq.xml\  FSharp.PowerPack.Parallel.Seq.xml
mv FSharpPowerPack-2.0.0.0\\bin\\FSharp.PowerPack.pdb\  FSharp.PowerPack.pdb
mv FSharpPowerPack-2.0.0.0\\bin\\FSharp.PowerPack.targets\  FSharp.PowerPack.targets
mv FSharpPowerPack-2.0.0.0\\bin\\FSharp.PowerPack.xml\  FSharp.PowerPack.xml
mv FSharpPowerPack-2.0.0.0\\bin\\fshtmldoc.exe\  fshtmldoc.exe
mv FSharpPowerPack-2.0.0.0\\bin\\fslex.exe\  fslex.exe
mv FSharpPowerPack-2.0.0.0\\bin\\fsyacc.exe\  fsyacc.exe
mv FSharpPowerPack-2.0.0.0\\bin\\gac\\FSharp.Compiler.CodeDom.dll\  FSharp.Compiler.CodeDom.dll
mv FSharpPowerPack-2.0.0.0\\bin\\gac\\FSharp.PowerPack.Compatibility.dll\  FSharp.PowerPack.Compatibility.dll
mv FSharpPowerPack-2.0.0.0\\bin\\gac\\FSharp.PowerPack.dll\  FSharp.PowerPack.dll
mv FSharpPowerPack-2.0.0.0\\bin\\gac\\FSharp.PowerPack.Linq.dll\  FSharp.PowerPack.Linq.dll
mv FSharpPowerPack-2.0.0.0\\bin\\gac\\FSharp.PowerPack.Metadata.dll\  FSharp.PowerPack.Metadata.dll
mv FSharpPowerPack-2.0.0.0\\bin\\gac\\FSharp.PowerPack.Parallel.Seq.dll\  FSharp.PowerPack.Parallel.Seq.dll
mv FSharpPowerPack-2.0.0.0\\.\\License.rtf\  License.rtf
mv FSharpPowerPack-2.0.0.0\\Silverlight\\v3.0\\FSharp.PowerPack.Compatibility.dll\  FSharp.PowerPack.Compatibility.dll
mv FSharpPowerPack-2.0.0.0\\Silverlight\\v3.0\\FSharp.PowerPack.Compatibility.pdb\  FSharp.PowerPack.Compatibility.pdb
mv FSharpPowerPack-2.0.0.0\\Silverlight\\v3.0\\FSharp.PowerPack.dll\  FSharp.PowerPack.dll
mv FSharpPowerPack-2.0.0.0\\Silverlight\\v3.0\\FSharp.PowerPack.pdb\  FSharp.PowerPack.pdb
mv FSharpPowerPack-2.0.0.0\\Silverlight\\v4.0\\FSharp.PowerPack.Compatibility.dll\  FSharp.PowerPack.Compatibility.dll
mv FSharpPowerPack-2.0.0.0\\Silverlight\\v4.0\\FSharp.PowerPack.Compatibility.pdb\  FSharp.PowerPack.Compatibility.pdb
mv FSharpPowerPack-2.0.0.0\\Silverlight\\v4.0\\FSharp.PowerPack.dll\  FSharp.PowerPack.dll
mv FSharpPowerPack-2.0.0.0\\Silverlight\\v4.0\\FSharp.PowerPack.pdb\  FSharp.PowerPack.pdb

5. Apply the script in the directory where you unziped the files

host:/usr/local/lib/FSharp-2.0.0.0/bin # bash dd

6. Change the file permissions

host:/usr/local/lib/FSharp-2.0.0.0/bin # chmod a+rx *

7. Test your installation as a normal user (not root)

~> fsi
Microsoft (R) F# 2.0 Interactive build 2.0.0.0
Copyright (c) Microsoft Corporation. All Rights Reserved.

For help type #help;;
> #r "FSharp.PowerPack.dll";;

--> Referenced '/usr/local/lib/FSharp-2.0.0.0/bin/FSharp.PowerPack.dll'
>
This entry was posted in Installation. Bookmark the permalink.

One Response to Installing the F# PowerPack on Linux / Mono

  1. Pingback: Interactive Session #11: Units of Measure | 2#4u

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s