Commands on the Mac terminal

Asked

Viewed 666 times

2

I tried to install the Composer on OSX 10.10.3 following the website’s instructions:

curl -sS https://getcomposer.org/installer | php

and after that I’m no longer able to execute the commands curl, ls, among others. The terminal does not execute these commands and returns me the following message:

-bash: curl: command not found 

How can I fix this?

  • 2

    The dir does not exist (to the best of my knowledge), and curl may not come as default on Mac (I don’t know). Are you sure the problem occurs with the ls also? Or some other common command, like cd?

  • 1

    dir really doesn’t work -bash: dir: command not found, typing curl appears curl: try 'curl --help' or 'curl --manual' for more information, ls lists files and directories. As @Gabe mentioned, it’s weird ls not working, you really tested?

  • That’s right, the command ls returns the same error, the curl also returns the same error. -bash: curl: command not found. The commands cd and pwd work normally.

  • 1

    Your PATH may have been changed. You edit your question and place your PATH (echo $PATH)? And also a which cd, just to know where it is?

  • What version of OS X? Commands stopped working at any particular time?

  • The version of OS X is 10.10.3, It stopped working when I went to install Composer running this command curl -sS https://getcomposer.org/installer | php , ai gave the error message and did not work.

  • I went through the Composer installer, and I couldn’t find anything that could have caused the problem. Are you sure that everything worked before? What is the result of your echo $PATH?

  • 1

    Probably the installation script has changed your ~/. bash_profile. Usually something is added at the end of the file with relevant comments. Check and comment on any suspicious line that has the PATH variable involved.

  • echo $PATH /Library/Frameworks/Python.framework/Versions/3.4/bin::/bin:“/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home”/bin

Show 4 more comments

1 answer

1

use : wget https://getcomposer.org/installer | php

or

curl -k https://getcomposer.org/installer | php

Browser other questions tagged

You are not signed in. Login or sign up in order to post.