Skip to content

Instantly share code, notes, and snippets.

@brennanneoh
Created November 29, 2011 03:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save brennanneoh/1403250 to your computer and use it in GitHub Desktop.
Save brennanneoh/1403250 to your computer and use it in GitHub Desktop.
setting up libssh2 + php ssh2 for xampp 1.7.3 (osx)
$ brew install -i libssh2
/* architecture tags are import. xampp 1.7.3 (osx) is x86. */
$ ./configure --prefix=/usr/local --disable-debug --disable-dependency-tracking --with-openssl --with-libz CFLAGS="-O -arch i386" CPPFLAGS="-O -arch i386" LDFLAGS="-arch i386"
$ make install
$ exit
/* assuming you have wget installed on osx */
$ wget http://pecl.php.net/get/ssh2-0.11.3.tgz
$ tar -zxvf ssh2-0.11.3.tgz
$ cd ssh2-0.11.3
/* assuming you have XAMMP's bin directory in your environment */
$ phpize-5.3.1
$ ./configure CFLAGS="-O -arch i386" CPPFLAGS="-O -arch i386" LDFLAGS="-arch i386"
$ make
/* finally, copy the compiled module to the php extensions library */
$ cp modules/ssh2.so /Applications/XAMPP/xamppfiles/lib/php/php-5.3.1/extensions/no-debug-non-zts-20090626
@dannykopping
Copy link

@Sorcery, you are the fucking man! I've been trying to get this nailed for a good couple of hours. Is there a way to send beer online yet?

@uniacid
Copy link

uniacid commented Apr 13, 2012

@Sorcery, thanks dude this helps me out as well!

@karlcampbell
Copy link

@Sorcery I'm stumped, I keep getting an error when I try and configure ssh2

configure: error: libssh2 version >= 1.2 not found

I followed the installation for libssh2, seemed to work, I have libssh2 files in /usr/local/lib

Any ideas? Thanks

@richardhedges
Copy link

Getting a "missing separator" error after running make install

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