Chocolatey – Error: Collection is read-only

Apr 27, 2016 General
[Reading Time: 2 minutes]

If you are a Windows Insider and received the latest Build 14331/14332 than you may have some troubles getting choco command running in a Powershell. If you try install a package – it doesn’t matter which – than you will get followin output:

image
(example of installing netscan)

What happend… a bug in Powershell. So, if you like to avoid this, than you have some options Smile

1) Go back to a stable previous Build

2) Wait, until everything gets fixed

3) do the following:

Open file “C:\ProgramData\Chocolatey\helpers\chocolateyScriptRunner.ps1”. Replace
[alias(“params”)][alias(“parameters”)][alias(“pkgParams”)]
in the header of that file by
[alias(“params”,”parameters”,”pkgParams”)]
as a quick fix. After that, you can try your install once again. It should now succeed.

Please see this post, where I got this fix from, for details: https://github.com/chocolatey/choco/issues/659

By root

As a Managing Consultant, I am working at Alegri in Stuttgart/Germany. There I keep focusing with a team specialized in IoT, UX/Design and DevOps on preparing customers for the next digital future. I have been working as IT Consultant, IT Architect and lead developer with skills in .NetFramework, agile methodologies like Scrum and much more for nearly 2 decades. In the last few years I started focusing in IoT & Digitalization strategies in enterprise scenarios. Manly I used Microsofts Azure Cloud, to support customers in letting their visions become true. Sharing knowledge and practicing principles is something, that I like very much. Therefore I am also Co-Administrator of Azure-Meetup group in Stuttgart, where I'd also like to share my experiences. With this I was awarded in november by Microsoft as a MVP (Most Valuable Professional).

One thought on “Chocolatey – Error: Collection is read-only”

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.