The registry key for .Net 4.8 was not found or this is forced. error while installing chocolatey in windows powershell

478 Views Asked by At

while trying to install node.js, when it came to installing chocolatey in widows powershell i ran into this error

Installing Chocolatey on the local machine
The registry key for .Net 4.8 was not found or this is forced

WARNING: Try #1 of .NET framework install failed with exit code '5100'. Trying again.

how can i fix this

1

There are 1 best solutions below

0
James Ruskin On

Searching online for that error, along with ".Net 4.8" shows this:

Possible reasons for the failure include: The machine on which you are installing the product does not meet all the . NET Framework system requirements.

Chocolatey CLI 2.x requires .NET 4.8. If you want to use Chocolatey 2.x, you should attempt to install the .NET 4.8 runtime separately and see what error it gives you, as it may give you something more actionable - that said, as you are trying to install NodeJS and not specifically for Chocolatey-use -

You may be able to get around this in one of the following ways:

  • By installing Chocolatey 1.4.0 before you run the NodeJS installer
  • By setting the environment variable chocolateyVersion to "1.4.0" before the installation, so it installs the earlier version
  • By not selecting the step that uses Chocolatey within the NodeJS installer.