conandor
conandor

Reputation: 3707

pip unable to install rrdtool

I running on Debian 6.0 with Python 2.6.6. I execute sudo pip install rrdtool and get following error.

/usr/include/python2.6/unicodeobject.h:477: note: expected ‘const char *’ but argument is of type ‘int’

error: command 'gcc' failed with exit status 1

----------------------------------------
Cleaning up...
Command /usr/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip_build_root/rrdtool/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-orC7So-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /tmp/pip_build_root/rrdtool
Traceback (most recent call last):
  File "/usr/local/bin/pip", line 9, in <module>
    load_entry_point('pip==1.5.6', 'console_scripts', 'pip')()
  File "/usr/local/lib/python2.6/dist-packages/pip/__init__.py", line 185, in main
    return command.main(cmd_args)
  File "/usr/local/lib/python2.6/dist-packages/pip/basecommand.py", line 161, in main
    text = '\n'.join(complete_log)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 51: ordinal not in range(128)

There is a suggested solution sudo apt-get install python-dev but doesn't seem work.

What am I missing here?

Upvotes: 2

Views: 6939

Answers (3)

yujia21
yujia21

Reputation: 124

In case anyone is trying to install rrdtool on Alpine, apk add build-base rrdtool-dev did the trick for me. (cf https://community.home-assistant.io/t/storing-your-very-long-history-rrd-recorder/222758/11)

Upvotes: 0

zitudu
zitudu

Reputation: 31

I installed package python-rrdtool, but the error was still there. Then I tried another two packages rrdtool and librrd-dev and the error was solved.My solution is : sudo apt-get install rrdtool python-rrdtool librrd-dev

Upvotes: 3

conandor
conandor

Reputation: 3707

I solve it by using apt-get instead pip: sudo apt-get install python-rrdtool

Upvotes: 3

Related Questions