报错如下:
usr/bin/ld: cannot find -lrrd
collect2: ld returned 1 exit status
error: command 'gcc' failed with exit status 1
Cleaning up...
Command /root/.pyenv/versions/2.7.5/bin/python2.7 -c "import setuptools, tokenize;file='/tmp/pip_build_root/python-rrdtool/setup.py';exec(compile(getattr(tokenize, 'open', open)(file).read().replace('\r\n', '\n'), file, 'exec'))" install --record /tmp/pip-P136IW-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /tmp/pip_build_root/python-rrdtool
Storing debug log for failure in /root/.pip/pip.log
rrd 的库没有找到。如果是 Debian/Ubuntu,请安装
librrd-dev
包,Arch 请安装 rrdtool(并且你不需要自己编译了),其它自己看着办。记住,pip 这类工具不是系统包管理器,只能管理 Python 库而没办法帮你安装那些 Python 库所依赖的非 Python 库。所以,如果你的软件源里有就直接装吧,别费事自己编译了。