-1

Got my CentOS 8 VPS, login as root and want to run the command curl install.meteor.com | /bin/sh but getting /bin/sh: line 1: a: No such file or directory

So I found /bin/sh located under the system directory "/", so tried ../bin/sh for no avail.

Checked the file encoding and found it to be binary i.e. head -1 ../bin/sh is useless to check typo in line 1.

How can I run this command? Is it correct to run it from the root directory? I got the same error when run from /home/<userName>. Please see terminal image. Thanks

Update: The correct command should be curl https://install.meteor.com/ | sh and not curl install.meteor.com | /bin/sh which was copied from non meteor web site.

Fred J.
  • 5,759
  • 10
  • 57
  • 106
  • It's the thing downloaded from `install.meteor.com` that has a problem on its first line, not your shell. – Mat Feb 13 '21 at 07:33

1 Answers1

1

Look at what you actually get from the curl command:

$ curl install.meteor.com
<a href="https://install.meteor.com/">Moved Permanently</a>.

The <a is interpreted by the shell as an input redirection, but there is no file named a to read from.

As you noticed, you need to use the https URL to get the actual shell script to execute. Either /bin/sh or sh should work, as sh is usually installed in /bin.

chepner
  • 497,756
  • 71
  • 530
  • 681