I recently installed homebrew and I was having a hard time because I could not install it as curl command couldn't be found, someone pointed me to use wget and that worked to install homebrew but now I am trying to figure out how to get the curl command back. I was patching an android rom with openpdroid and ran into a problem and in the process I found out when working out the error with the developer of autopatcher that I somehow or another the bundled OSX/BSD utils were replaced with GNU coreutils. I have no idea if the osx/bsdutils or GNU coreutils have anything to do with curl.

I tried

$ brew install curl
==> Installing curl dependency: pkg-config
==> Downloading https://downloads.sf.net/project/machomebrew/Bottles/pkg-config-0.28.mountain_lion.bo
Warning: Bottle installation failed: building from source.
==> Downloading http://pkgconfig.freedesktop.org/releases/pkg-config-0.28.tar.gz
Error: /usr/bin/curl is not executable

Keep in mind that I like a toddler just learning my first words when it comes to working with the terminal shell.

also so you know

$ curl --version
-bash: curl: command not found

Is there a way to get back to having OSX bundled utilities as default if that is what I need to install curl.

  • 1
    It's possible that Homebrew has simply modified your PATH variable to point to its binaries instead of the built-in utilities. Can you post the content of your PATH variable (echo $PATH?) Oct 19, 2013 at 4:35
  • 1
    $ echo $PATH /usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt/X11/bin:/usr/lo‌​cal/git/bin Oct 19, 2013 at 5:14
  • 1
    The curl command was lost prior to having homebrew installed at which time I used wget. Oct 19, 2013 at 5:14
  • What does ls -l /usr/bin/curl return?
    – nohillside
    Oct 19, 2013 at 7:02
  • $ ls -l /usr/bin/curl lrwxr-xr-x 1 root wheel 21 Sep 23 23:57 /usr/bin/curl -> /usr/bin/curl.wrapper Oct 20, 2013 at 18:15

2 Answers 2


Something seems to have changed your curl binary. To fix it, run

sudo rm -f /usr/bin/curl-wrapper
sudo mv /usr/bin/curl.bin /usr/bin/curl

Check your path -- homebrew often instructs you to modify path and installs into usr/local/bin. The default curl executable is /usr/bin/curl. Or try running it as /usr/bin/curl

Edit: Another thing to try. Do you have xcode installed? You can go into Xcode Preferences->Downloads->Components and install the command line tools for xcode which I think should include your original curl executable.

  • $ echo $PATH /usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt/X11/bin:/usr/local/git/bin Oct 19, 2013 at 5:08
  • 1
    The curl command was lost prior to having homebrew installed at which time I used wget. Oct 19, 2013 at 5:09
  • @user2821160 see update to answer Oct 19, 2013 at 6:28

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .