zoukankan      html  css  js  c++  java
  • Python-pycurl模块的安装

    先执行以下命令(因为我在另一个终端执行,所以history的编号有重复)

    7 wget https://pypi.python.org/packages/source/p/pycurl/pycurl-7.19.3.1.tar.gz --no-check-
    8 tar -zxvf pycurl-7.19.3.1.tar.gz
    9 cd pycurl-7.19.3.1/
    10 ls
    11 yum install python-devel gcc* libcurl-devel openssl-libs-1.0.2k-8.el7.x86_64 -y
    12 kill -9 3688        #因为我yum被锁了
    13 yum install python-devel gcc* libcurl-devel openssl-libs-1.0.2k-8.el7.x86_64 -y

    [root@localhost pycurl-7.19.3.1]# history
    1 ifconfig
    2 ping www.baidu.com
    3 ifconfig|grep 'inet '
    4 systemctl restart network
    5 ifconfig|grep 'inet '
    6 ping 10.0.3.14
    7 wget http://curl.haxx.se/download/curl-7.36.0.tar.gz
    8 tar -zxvf curl-7.36.0.tar.gz
    9 cd curl-7.36.0/
    10 ls
    11 ./configure
    12 make && make install
    13 export LD_LIBRARY_PATH=/usr/local/lib     #这里也是关键,否则会报错ImportError: pycurl: libcurl link-time ssl backend (nss) is different from compile-time ssl backend (none/other)  注意export,也就是说只能在当前终端有效,另开一个终端会失效


    14 cd ..
    15 cd pycurl-7.19.3.1/
    16 ls
    17 python setup.py install --curl-config=/usr/local/bin/curl-config

    [root@localhost pycurl-7.19.3.1]# python 
    Python 2.7.5 (default, Aug 4 2017, 00:39:18) 
    [GCC 4.8.5 20150623 (Red Hat 4.8.5-16)] on linux2
    Type "help", "copyright", "credits" or "license" for more information.
    >>> import pycurl
    >>> quit()

  • 相关阅读:
    继承
    包、logging模块、hashlib模块、openpyxl模块、深浅拷贝
    Java中的Lambda表达式
    Java中udp/tcp的发送和接收
    Java中的IO流总结
    Java中的多线程
    Java中使用try-catch-finally处理IO流中的异常
    Java中的杂流(闸总)
    Java中的Properties
    Java中IO流之字符流
  • 原文地址:https://www.cnblogs.com/biaopei/p/8473579.html
Copyright © 2011-2022 走看看