user9773080
user9773080

Reputation:

curl option -: is unknown

I run this command to install an update version nodejs on ubuntu 18.04

curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash -

I receive the error "curl option -: is unknown"

I have tried on multiple systems

Upvotes: 4

Views: 14354

Answers (2)

xragon
xragon

Reputation: 381

Because of how specific this error seems to be, and how it exactly fits the original posters example (I too was trying to update nodejs) I am going to assume, like me, the OP was using a digitalocean droplet.

This issue has to do with the virtual console provided by digitalocean.

For some reason when typing or pasting the pipe character | is always converted to a > character.

I am going to SSH in directly to avoid this rather than mess around with the virtual console as I was just being lazy in the first place.

Massive thanks to the poster of this question as it was the same issue, but for a different command: Trying to install DOCKER GPG key recieving error: Curl: option '-' is unknown

Hope this help anyone else who stumbles across this question.

Upvotes: 0

Martin Zeitler
Martin Zeitler

Reputation: 76639

if curl does not work (those options are fine and it might be a strange kind of hyphen or alike):

curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash -

just use wget instead:

wget -qO- https://deb.nodesource.com/setup_12.x | sudo -E bash -

Upvotes: 2

Related Questions