Skip to content

Instantly share code, notes, and snippets.

@akitaonrails
Forked from mattmanning/gist:1430691
Created February 2, 2012 17:22
Show Gist options
  • Star 13 You must be signed in to star a gist
  • Fork 4 You must be signed in to fork a gist
  • Save akitaonrails/1724673 to your computer and use it in GitHub Desktop.
Save akitaonrails/1724673 to your computer and use it in GitHub Desktop.
Fixing Apachebench on OS X Lion
# If you're getting this error trying to use ApacheBench on OS X Lion:
# Benchmarking mwmanning.com (be patient)...apr_socket_recv: Connection reset by peer (54)
#
# You need to download the latest beta version of Apache and rebuild ab.
# Here's how (assuming you have homebrew installed).
# Install Homebrew (https://github.com/mxcl/homebrew) and then the Perl Regex support
brew install pcre
# Download the latest from http://httpd.apache.org/download.cgi, then decompress and compile it
curl -O http://ftp.unicamp.br/pub/apache//httpd/httpd-2.3.16-beta.tar.bz2
tar xvfj httpd-2.3.16-beta.tar.bz2
cd httpd-2.3.16-beta
./configure
make
# backup the original 'ab' command and replace it for the new one
sudo mv /usr/sbin/ab /usr/sbin/ab.old
sudo cp support/ab /usr/sbin/ab
@humbroll
Copy link

http://ftp.unicamp.br/pub/apache//httpd/httpd-2.3.16-beta.tar.bz2 file have some problem.
$ tar -xjvf httpd-2.3.16-beta.tar.bz2
tar: Unrecognized archive format
tar: Error exit delayed from previous errors.

use this link :
http://apache.mirrors.pair.com//httpd/httpd-2.3.16-beta.tar.bz2

@patrickod
Copy link

Note for future users both links are broken.

@tekmaven
Copy link

Better yet, future users, go to here: http://apache.mirrors.pair.com/httpd/ and pick the latest version :).

@evanshortiss
Copy link

@atorgfr
Copy link

atorgfr commented Aug 20, 2013

If like me you got an error like :
checking for gcc... /Applications/Xcode.app/Contents/Developer/Toolchains/OSX10.8.xctoolchain/usr/bin/cc
checking whether the C compiler works... no

cd /Applications/Xcode.app/Contents/Developer/Toolchains
sudo ln -s XcodeDefault.xctoolchain OSX10.8.xctoolchain

@tonyspiro
Copy link

I'm getting this issue after installing Yosemite Beta, really annoying. I get to the "make" part but get "make: *** No targets specified and no makefile found. Stop." even though I see the Makefile.in is in the folder. Any help is greatly appreciated!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment