无法在RedHat上安装py-rrdtool

时间:2016-04-17 18:22:17

标签: python redhat rrdtool

我在RHEL6上使用Python 2.6并且需要使用python安装rrdtool。我必须手动上传和安装软件包,因为出于安全原因,网络管理员会阻止yum和pip传出流量。在安装过程中,我遇到缺少rrdtoolmodule.c的错误,我在哪里可以找到该文件?或者我错过了什么?

[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

2 个答案:

答案 0 :(得分:0)

您最有可能尝试编译为更新版本的rrdtool创建的rrdtool绑定版本。由于rrdtool随着时间的推移而发生变化,您可能需要确保使用与您正在使用的rrdtool版本匹配的绑定,反之亦然。

答案 1 :(得分:0)

我手动从http://rpm.pbone.net下载并安装软件包