Search code examples
pythonredhatrrdtool

Fail to install py-rrdtool on RedHat


I on RHEL6 with Python 2.6 and need to install rrdtool with python. I have to upload and install packages manually as network admin blocks yum and pip outgoing traffic for security reason. During installation I encounter missing error missing rrdtoolmodule.c, where can I locate the file? or I missing something?

[user@host ~]$ sudo pip install py-rrdtool-1.0b1.tar.gz
[sudo] password for user: 
/usr/lib/python2.6/site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:90: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
  InsecurePlatformWarning
Processing ./py-rrdtool-1.0b1.tar.gz
Installing collected packages: py-rrdtool
  Running setup.py install for py-rrdtool
    Complete output from command /usr/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip-a5tFI5-build/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-krfsUz-record/install-record.txt --single-version-externally-managed --compile:
    running install
    running build
    running build_py
    creating build
    creating build/lib.linux-x86_64-2.6
    copying rrdtool.py -> build/lib.linux-x86_64-2.6
    running build_ext
    building '_rrdtool' extension
    creating build/temp.linux-x86_64-2.6
    creating build/temp.linux-x86_64-2.6/src
    gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -I/usr/local/include -I/usr/include/python2.6 -c src/_rrdtoolmodule.c -o build/temp.linux-x86_64-2.6/src/_rrdtoolmodule.o
    src/_rrdtoolmodule.c:34:17: error: rrd.h: No such file or directory
    In file included from src/rrd_extra.h:37,
                     from src/_rrdtoolmodule.c:35:
    src/rrd_format.h:59: error: expected specifier-qualifier-list before ‘rrd_value_t’
    src/rrd_format.h:295: error: expected specifier-qualifier-list before ‘rrd_value_t’
    src/_rrdtoolmodule.c: In function ‘PyRRD_create’:
    src/_rrdtoolmodule.c:93: warning: implicit declaration of function ‘rrd_create’
    src/_rrdtoolmodule.c:94: warning: implicit declaration of function ‘rrd_get_error’
    src/_rrdtoolmodule.c:94: warning: passing argument 2 of ‘PyErr_SetString’ makes pointer from integer without a cast
    /usr/include/python2.6/pyerrors.h:78: note: expected ‘const char *’ but argument is of type ‘int’
    src/_rrdtoolmodule.c:95: warning: implicit declaration of function ‘rrd_clear_error’
    src/_rrdtoolmodule.c: In function ‘PyRRD_update’:
    src/_rrdtoolmodule.c:122: warning: implicit declaration of function ‘rrd_update’
    src/_rrdtoolmodule.c:123: warning: passing argument 2 of ‘PyErr_SetString’ makes pointer from integer without a cast
    /usr/include/python2.6/pyerrors.h:78: note: expected ‘const char *’ but argument is of type ‘int’
    src/_rrdtoolmodule.c: In function ‘PyRRD_fetch’:
    src/_rrdtoolmodule.c:145: error: ‘rrd_value_t’ undeclared (first use in this function)
    src/_rrdtoolmodule.c:145: error: (Each undeclared identifier is reported only once
    src/_rrdtoolmodule.c:145: error: for each function it appears in.)
    src/_rrdtoolmodule.c:145: error: ‘data’ undeclared (first use in this function)
    src/_rrdtoolmodule.c:145: error: ‘datai’ undeclared (first use in this function)
    src/_rrdtoolmodule.c:145: warning: left-hand operand of comma expression has no effect
    src/_rrdtoolmodule.c:154: warning: implicit declaration of function ‘rrd_fetch’
    src/_rrdtoolmodule.c:156: warning: passing argument 2 of ‘PyErr_SetString’ makes pointer from integer without a cast
    /usr/include/python2.6/pyerrors.h:78: note: expected ‘const char *’ but argument is of type ‘int’
    src/_rrdtoolmodule.c:165: error: expected ‘;’ before ‘dv’
    src/_rrdtoolmodule.c:191: error: ‘dv’ undeclared (first use in this function)
    src/_rrdtoolmodule.c: In function ‘PyRRD_graph’:
    src/_rrdtoolmodule.c:245: warning: implicit declaration of function ‘rrd_graph’
    src/_rrdtoolmodule.c:247: warning: passing argument 2 of ‘PyErr_SetString’ makes pointer from integer without a cast
    /usr/include/python2.6/pyerrors.h:78: note: expected ‘const char *’ but argument is of type ‘int’
    src/_rrdtoolmodule.c: In function ‘PyRRD_tune’:
    src/_rrdtoolmodule.c:297: warning: implicit declaration of function ‘rrd_tune’
    src/_rrdtoolmodule.c:298: warning: passing argument 2 of ‘PyErr_SetString’ makes pointer from integer without a cast
    /usr/include/python2.6/pyerrors.h:78: note: expected ‘const char *’ but argument is of type ‘int’
    src/_rrdtoolmodule.c: In function ‘PyRRD_last’:
    src/_rrdtoolmodule.c:324: warning: implicit declaration of function ‘rrd_last’
    src/_rrdtoolmodule.c:325: warning: passing argument 2 of ‘PyErr_SetString’ makes pointer from integer without a cast
    /usr/include/python2.6/pyerrors.h:78: note: expected ‘const char *’ but argument is of type ‘int’
    src/_rrdtoolmodule.c: In function ‘PyRRD_resize’:
    src/_rrdtoolmodule.c:350: warning: implicit declaration of function ‘rrd_resize’
    src/_rrdtoolmodule.c:351: warning: passing argument 2 of ‘PyErr_SetString’ makes pointer from integer without a cast
    /usr/include/python2.6/pyerrors.h:78: note: expected ‘const char *’ but argument is of type ‘int’
    src/_rrdtoolmodule.c: In function ‘PyRRD_info’:
    src/_rrdtoolmodule.c:380: warning: passing argument 2 of ‘PyErr_SetString’ makes pointer from integer without a cast
    /usr/include/python2.6/pyerrors.h:78: note: expected ‘const char *’ but argument is of type ‘int’
    src/_rrdtoolmodule.c:423: error: ‘unival’ has no member named ‘u_val’
    src/_rrdtoolmodule.c:423: error: ‘unival’ has no member named ‘u_val’
    src/_rrdtoolmodule.c:423: error: ‘unival’ has no member named ‘u_val’
    src/_rrdtoolmodule.c:423: error: ‘unival’ has no member named ‘u_val’
    src/_rrdtoolmodule.c:423: error: ‘unival’ has no member named ‘u_val’
    src/_rrdtoolmodule.c:423: error: ‘unival’ has no member named ‘u_val’
    src/_rrdtoolmodule.c:424: error: ‘unival’ has no member named ‘u_val’
    src/_rrdtoolmodule.c:424: error: ‘unival’ has no member named ‘u_val’
    src/_rrdtoolmodule.c:424: error: ‘unival’ has no member named ‘u_val’
    src/_rrdtoolmodule.c:424: error: ‘unival’ has no member named ‘u_val’
    src/_rrdtoolmodule.c:424: error: ‘unival’ has no member named ‘u_val’
    src/_rrdtoolmodule.c:424: error: ‘unival’ has no member named ‘u_val’
    src/_rrdtoolmodule.c:426: error: ‘unival’ has no member named ‘u_val’
    src/_rrdtoolmodule.c:426: error: ‘unival’ has no member named ‘u_val’
    src/_rrdtoolmodule.c:426: error: ‘unival’ has no member named ‘u_val’
    src/_rrdtoolmodule.c:426: error: ‘unival’ has no member named ‘u_val’
    src/_rrdtoolmodule.c:426: error: ‘unival’ has no member named ‘u_val’
    src/_rrdtoolmodule.c:426: error: ‘unival’ has no member named ‘u_val’
    src/_rrdtoolmodule.c:443: error: ‘unival’ has no member named ‘u_val’
    src/_rrdtoolmodule.c:443: error: ‘unival’ has no member named ‘u_val’
    src/_rrdtoolmodule.c:443: error: ‘unival’ has no member named ‘u_val’
    src/_rrdtoolmodule.c:443: error: ‘unival’ has no member named ‘u_val’
    src/_rrdtoolmodule.c:443: error: ‘unival’ has no member named ‘u_val’
    src/_rrdtoolmodule.c:443: error: ‘unival’ has no member named ‘u_val’
    src/_rrdtoolmodule.c:455: error: ‘unival’ has no member named ‘u_val’
    src/_rrdtoolmodule.c:455: error: ‘unival’ has no member named ‘u_val’
    src/_rrdtoolmodule.c:455: error: ‘unival’ has no member named ‘u_val’
    src/_rrdtoolmodule.c:455: error: ‘unival’ has no member named ‘u_val’
    src/_rrdtoolmodule.c:455: error: ‘unival’ has no member named ‘u_val’
    src/_rrdtoolmodule.c:455: error: ‘unival’ has no member named ‘u_val’
    error: command 'gcc' failed with exit status 1

    ----------------------------------------
Command "/usr/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip-a5tFI5-build/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-krfsUz-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-a5tFI5-build

Solution

  • I manually download and install package from http://rpm.pbone.net