Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Invoke-WebRequest : A parameter cannot be found that matches parameter name 'LfO'

Tags:

python

airflow

I'm trying to install Airflow with docker on my desktop.

When I run curl -LfO 'https://airflow.apache.org/docs/apache-airflow/2.2.3/docker-compose.yaml' like the internet says, I get this:

Invoke-WebRequest : A parameter cannot be found that matches parameter name 'LfO'.
At line:1 char:6
+ curl -LfO 'https://airflow.apache.org/docs/apache-airflow/2.2.3/docke ...
+      ~~~~
    + CategoryInfo          : InvalidArgument: (:) [Invoke-WebRequest], ParameterBindingException
    + FullyQualifiedErrorId : NamedParameterNotFound,Microsoft.PowerShell.Commands.InvokeWebRequestCommand

And I can't find any info over the web :(

like image 344
Cesar Rodriguez Avatar asked Sep 14 '25 04:09

Cesar Rodriguez


1 Answers

This question ranks highly on Google for some reason, which means I regularly click through here when I encounter this issue. For the sake of my sanity, and anyone else who arrives here, here's the answer:

Execute this in the command prompt:

Remove-item alias:curl

Explanation: There's a CmdLet called Invoke-WebRequest which has an alias of curl. So when you execute this command, rather than using curl, it tries to use Invoke-WebRequest. Removing this alias allows you to execute curl as you intended.

Windows Terminal seems to have Invoke-WebRequest set up by default, so I occasionally find myself needing to run the Remove-item.

like image 166
Newnab Avatar answered Sep 15 '25 17:09

Newnab