无法在centos 6上安装cairosvg

时间:2016-07-23 02:22:25

标签: python svg centos cairo

在Centos上执行sudo pip install cairosvg时 得到以下错误

  self.run_setup(setup_script, setup_base, args)
  File "/usr/lib/python2.6/site-packages/setuptools/command/easy_install.py", line 949, in run_setup
  raise DistutilsError("Setup script exited with %s" % (v.args[0],))
distutils.errors.DistutilsError: Setup script exited with error: command 'gcc' failed with exit status 1

----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-WJIHyJ/cairocffi/

1 个答案:

答案 0 :(得分:2)

CentOS 6.8 - 64

# yum install libffi-devel.x86_64

# pip install cairosvg
.
.
Installing collected packages: pycparser, cffi, cairocffi, cairosvg
  Running setup.py install for pycparser
  Running setup.py install for cffi
  Running setup.py install for cairocffi
  Running setup.py install for cairosvg
Successfully installed cairocffi-0.7.2 cairosvg-1.0.22 cffi-1.7.0 pycparser-2.14