python学习笔记--pycurl模块安装遇到的问题。

1.用easy_install安装的时候

[root@idayuan ~]# easy_install pycurl
Searching for pycurl
Best match: pycurl 7.19.0
Adding pycurl 7.19.0 to easy-install.pth file

Using /usr/lib64/python2.7/site-packages
Processing dependencies for pycurl
Finished processing dependencies for pycurl

2.用pip安装的时候(由于已经安装完成所以只摘取了一些错误)

__main__.ConfigurationError: Could not run curl-config: [Errno 2] 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.2.

       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.2.

       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.2.

       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.2.

       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.4.

       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.7.

       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.8.

       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 9, 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 2241, in main
    
  File "/usr/lib64/python2.7/distutils/core.py", line 152, in setup
    dist.run_commands()
  File "/usr/lib64/python2.7/distutils/dist.py", line 953, in run_commands
    self.run_command(cmd)
  File "/usr/lib64/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
  File "build/bdist.linux-x86_64/egg/setuptools/command/easy_install.py", line 391, in run
    
  File "build/bdist.linux-x86_64/egg/setuptools/command/easy_install.py", line 640, in easy_install
    
  File "build/bdist.linux-x86_64/egg/setuptools/command/easy_install.py", line 670, in install_item
    
  File "build/bdist.linux-x86_64/egg/setuptools/command/easy_install.py", line 850, in install_eggs
    
  File "build/bdist.linux-x86_64/egg/setuptools/command/easy_install.py", line 1078, in build_and_install
    
  File "build/bdist.linux-x86_64/egg/setuptools/command/easy_install.py", line 1064, in run_setup
    
  File "build/bdist.linux-x86_64/egg/setuptools/sandbox.py", line 246, in run_setup
  File "/usr/lib64/python2.7/contextlib.py", line 35, in __exit__
    self.gen.throw(type, value, traceback)
  File "build/bdist.linux-x86_64/egg/setuptools/sandbox.py", line 195, in setup_context
  File "/usr/lib64/python2.7/contextlib.py", line 35, in __exit__
    self.gen.throw(type, value, traceback)
  File "build/bdist.linux-x86_64/egg/setuptools/sandbox.py", line 166, in save_modules
  File "build/bdist.linux-x86_64/egg/setuptools/sandbox.py", line 140, in resume
  File "/usr/lib64/python2.7/pickle.py", line 1382, in loads
    return Unpickler(file).load()
  File "/usr/lib64/python2.7/pickle.py", line 858, in load
    dispatch[key](self)
  File "/usr/lib64/python2.7/pickle.py", line 1133, in load_reduce
    value = func(*args)
TypeError: __init__() takes at least 3 arguments (1 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.3
          Perl Options: PREFIX=/opt/rrdtool-1.4.7 LIB=/opt/rrdtool-1.4.7/lib/perl/5.16.3
          Ruby Modules: 
           Ruby Binary: no
          Ruby Options: sitedir=/opt/rrdtool-1.4.7/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.7.

       ... 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.7/pyconfig.h:6:0,
                 from /usr/include/python2.7/Python.h:8,
                 from rrdtool-1.4.7/bindings/python/rrdtoolmodule.c:44:
/usr/include/python2.7/pyconfig-64.h:1182:0: warning: "_POSIX_C_SOURCE" redefined [enabled by default]
 #define _POSIX_C_SOURCE 200112L
 ^
In file included from rrdtool-1.4.7/bindings/python/../../src/rrd_config_bottom.h:14:0,
                 from rrdtool-1.4.7/bindings/python/../../rrd_config.h:436,
                 from rrdtool-1.4.7/bindings/python/rrdtoolmodule.c:41:
/usr/include/features.h:168:0: note: this is the location of the previous definition
 # define _POSIX_C_SOURCE 200809L
 ^
In file included from /usr/include/python2.7/pyconfig.h:6:0,
                 from /usr/include/python2.7/Python.h:8,
                 from rrdtool-1.4.7/bindings/python/rrdtoolmodule.c:44:
/usr/include/python2.7/pyconfig-64.h:1204:0: warning: "_XOPEN_SOURCE" redefined [enabled by default]
 #define _XOPEN_SOURCE 600
 ^
In file included from rrdtool-1.4.7/bindings/python/../../src/rrd_config_bottom.h:14:0,
                 from rrdtool-1.4.7/bindings/python/../../rrd_config.h:436,
                 from rrdtool-1.4.7/bindings/python/rrdtoolmodule.c:41:
/usr/include/features.h:170:0: note: this is the location of the previous definition
 # define _XOPEN_SOURCE 700
 ^
/usr/bin/ld: cannot find -lrrd
collect2: error: ld returned 1 exit status
error: Setup script exited with error: command 'gcc' failed with exit status 1

 

posted @ 2016-04-23 14:43  day顾小北  阅读(788)  评论(0编辑  收藏  举报