Pyzmq: centos 7, can't install pyzmq

Created on 13 Mar 2015  路  5Comments  路  Source: zeromq/pyzmq

Hi,

Centos 7 minimal install

Following the tutorial here for 0mq installation: https://www.digitalocean.com/community/tutorials/how-to-install-zeromq-from-source-on-a-centos-6-x64-vps

But using 4.0.5 instead.

Read this thread: https://github.com/zeromq/pyzmq/issues/391

None of the recommended commands actually install pyzmq.

Here's an example:

[root@localhost ~]# pip install pyconfig

Downloading/unpacking pyconfig
  Downloading pyconfig-2.2.1.tar.gz
  Running setup.py (path:/tmp/pip-build-HEcon4/pyconfig/setup.py) egg_info for package pyconfig

Installing collected packages: pyconfig
  Running setup.py install for pyconfig

    Installing pyconfig script to /usr/bin
Successfully installed pyconfig
Cleaning up...

[root@localhost ~]# pip install pyzmq --install-option="--zmq=/usr/lib"

Downloading/unpacking pyzmq
  Downloading pyzmq-14.5.0.tar.gz (997kB): 997kB downloaded
  Running setup.py (path:/tmp/pip-build-FxyRQT/pyzmq/setup.py) egg_info for package pyzmq

    no previously-included directories found matching 'docs/build'
    no previously-included directories found matching 'docs/gh-pages'
    warning: no previously-included files found matching 'bundled/zeromq/src/Makefile*'
    warning: no previously-included files found matching 'bundled/zeromq/src/platform.hpp'
    warning: no previously-included files found matching 'setup.cfg'
    warning: no previously-included files found matching 'zmq/libzmq*'
    warning: no previously-included files matching '__pycache__/*' found anywhere in distribution
    warning: no previously-included files matching '.deps/*' found anywhere in distribution
    warning: no previously-included files matching '*.so' found anywhere in distribution
    warning: no previously-included files matching '*.pyd' found anywhere in distribution
    warning: no previously-included files matching '.git*' found anywhere in distribution
    warning: no previously-included files matching '.DS_Store' found anywhere in distribution
    warning: no previously-included files matching '.mailmap' found anywhere in distribution
    warning: no previously-included files matching 'Makefile.am' found anywhere in distribution
    warning: no previously-included files matching 'Makefile.in' found anywhere in distribution
Installing collected packages: pyzmq
  Running setup.py install for pyzmq
    gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -I/usr/lib/include -c build/temp.linux-x86_64-2.7/scratch/check_sys_un.c -o build/temp.linux-x86_64-2.7/scratch/check_sys_un.o
    gcc -pthread build/temp.linux-x86_64-2.7/scratch/check_sys_un.o -L/usr/lib/lib -Wl,-R/usr/lib/lib -o build/temp.linux-x86_64-2.7/scratch/check_sys_un
    Configure: Autodetecting ZMQ settings...
        Custom ZMQ dir:       /usr/lib
    ************************************************
    cc -c /tmp/timer_createN4lmGM.c -o build/temp.linux-x86_64-2.7/scratch/tmp/timer_createN4lmGM.o
    cc build/temp.linux-x86_64-2.7/scratch/tmp/timer_createN4lmGM.o -o build/temp.linux-x86_64-2.7/scratch/a.out
    build/temp.linux-x86_64-2.7/scratch/tmp/timer_createN4lmGM.o: In function `main':
    timer_createN4lmGM.c:(.text+0x15): undefined reference to `timer_create'
    collect2: error: ld returned 1 exit status
    gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -I/usr/lib/include -Izmq/utils -Izmq/backend/cython -Izmq/devices -c build/temp.linux-x86_64-2.7/scratch/vers.c -o build/temp.linux-x86_64-2.7/scratch/vers.o
    gcc -pthread build/temp.linux-x86_64-2.7/scratch/vers.o -L/usr/lib/lib -Wl,-R/usr/lib/lib -lzmq -lrt -o build/temp.linux-x86_64-2.7/scratch/vers
        ZMQ version detected: 4.0.5
    ************************************************
    building 'zmq.devices.monitoredqueue' extension
    gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -DHAVE_SYS_UN_H=1 -I/usr/lib/include -Izmq/utils -Izmq/backend/cython -Izmq/devices -I/usr/include/python2.7 -c zmq/devices/monitoredqueue.c -o build/temp.linux-x86_64-2.7/zmq/devices/monitoredqueue.o
    zmq/devices/monitoredqueue.c:8:22: fatal error: pyconfig.h: No such file or directory
     #include "pyconfig.h"
                          ^
    compilation terminated.
    error: command 'gcc' failed with exit status 1
    Complete output from command /usr/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip-build-FxyRQT/pyzmq/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-dBAtoQ-record/install-record.txt --single-version-externally-managed --compile --zmq=/usr/lib:
    running configure

gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -I/usr/lib/include -c build/temp.linux-x86_64-2.7/scratch/check_sys_un.c -o build/temp.linux-x86_64-2.7/scratch/check_sys_un.o

gcc -pthread build/temp.linux-x86_64-2.7/scratch/check_sys_un.o -L/usr/lib/lib -Wl,-R/usr/lib/lib -o build/temp.linux-x86_64-2.7/scratch/check_sys_un

Configure: Autodetecting ZMQ settings...

    Custom ZMQ dir:       /usr/lib

************************************************

creating build/temp.linux-x86_64-2.7/scratch/tmp

cc -c /tmp/timer_createN4lmGM.c -o build/temp.linux-x86_64-2.7/scratch/tmp/timer_createN4lmGM.o

cc build/temp.linux-x86_64-2.7/scratch/tmp/timer_createN4lmGM.o -o build/temp.linux-x86_64-2.7/scratch/a.out

build/temp.linux-x86_64-2.7/scratch/tmp/timer_createN4lmGM.o: In function `main':

timer_createN4lmGM.c:(.text+0x15): undefined reference to `timer_create'

collect2: error: ld returned 1 exit status

gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -I/usr/lib/include -Izmq/utils -Izmq/backend/cython -Izmq/devices -c build/temp.linux-x86_64-2.7/scratch/vers.c -o build/temp.linux-x86_64-2.7/scratch/vers.o

gcc -pthread build/temp.linux-x86_64-2.7/scratch/vers.o -L/usr/lib/lib -Wl,-R/usr/lib/lib -lzmq -lrt -o build/temp.linux-x86_64-2.7/scratch/vers

    ZMQ version detected: 4.0.5

************************************************

running install

running build

running build_py

creating build/lib.linux-x86_64-2.7

creating build/lib.linux-x86_64-2.7/zmq

copying zmq/__init__.py -> build/lib.linux-x86_64-2.7/zmq

copying zmq/error.py -> build/lib.linux-x86_64-2.7/zmq

creating build/lib.linux-x86_64-2.7/zmq/auth

copying zmq/auth/__init__.py -> build/lib.linux-x86_64-2.7/zmq/auth

copying zmq/auth/base.py -> build/lib.linux-x86_64-2.7/zmq/auth

copying zmq/auth/certs.py -> build/lib.linux-x86_64-2.7/zmq/auth

copying zmq/auth/ioloop.py -> build/lib.linux-x86_64-2.7/zmq/auth

copying zmq/auth/thread.py -> build/lib.linux-x86_64-2.7/zmq/auth

creating build/lib.linux-x86_64-2.7/zmq/backend

copying zmq/backend/__init__.py -> build/lib.linux-x86_64-2.7/zmq/backend

copying zmq/backend/select.py -> build/lib.linux-x86_64-2.7/zmq/backend

creating build/lib.linux-x86_64-2.7/zmq/backend/cffi

copying zmq/backend/cffi/__init__.py -> build/lib.linux-x86_64-2.7/zmq/backend/cffi

copying zmq/backend/cffi/_cffi.py -> build/lib.linux-x86_64-2.7/zmq/backend/cffi

copying zmq/backend/cffi/_poll.py -> build/lib.linux-x86_64-2.7/zmq/backend/cffi

copying zmq/backend/cffi/constants.py -> build/lib.linux-x86_64-2.7/zmq/backend/cffi

copying zmq/backend/cffi/context.py -> build/lib.linux-x86_64-2.7/zmq/backend/cffi

copying zmq/backend/cffi/devices.py -> build/lib.linux-x86_64-2.7/zmq/backend/cffi

copying zmq/backend/cffi/error.py -> build/lib.linux-x86_64-2.7/zmq/backend/cffi

copying zmq/backend/cffi/message.py -> build/lib.linux-x86_64-2.7/zmq/backend/cffi

copying zmq/backend/cffi/socket.py -> build/lib.linux-x86_64-2.7/zmq/backend/cffi

copying zmq/backend/cffi/utils.py -> build/lib.linux-x86_64-2.7/zmq/backend/cffi

creating build/lib.linux-x86_64-2.7/zmq/backend/cython

copying zmq/backend/cython/__init__.py -> build/lib.linux-x86_64-2.7/zmq/backend/cython

creating build/lib.linux-x86_64-2.7/zmq/devices

copying zmq/devices/__init__.py -> build/lib.linux-x86_64-2.7/zmq/devices

copying zmq/devices/basedevice.py -> build/lib.linux-x86_64-2.7/zmq/devices

copying zmq/devices/monitoredqueue.py -> build/lib.linux-x86_64-2.7/zmq/devices

copying zmq/devices/monitoredqueuedevice.py -> build/lib.linux-x86_64-2.7/zmq/devices

copying zmq/devices/proxydevice.py -> build/lib.linux-x86_64-2.7/zmq/devices

creating build/lib.linux-x86_64-2.7/zmq/eventloop

copying zmq/eventloop/__init__.py -> build/lib.linux-x86_64-2.7/zmq/eventloop

copying zmq/eventloop/ioloop.py -> build/lib.linux-x86_64-2.7/zmq/eventloop

copying zmq/eventloop/zmqstream.py -> build/lib.linux-x86_64-2.7/zmq/eventloop

creating build/lib.linux-x86_64-2.7/zmq/eventloop/minitornado

copying zmq/eventloop/minitornado/__init__.py -> build/lib.linux-x86_64-2.7/zmq/eventloop/minitornado

copying zmq/eventloop/minitornado/concurrent.py -> build/lib.linux-x86_64-2.7/zmq/eventloop/minitornado

copying zmq/eventloop/minitornado/ioloop.py -> build/lib.linux-x86_64-2.7/zmq/eventloop/minitornado

copying zmq/eventloop/minitornado/log.py -> build/lib.linux-x86_64-2.7/zmq/eventloop/minitornado

copying zmq/eventloop/minitornado/stack_context.py -> build/lib.linux-x86_64-2.7/zmq/eventloop/minitornado

copying zmq/eventloop/minitornado/util.py -> build/lib.linux-x86_64-2.7/zmq/eventloop/minitornado

creating build/lib.linux-x86_64-2.7/zmq/eventloop/minitornado/platform

copying zmq/eventloop/minitornado/platform/__init__.py -> build/lib.linux-x86_64-2.7/zmq/eventloop/minitornado/platform

copying zmq/eventloop/minitornado/platform/auto.py -> build/lib.linux-x86_64-2.7/zmq/eventloop/minitornado/platform

copying zmq/eventloop/minitornado/platform/common.py -> build/lib.linux-x86_64-2.7/zmq/eventloop/minitornado/platform

copying zmq/eventloop/minitornado/platform/interface.py -> build/lib.linux-x86_64-2.7/zmq/eventloop/minitornado/platform

copying zmq/eventloop/minitornado/platform/posix.py -> build/lib.linux-x86_64-2.7/zmq/eventloop/minitornado/platform

copying zmq/eventloop/minitornado/platform/windows.py -> build/lib.linux-x86_64-2.7/zmq/eventloop/minitornado/platform

creating build/lib.linux-x86_64-2.7/zmq/green

copying zmq/green/__init__.py -> build/lib.linux-x86_64-2.7/zmq/green

copying zmq/green/core.py -> build/lib.linux-x86_64-2.7/zmq/green

copying zmq/green/device.py -> build/lib.linux-x86_64-2.7/zmq/green

copying zmq/green/poll.py -> build/lib.linux-x86_64-2.7/zmq/green

creating build/lib.linux-x86_64-2.7/zmq/green/eventloop

copying zmq/green/eventloop/__init__.py -> build/lib.linux-x86_64-2.7/zmq/green/eventloop

copying zmq/green/eventloop/ioloop.py -> build/lib.linux-x86_64-2.7/zmq/green/eventloop

copying zmq/green/eventloop/zmqstream.py -> build/lib.linux-x86_64-2.7/zmq/green/eventloop

creating build/lib.linux-x86_64-2.7/zmq/log

copying zmq/log/__init__.py -> build/lib.linux-x86_64-2.7/zmq/log

copying zmq/log/handlers.py -> build/lib.linux-x86_64-2.7/zmq/log

creating build/lib.linux-x86_64-2.7/zmq/ssh

copying zmq/ssh/__init__.py -> build/lib.linux-x86_64-2.7/zmq/ssh

copying zmq/ssh/forward.py -> build/lib.linux-x86_64-2.7/zmq/ssh

copying zmq/ssh/tunnel.py -> build/lib.linux-x86_64-2.7/zmq/ssh

creating build/lib.linux-x86_64-2.7/zmq/sugar

copying zmq/sugar/__init__.py -> build/lib.linux-x86_64-2.7/zmq/sugar

copying zmq/sugar/attrsettr.py -> build/lib.linux-x86_64-2.7/zmq/sugar

copying zmq/sugar/constants.py -> build/lib.linux-x86_64-2.7/zmq/sugar

copying zmq/sugar/context.py -> build/lib.linux-x86_64-2.7/zmq/sugar

copying zmq/sugar/frame.py -> build/lib.linux-x86_64-2.7/zmq/sugar

copying zmq/sugar/poll.py -> build/lib.linux-x86_64-2.7/zmq/sugar

copying zmq/sugar/socket.py -> build/lib.linux-x86_64-2.7/zmq/sugar

copying zmq/sugar/tracker.py -> build/lib.linux-x86_64-2.7/zmq/sugar

copying zmq/sugar/version.py -> build/lib.linux-x86_64-2.7/zmq/sugar

creating build/lib.linux-x86_64-2.7/zmq/tests

copying zmq/tests/__init__.py -> build/lib.linux-x86_64-2.7/zmq/tests

copying zmq/tests/test_auth.py -> build/lib.linux-x86_64-2.7/zmq/tests

copying zmq/tests/test_cffi_backend.py -> build/lib.linux-x86_64-2.7/zmq/tests

copying zmq/tests/test_constants.py -> build/lib.linux-x86_64-2.7/zmq/tests

copying zmq/tests/test_context.py -> build/lib.linux-x86_64-2.7/zmq/tests

copying zmq/tests/test_device.py -> build/lib.linux-x86_64-2.7/zmq/tests

copying zmq/tests/test_error.py -> build/lib.linux-x86_64-2.7/zmq/tests

copying zmq/tests/test_etc.py -> build/lib.linux-x86_64-2.7/zmq/tests

copying zmq/tests/test_imports.py -> build/lib.linux-x86_64-2.7/zmq/tests

copying zmq/tests/test_ioloop.py -> build/lib.linux-x86_64-2.7/zmq/tests

copying zmq/tests/test_log.py -> build/lib.linux-x86_64-2.7/zmq/tests

copying zmq/tests/test_message.py -> build/lib.linux-x86_64-2.7/zmq/tests

copying zmq/tests/test_monitor.py -> build/lib.linux-x86_64-2.7/zmq/tests

copying zmq/tests/test_monqueue.py -> build/lib.linux-x86_64-2.7/zmq/tests

copying zmq/tests/test_multipart.py -> build/lib.linux-x86_64-2.7/zmq/tests

copying zmq/tests/test_pair.py -> build/lib.linux-x86_64-2.7/zmq/tests

copying zmq/tests/test_poll.py -> build/lib.linux-x86_64-2.7/zmq/tests

copying zmq/tests/test_pubsub.py -> build/lib.linux-x86_64-2.7/zmq/tests

copying zmq/tests/test_reqrep.py -> build/lib.linux-x86_64-2.7/zmq/tests

copying zmq/tests/test_security.py -> build/lib.linux-x86_64-2.7/zmq/tests

copying zmq/tests/test_socket.py -> build/lib.linux-x86_64-2.7/zmq/tests

copying zmq/tests/test_stopwatch.py -> build/lib.linux-x86_64-2.7/zmq/tests

copying zmq/tests/test_version.py -> build/lib.linux-x86_64-2.7/zmq/tests

copying zmq/tests/test_win32_shim.py -> build/lib.linux-x86_64-2.7/zmq/tests

copying zmq/tests/test_z85.py -> build/lib.linux-x86_64-2.7/zmq/tests

copying zmq/tests/test_zmqstream.py -> build/lib.linux-x86_64-2.7/zmq/tests

creating build/lib.linux-x86_64-2.7/zmq/utils

copying zmq/utils/__init__.py -> build/lib.linux-x86_64-2.7/zmq/utils

copying zmq/utils/constant_names.py -> build/lib.linux-x86_64-2.7/zmq/utils

copying zmq/utils/garbage.py -> build/lib.linux-x86_64-2.7/zmq/utils

copying zmq/utils/interop.py -> build/lib.linux-x86_64-2.7/zmq/utils

copying zmq/utils/jsonapi.py -> build/lib.linux-x86_64-2.7/zmq/utils

copying zmq/utils/monitor.py -> build/lib.linux-x86_64-2.7/zmq/utils

copying zmq/utils/sixcerpt.py -> build/lib.linux-x86_64-2.7/zmq/utils

copying zmq/utils/strtypes.py -> build/lib.linux-x86_64-2.7/zmq/utils

copying zmq/utils/win32.py -> build/lib.linux-x86_64-2.7/zmq/utils

copying zmq/utils/z85.py -> build/lib.linux-x86_64-2.7/zmq/utils

copying zmq/backend/cffi/_cdefs.h -> build/lib.linux-x86_64-2.7/zmq/backend/cffi

copying zmq/backend/cffi/_verify.c -> build/lib.linux-x86_64-2.7/zmq/backend/cffi

copying zmq/backend/cython/checkrc.pxd -> build/lib.linux-x86_64-2.7/zmq/backend/cython

copying zmq/backend/cython/context.pxd -> build/lib.linux-x86_64-2.7/zmq/backend/cython

copying zmq/backend/cython/libzmq.pxd -> build/lib.linux-x86_64-2.7/zmq/backend/cython

copying zmq/backend/cython/message.pxd -> build/lib.linux-x86_64-2.7/zmq/backend/cython

copying zmq/backend/cython/socket.pxd -> build/lib.linux-x86_64-2.7/zmq/backend/cython

copying zmq/backend/cython/utils.pxd -> build/lib.linux-x86_64-2.7/zmq/backend/cython

copying zmq/devices/monitoredqueue.pxd -> build/lib.linux-x86_64-2.7/zmq/devices

copying zmq/utils/buffers.pxd -> build/lib.linux-x86_64-2.7/zmq/utils

copying zmq/utils/getpid_compat.h -> build/lib.linux-x86_64-2.7/zmq/utils

copying zmq/utils/ipcmaxlen.h -> build/lib.linux-x86_64-2.7/zmq/utils

copying zmq/utils/pyversion_compat.h -> build/lib.linux-x86_64-2.7/zmq/utils

copying zmq/utils/zmq_compat.h -> build/lib.linux-x86_64-2.7/zmq/utils

copying zmq/utils/zmq_constants.h -> build/lib.linux-x86_64-2.7/zmq/utils

copying zmq/utils/config.json -> build/lib.linux-x86_64-2.7/zmq/utils

copying zmq/utils/compiler.json -> build/lib.linux-x86_64-2.7/zmq/utils

running build_ext

building 'zmq.devices.monitoredqueue' extension

creating build/temp.linux-x86_64-2.7/zmq

creating build/temp.linux-x86_64-2.7/zmq/devices

gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -DHAVE_SYS_UN_H=1 -I/usr/lib/include -Izmq/utils -Izmq/backend/cython -Izmq/devices -I/usr/include/python2.7 -c zmq/devices/monitoredqueue.c -o build/temp.linux-x86_64-2.7/zmq/devices/monitoredqueue.o

zmq/devices/monitoredqueue.c:8:22: fatal error: pyconfig.h: No such file or directory

 #include "pyconfig.h"

                      ^

compilation terminated.

error: command 'gcc' failed with exit status 1

----------------------------------------
Cleaning up...
Command /usr/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip-build-FxyRQT/pyzmq/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-dBAtoQ-record/install-record.txt --single-version-externally-managed --compile --zmq=/usr/lib failed with error code 1 in /tmp/pip-build-FxyRQT/pyzmq
Storing debug log for failure in /root/.pip/pip.log

Most helpful comment

Try this:

# install epel
rpm -Uvh http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-5.noarch.rpm

# install stuff to build
yum install -y git svn cpp make autoconf automake patch cmake wget mlocate rpm-build gcc-c++ uuid-devel pkgconfig libtool python-devel openpgm

# install zeromq..
wget http://download.zeromq.org/zeromq-4.0.5.tar.gz
tar xzvf zeromq-4.0.5.tar.gz
cd zeromq-4.0.5
./configure
make
make install

# install python pip
yum -y install python-pip

# install pyzmq
pip install pyzmq

All 5 comments

Going to test this with python-devel. No where I read mentions it.....

Seems i got closer but still no dice...

[root@localhost zeromq-4.0.5]# pip install pyzmq --install-option="--zmq=/usr/local/lib"

Downloading/unpacking pyzmq
  Downloading pyzmq-14.5.0.tar.gz (997kB): 997kB downloaded
  Running setup.py (path:/tmp/pip-build-TTfBDJ/pyzmq/setup.py) egg_info for package pyzmq

    no previously-included directories found matching 'docs/build'
    no previously-included directories found matching 'docs/gh-pages'
    warning: no previously-included files found matching 'bundled/zeromq/src/Makefile*'
    warning: no previously-included files found matching 'bundled/zeromq/src/platform.hpp'
    warning: no previously-included files found matching 'setup.cfg'
    warning: no previously-included files found matching 'zmq/libzmq*'
    warning: no previously-included files matching '__pycache__/*' found anywhere in distribution
    warning: no previously-included files matching '.deps/*' found anywhere in distribution
    warning: no previously-included files matching '*.so' found anywhere in distribution
    warning: no previously-included files matching '*.pyd' found anywhere in distribution
    warning: no previously-included files matching '.git*' found anywhere in distribution
    warning: no previously-included files matching '.DS_Store' found anywhere in distribution
    warning: no previously-included files matching '.mailmap' found anywhere in distribution
    warning: no previously-included files matching 'Makefile.am' found anywhere in distribution
    warning: no previously-included files matching 'Makefile.in' found anywhere in distribution
Installing collected packages: pyzmq
  Running setup.py install for pyzmq
    gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -I/usr/local/lib/include -c build/temp.linux-x86_64-2.7/scratch/check_sys_un.c -o build/temp.linux-x86_64-2.7/scratch/check_sys_un.o
    gcc -pthread build/temp.linux-x86_64-2.7/scratch/check_sys_un.o -L/usr/local/lib/lib -Wl,-R/usr/local/lib/lib -o build/temp.linux-x86_64-2.7/scratch/check_sys_un
    Configure: Autodetecting ZMQ settings...
        Custom ZMQ dir:       /usr/local/lib
    ************************************************
    cc -c /tmp/timer_createT9wHO9.c -o build/temp.linux-x86_64-2.7/scratch/tmp/timer_createT9wHO9.o
    cc build/temp.linux-x86_64-2.7/scratch/tmp/timer_createT9wHO9.o -o build/temp.linux-x86_64-2.7/scratch/a.out
    build/temp.linux-x86_64-2.7/scratch/tmp/timer_createT9wHO9.o: In function `main':
    timer_createT9wHO9.c:(.text+0x15): undefined reference to `timer_create'
    collect2: error: ld returned 1 exit status
    gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -I/usr/local/lib/include -Izmq/utils -Izmq/backend/cython -Izmq/devices -c build/temp.linux-x86_64-2.7/scratch/vers.c -o build/temp.linux-x86_64-2.7/scratch/vers.o
    gcc -pthread build/temp.linux-x86_64-2.7/scratch/vers.o -L/usr/local/lib/lib -Wl,-R/usr/local/lib/lib -lzmq -lrt -o build/temp.linux-x86_64-2.7/scratch/vers
    Error running version detection script:

    build/temp.linux-x86_64-2.7/scratch/vers: error while loading shared libraries: libzmq.so.4: cannot open shared object file: No such file or directory


    error: Error running version detection script:

    build/temp.linux-x86_64-2.7/scratch/vers: error while loading shared libraries: libzmq.so.4: cannot open shared object file: No such file or directory


    Fatal: Falling back on bundled libzmq, but setup.cfg has explicitly prohibited building the libzmq extension.
    Complete output from command /usr/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip-build-TTfBDJ/pyzmq/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-4ut0sb-record/install-record.txt --single-version-externally-managed --compile --zmq=/usr/local/lib:
    running configure

gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -I/usr/local/lib/include -c build/temp.linux-x86_64-2.7/scratch/check_sys_un.c -o build/temp.linux-x86_64-2.7/scratch/check_sys_un.o

gcc -pthread build/temp.linux-x86_64-2.7/scratch/check_sys_un.o -L/usr/local/lib/lib -Wl,-R/usr/local/lib/lib -o build/temp.linux-x86_64-2.7/scratch/check_sys_un

Configure: Autodetecting ZMQ settings...

    Custom ZMQ dir:       /usr/local/lib

************************************************

creating build/temp.linux-x86_64-2.7/scratch/tmp

cc -c /tmp/timer_createT9wHO9.c -o build/temp.linux-x86_64-2.7/scratch/tmp/timer_createT9wHO9.o

cc build/temp.linux-x86_64-2.7/scratch/tmp/timer_createT9wHO9.o -o build/temp.linux-x86_64-2.7/scratch/a.out

build/temp.linux-x86_64-2.7/scratch/tmp/timer_createT9wHO9.o: In function `main':

timer_createT9wHO9.c:(.text+0x15): undefined reference to `timer_create'

collect2: error: ld returned 1 exit status

gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -I/usr/local/lib/include -Izmq/utils -Izmq/backend/cython -Izmq/devices -c build/temp.linux-x86_64-2.7/scratch/vers.c -o build/temp.linux-x86_64-2.7/scratch/vers.o

gcc -pthread build/temp.linux-x86_64-2.7/scratch/vers.o -L/usr/local/lib/lib -Wl,-R/usr/local/lib/lib -lzmq -lrt -o build/temp.linux-x86_64-2.7/scratch/vers

Error running version detection script:



build/temp.linux-x86_64-2.7/scratch/vers: error while loading shared libraries: libzmq.so.4: cannot open shared object file: No such file or directory





error: Error running version detection script:



build/temp.linux-x86_64-2.7/scratch/vers: error while loading shared libraries: libzmq.so.4: cannot open shared object file: No such file or directory





Fatal: Falling back on bundled libzmq, but setup.cfg has explicitly prohibited building the libzmq extension.

----------------------------------------
Cleaning up...
Command /usr/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip-build-TTfBDJ/pyzmq/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-4ut0sb-record/install-record.txt --single-version-externally-managed --compile --zmq=/usr/local/lib failed with error code 1 in /tmp/pip-build-TTfBDJ/pyzmq
Storing debug log for failure in /root/.pip/pip.log

Finally I got it...

Successfully installed pyzmq

What was your solution? I'm having the same issue.

Try this:

# install epel
rpm -Uvh http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-5.noarch.rpm

# install stuff to build
yum install -y git svn cpp make autoconf automake patch cmake wget mlocate rpm-build gcc-c++ uuid-devel pkgconfig libtool python-devel openpgm

# install zeromq..
wget http://download.zeromq.org/zeromq-4.0.5.tar.gz
tar xzvf zeromq-4.0.5.tar.gz
cd zeromq-4.0.5
./configure
make
make install

# install python pip
yum -y install python-pip

# install pyzmq
pip install pyzmq
Was this page helpful?
0 / 5 - 0 ratings

Related issues

Prokhozhijj picture Prokhozhijj  路  3Comments

fabian-paul picture fabian-paul  路  13Comments

badrobit picture badrobit  路  8Comments

stuaxo picture stuaxo  路  15Comments

cs01 picture cs01  路  4Comments