python学习笔记--pycurl模块安装遇到的问题。
1.用easy_install安装的时候
[root@idayuan ~]# easy_install pycurl
Searching for pycurl
Best match: pycurl 7.19.
Adding pycurl 7.19. to easy-install.pth file Using /usr/lib64/python2./site-packages
Processing dependencies for pycurl
Finished processing dependencies for pycurl
2.用pip安装的时候(由于已经安装完成所以只摘取了一些错误)
__main__.ConfigurationError: Could not run curl-config: [Errno ] No such file or directory
解决办法:
[root@idayuan ~]# yum install libcurl-devel
二。安装python-rrdtool时遇到的一些问题。
----------------------------------------------------------------------------
* I found a copy of pkgconfig, but there is no cairo-png.pc file around.
You may want to set the PKG_CONFIG_PATH variable to point to its
location.
---------------------------------------------------------------------------- configure: WARNING:
----------------------------------------------------------------------------
* I could not find a working copy of cairo-png. Check config.log for hints on why
this is the case. Maybe you need to set LDFLAGS and CPPFLAGS appropriately
so that compiler and the linker can find libcairo and its header files. If
you have not installed cairo-png, you can get it either from its original home on http://cairographics.org/releases/ You can find also find an archive copy on http://oss.oetiker.ch/rrdtool/pub/libs The last tested version of cairo-png is 1.10.. LIBS=-lm
LDFLAGS=
CPPFLAGS= ---------------------------------------------------------------------------- checking for cairo_svg_surface_create in -lcairo... no
checking for pkg-config... (cached) pkg-config
configure: WARNING:
----------------------------------------------------------------------------
* I found a copy of pkgconfig, but there is no cairo-svg.pc file around.
You may want to set the PKG_CONFIG_PATH variable to point to its
location.
---------------------------------------------------------------------------- configure: WARNING:
----------------------------------------------------------------------------
* I could not find a working copy of cairo-svg. Check config.log for hints on why
this is the case. Maybe you need to set LDFLAGS and CPPFLAGS appropriately
so that compiler and the linker can find libcairo and its header files. If
you have not installed cairo-svg, you can get it either from its original home on http://cairographics.org/releases/ You can find also find an archive copy on http://oss.oetiker.ch/rrdtool/pub/libs The last tested version of cairo-svg is 1.10.. LIBS=-lm
LDFLAGS=
CPPFLAGS= ---------------------------------------------------------------------------- checking for cairo_pdf_surface_create in -lcairo... no
checking for pkg-config... (cached) pkg-config
configure: WARNING:
----------------------------------------------------------------------------
* I found a copy of pkgconfig, but there is no cairo-pdf.pc file around.
You may want to set the PKG_CONFIG_PATH variable to point to its
location.
---------------------------------------------------------------------------- configure: WARNING:
----------------------------------------------------------------------------
* I could not find a working copy of cairo-pdf. Check config.log for hints on why
this is the case. Maybe you need to set LDFLAGS and CPPFLAGS appropriately
so that compiler and the linker can find libcairo and its header files. If
you have not installed cairo-pdf, you can get it either from its original home on http://cairographics.org/releases/ You can find also find an archive copy on http://oss.oetiker.ch/rrdtool/pub/libs The last tested version of cairo-pdf is 1.10.. LIBS=-lm
LDFLAGS=
CPPFLAGS= ---------------------------------------------------------------------------- checking for cairo_ps_surface_create in -lcairo... no
checking for pkg-config... (cached) pkg-config
configure: WARNING:
----------------------------------------------------------------------------
* I found a copy of pkgconfig, but there is no cairo-ps.pc file around.
You may want to set the PKG_CONFIG_PATH variable to point to its
location.
---------------------------------------------------------------------------- configure: WARNING:
----------------------------------------------------------------------------
* I could not find a working copy of cairo-ps. Check config.log for hints on why
this is the case. Maybe you need to set LDFLAGS and CPPFLAGS appropriately
so that compiler and the linker can find libcairo and its header files. If
you have not installed cairo-ps, you can get it either from its original home on http://cairographics.org/releases/ You can find also find an archive copy on http://oss.oetiker.ch/rrdtool/pub/libs The last tested version of cairo-ps is 1.10.. LIBS=-lm
LDFLAGS=
CPPFLAGS= ---------------------------------------------------------------------------- checking for pango_cairo_context_set_font_options in -lpangocairo-1.0... no
checking for pkg-config... (cached) pkg-config
configure: WARNING:
----------------------------------------------------------------------------
* I found a copy of pkgconfig, but there is no pangocairo.pc file around.
You may want to set the PKG_CONFIG_PATH variable to point to its
location.
---------------------------------------------------------------------------- configure: WARNING:
----------------------------------------------------------------------------
* I could not find a working copy of pangocairo. Check config.log for hints on why
this is the case. Maybe you need to set LDFLAGS and CPPFLAGS appropriately
so that compiler and the linker can find libpangocairo-1.0 and its header files. If
you have not installed pangocairo, you can get it either from its original home on http://ftp.gnome.org/pub/GNOME/sources/pango/1.28 You can find also find an archive copy on http://oss.oetiker.ch/rrdtool/pub/libs The last tested version of pangocairo is 1.28.. LIBS=-lm
LDFLAGS=
CPPFLAGS= ---------------------------------------------------------------------------- checking for glib_check_version in -lglib-2.0... no
checking for pkg-config... (cached) pkg-config
configure: WARNING:
----------------------------------------------------------------------------
* I found a copy of pkgconfig, but there is no glib-2.0.pc file around.
You may want to set the PKG_CONFIG_PATH variable to point to its
location.
---------------------------------------------------------------------------- configure: WARNING:
----------------------------------------------------------------------------
* I could not find a working copy of glib-2.0. Check config.log for hints on why
this is the case. Maybe you need to set LDFLAGS and CPPFLAGS appropriately
so that compiler and the linker can find libglib-2.0 and its header files. If
you have not installed glib-2.0, you can get it either from its original home on ftp://ftp.gtk.org/pub/glib/2.28/ You can find also find an archive copy on http://oss.oetiker.ch/rrdtool/pub/libs The last tested version of glib-2.0 is 2.28.. LIBS=-lm
LDFLAGS=
CPPFLAGS= ---------------------------------------------------------------------------- checking for xmlParseFile in -lxml2... no
checking for pkg-config... (cached) pkg-config
configure: WARNING:
----------------------------------------------------------------------------
* I found a copy of pkgconfig, but there is no libxml-2.0.pc file around.
You may want to set the PKG_CONFIG_PATH variable to point to its
location.
---------------------------------------------------------------------------- configure: WARNING:
----------------------------------------------------------------------------
* I could not find a working copy of libxml-2.0. Check config.log for hints on why
this is the case. Maybe you need to set LDFLAGS and CPPFLAGS appropriately
so that compiler and the linker can find libxml2 and its header files. If
you have not installed libxml-2.0, you can get it either from its original home on http://xmlsoft.org/downloads.html You can find also find an archive copy on http://oss.oetiker.ch/rrdtool/pub/libs The last tested version of libxml-2.0 is 2.7.. LIBS=-lm
LDFLAGS=
CPPFLAGS= -I/usr/include/libxml2 ---------------------------------------------------------------------------- configure: error: Please fix the library issues listed above and try again.
Traceback (most recent call last):
File "/bin/easy_install", line , in <module>
load_entry_point('setuptools==20.6.6', 'console_scripts', 'easy_install')()
File "build/bdist.linux-x86_64/egg/setuptools/command/easy_install.py", line , in main File "/usr/lib64/python2.7/distutils/core.py", line , in setup
dist.run_commands()
File "/usr/lib64/python2.7/distutils/dist.py", line , in run_commands
self.run_command(cmd)
File "/usr/lib64/python2.7/distutils/dist.py", line , in run_command
cmd_obj.run()
File "build/bdist.linux-x86_64/egg/setuptools/command/easy_install.py", line , in run File "build/bdist.linux-x86_64/egg/setuptools/command/easy_install.py", line , in easy_install File "build/bdist.linux-x86_64/egg/setuptools/command/easy_install.py", line , in install_item File "build/bdist.linux-x86_64/egg/setuptools/command/easy_install.py", line , in install_eggs File "build/bdist.linux-x86_64/egg/setuptools/command/easy_install.py", line , in build_and_install File "build/bdist.linux-x86_64/egg/setuptools/command/easy_install.py", line , in run_setup File "build/bdist.linux-x86_64/egg/setuptools/sandbox.py", line , in run_setup
File "/usr/lib64/python2.7/contextlib.py", line , in __exit__
self.gen.throw(type, value, traceback)
File "build/bdist.linux-x86_64/egg/setuptools/sandbox.py", line , in setup_context
File "/usr/lib64/python2.7/contextlib.py", line , in __exit__
self.gen.throw(type, value, traceback)
File "build/bdist.linux-x86_64/egg/setuptools/sandbox.py", line , in save_modules
File "build/bdist.linux-x86_64/egg/setuptools/sandbox.py", line , in resume
File "/usr/lib64/python2.7/pickle.py", line , in loads
return Unpickler(file).load()
File "/usr/lib64/python2.7/pickle.py", line , in load
dispatch[key](self)
File "/usr/lib64/python2.7/pickle.py", line , in load_reduce
value = func(*args)
TypeError: __init__() takes at least arguments ( given)
[root@idayuan ~]# yum -y install cairo-devel pango-devel libxml2-devel
Config is DONE! With MMAP IO: yes
Build rrd_getopt: no
Build rrd_graph: yes
Static programs: no
Perl Modules: perl_piped perl_shared
Perl Binary: /usr/bin/perl
Perl Version: 5.16.
Perl Options: PREFIX=/opt/rrdtool-1.4. LIB=/opt/rrdtool-1.4./lib/perl/5.16.
Ruby Modules:
Ruby Binary: no
Ruby Options: sitedir=/opt/rrdtool-1.4./lib/ruby
Build Lua Bindings: no
Build Tcl Bindings: yes
Build Python Bindings: yes
Build rrdcgi: yes
Build librrd MT: yes
Use gettext: yes
With libDBI: no
With libwrap: no Libraries: -lxml2 -lglib-2.0 -lcairo -lcairo -lcairo -lm -lcairo -lpng15 -lpangocairo-1.0 -lpango-1.0 -lcairo -lgobject-2.0 -lglib-2.0 Type 'make' to compile the software and use 'make install' to
install everything to: /opt/rrdtool-1.4.. ... that wishlist is NO JOKE. If you find RRDtool useful
make me happy. Go to http://tobi.oetiker.ch/wish and
place an order. -- Tobi Oetiker <tobi@oetiker.ch>
----------------------------------------------------------------
In file included from /usr/include/python2./pyconfig.h::,
from /usr/include/python2./Python.h:,
from rrdtool-1.4./bindings/python/rrdtoolmodule.c::
/usr/include/python2./pyconfig-.h::: warning: "_POSIX_C_SOURCE" redefined [enabled by default]
#define _POSIX_C_SOURCE 200112L
^
In file included from rrdtool-1.4./bindings/python/../../src/rrd_config_bottom.h::,
from rrdtool-1.4./bindings/python/../../rrd_config.h:,
from rrdtool-1.4./bindings/python/rrdtoolmodule.c::
/usr/include/features.h::: note: this is the location of the previous definition
# define _POSIX_C_SOURCE 200809L
^
In file included from /usr/include/python2./pyconfig.h::,
from /usr/include/python2./Python.h:,
from rrdtool-1.4./bindings/python/rrdtoolmodule.c::
/usr/include/python2./pyconfig-.h::: warning: "_XOPEN_SOURCE" redefined [enabled by default]
#define _XOPEN_SOURCE 600
^
In file included from rrdtool-1.4./bindings/python/../../src/rrd_config_bottom.h::,
from rrdtool-1.4./bindings/python/../../rrd_config.h:,
from rrdtool-1.4./bindings/python/rrdtoolmodule.c::
/usr/include/features.h::: note: this is the location of the previous definition
# define _XOPEN_SOURCE
^
/usr/bin/ld: cannot find -lrrd
collect2: error: ld returned exit status
error: Setup script exited with error: command 'gcc' failed with exit status
python学习笔记--pycurl模块安装遇到的问题。的更多相关文章
- Python学习笔记之模块与包
一.模块 1.模块的概念 模块这一概念很大程度上是为了解决代码的可重用性而出现的,其实这一概念并没有多复杂,简单来说不过是一个后缀为 .py 的 Python 文件而已 例如,我在某个工作中经常需要打 ...
- Python学习笔记011_模块_标准库_第三方库的安装
容器 -> 数据的封装 函数 -> 语句的封装 类 -> 方法和属性的封装 模块 -> 模块就是程序 , 保存每个.py文件 # 创建了一个hello.py的文件,它的内容如下 ...
- Python学习笔记—itertools模块
这篇是看wklken的<Python进阶-Itertools模块小结> 学习itertools模块的学习笔记 在看itertools中各函数的源代码时,刚开始还比较轻松,但后面看起来就比较 ...
- python学习笔记_week5_模块
模块 一.定义: 模块:用来从逻辑上组织python代码(变量,函数,类,逻辑:实现一个功能), 本质就是.py结尾的python文件(文件名:test.py,对应模块名:test) 包:用来从逻辑上 ...
- python学习笔记(八)-模块
大型python程序以模块和包的形式组织.python标准库中包含大量的模块.一个python文件就是一个模块.1.标准模块 python自带的,不需要你安装的2.第三方模块 需要安装,别人提供的. ...
- Python学习笔记2——模块的发布
1.为模块nester创建文件夹nester,其中包含:nester.py(模块文件): """这是"nester.py"模块,提供了一个名为prin ...
- python学习笔记十——模块与函数
第五章 模块与函数 5.1 python程序的结构 函数+类->模块 模块+模块->包 函数+类+模块+包=Python pyth ...
- python学习笔记:模块——自定义模块的3种导入方式
一.定义 模块就是用一堆的代码实现了一些功能的代码的集合,通常一个或者多个函数写在一个.py文件里,而如果有些功能实现起来很复杂,那么就需要创建n个.py文件,这n个.py文件的集合就是模块.如果不懂 ...
- Python学习笔记-常用模块
1.python模块 如果你退出 Python 解释器并重新进入,你做的任何定义(变量和方法)都会丢失.因此,如果你想要编写一些更大的程序,为准备解释器输入使用一个文本编辑器会更好,并以那个文件替代作 ...
随机推荐
- python面试知识总结
1. 先做自我介绍 2. 做Python几年了?为什么选择Python?3. 学历?大学什么专业?4. 除了Python以外对其他语言有没有了解?5. 你对Python这门语言的看法?6. 在学习Py ...
- Thinkphp5 微信公众号token验证不成功的原因
最近要启动微信项目,上个月就开始了解微信的开发,这个月要启动项目,配置微信公众号信息一直失败.为此,我甚至手工写了微信提交过来的记录,如: ×tamp=1510210523& ...
- WTForms组件
WTForms组件 WTForms是一个支持多个web框架的form组件,主要用于对用户请求数据进行验证. 注意: from wtforms import Form 和 from flask_wtf ...
- 升级 macOS Mojave 后部分软件 (如 VS Code) 字体变虚的解决方法
目前有些朋友的设备可能还是“非 Retina” 显示器,那这样如果升级到 Mojave 后你会发现文字不清晰了,这是因为 Mojave 默认关闭了文字次像素渲染字体,你需要在终端里执行: defaul ...
- leetcode-1-TwoNums
flag -everyday do leetcode problems at least one and at most three. problem here 需要学习的是c++的map类型,之前竟 ...
- linux下如何删除十字符libudev.so病毒文件
服务器不停的向外发包,且CPU持续100%,远程登录后查看发现有一长度为10的随机字符串进程,kill掉,会重新生成另外长度为10的字符串进程.删除文件也会重复生成,非常痛苦.查阅crond相关日志, ...
- 一定要记住这20种PS技术,让你的照片美的不行! - imsoft.cnblogs
照片名称:调出照片柔和的蓝黄色-简单方法, 1.打开原图素材,按Ctrl + J把背景图层复制一层,点通道面板,选择蓝色通道,图像 > 应用图像,图层为背景,混合为正片叠底,不透明度50%,反相 ...
- Django Rest FrameWork 全部API
Django Rest FrameWork .Requests 请求 客服端发送给服务器的请求 .Responses 响应 rest框架支持响应不同格式的内容 .Views 视图 base基础类视图 ...
- Thrift 个人实战--初次体验Thrift(转)
前言: Thrift作为Facebook开源的RPC框架, 通过IDL中间语言, 并借助代码生成引擎生成各种主流语言的rpc框架服务端/客户端代码. 不过Thrift的实现, 简单使用离实际生产环境还 ...
- node express 返回json object
web 开发的过程中我们经常需要返回对象的json 格式,使用node express 是比较简单的, 1.node express 基础网站的创建 比较简单,以前的文章有 2.编写对象并导出对象 / ...