Skip to content

Instantly share code, notes, and snippets.

@Kamisama666
Last active March 18, 2023 15:58
Show Gist options
  • Star 10 You must be signed in to star a gist
  • Fork 8 You must be signed in to fork a gist
  • Save Kamisama666/da9ef33b1adf4c6d39ca to your computer and use it in GitHub Desktop.
Save Kamisama666/da9ef33b1adf4c6d39ca to your computer and use it in GitHub Desktop.
Installation of ZeroMQ and php-zmq extension on Ubuntu 14.04. Must be run as root
#!/bin/bash
cd /tmp
apt-get update
apt install -y libtool pkg-config build-essential autoconf automake uuid-dev git wget
git clone git://github.com/jedisct1/libsodium.git
cd libsodium/
./autogen.sh
./configure && make check
make install
ldconfig
cd ..
wget http://download.zeromq.org/zeromq-4.1.4.tar.gz
tar -xvf zeromq-4.1.4.tar.gz
cd zeromq-4.1.4
./autogen.sh
./configure && make check
make install
ldconfig
cd ..
git clone https://github.com/zeromq/czmq
cd czmq
git checkout tags/v3.0.2
./autogen.sh
./configure
make -j 8
make install
ldconfig
cd ..
apt -y install php5-dev
git clone https://github.com/mkoppanen/php-zmq.git
cd php-zmq/
phpize
./configure --with-czmq
make
make test
make install
echo "extension=zmq.so" >> /etc/php5/cli/php.ini
echo "extension=zmq.so" >> /etc/php5/apache2/php.ini
@Kamisama666
Copy link
Author

Thad did it! Thank you so much. I have updated the gist with the steps that finally worked and I will update the issue so you can close it.

@mdeletrez
Copy link

near end i have this error

 ./configure --with-czmq
checking czmq version is below 3.0.0... configure: error: Only czmq 2.x is supported at the moment

@phrazer
Copy link

phrazer commented Mar 5, 2016

i also had problem with this below 3.0.0. error. Just comment this error and everything compiles OK.

Like this:
else
as_echo $? "Only czmq 2.x is supported at the moment" "$LINENO"
#as_fn_error $? "Only czmq 2.x is supported at the moment" "$LINENO" 5
fi

I tried, and all tests pass and works.

Best regards,

@tisuchi
Copy link

tisuchi commented Apr 12, 2018

How to install in Mac OS while I am using xampp?

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