最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

Centos 6.4 安裝Python 2.7 python-pip的詳細(xì)步驟

 更新時(shí)間:2017年03月05日 13:14:21   投稿:mdxy-dxy  
這篇文章主要介紹了Centos 6.4 安裝Python 2.7 python-pip的詳細(xì)步驟,需要的朋友可以參考下

1. 準(zhǔn)備工作

下載源碼包

wget http://python.org/ftp/python/2.7.3/Python-2.7.3.tar.bz2

查看是否安裝make工具

~#rpm -qa|grep make
automake-1.11.1-4.el6.noarch
make-3.81-20.el6.x86_64

如果沒(méi)有安裝make工具

yum -y install gcc automake autoconf libtool make

查看是否安裝zlib庫(kù)

~#rpm -qa|grep zlib
zlib-devel-1.2.3-29.el6.x86_64
zlib-1.2.3-29.el6.x86_64

安裝zlib

yum install zlib-devel

檢查是否安裝ssl 庫(kù)

~#rpm -qa|grep openssl
openssl-devel-1.0.1e-16.el6_5.x86_64
openssl-static-1.0.1e-16.el6_5.x86_64
openssl098e-0.9.8e-17.el6.centos.2.x86_64
openssl-1.0.1e-16.el6_5.x86_64
openssl-perl-1.0.1e-16.el6_5.x86_64

安裝openssl

yum install openssl*

安裝bzip2依賴庫(kù)

yum install -y bzip2*

2. 編譯安裝

cp Python-2.7.3.tar.bz2 /usr/src/
tar -jxvf Python-2.7.3.tar.bz2
vi Modules/Setup.dist

找到

#SSL=/usr/local/ssl
#_ssl _ssl.c \
#    -DUSE_SSL -I$(SSL)/include -I$(SSL)/include/openssl \
#    -L$(SSL)/lib -lssl -lcrypto
......
#zlib zlibmodule.c -I$(prefix)/include -L$(exec_prefix)/lib -lz

把注釋去掉

編譯

./configure --prefix=/usr/local/python2.7
make all 
make install
make clean
make distclean

安裝成功

~#/usr/local/python2.7/bin/python2.7
Python 2.7.3 (default, Dec 18 2013, 15:43:35) 
[GCC 4.4.7 20120313 (Red Hat 4.4.7-4)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> 
cd /usr/local/python2.7
python setup.py install

建立python2.7 軟鏈

~#mv /usr/bin/python /usr/bin/python.bak
~#ln -s /usr/local/python2.7/bin/python2.7 /usr/bin/python2.7
~#ln -s /usr/bin/python2.7 /usr/bin/python

3. 解決yum無(wú)法使用的問(wèn)題

~#yum update
There was a problem importing one of the Python modules
required to run yum. The error leading to this problem was:

  No module named yum

Please install a package which provides this module, or
verify that the module is installed correctly.

It's possible that the above module doesn't match the
current version of Python, which is:
2.7.3 (default, Dec 18 2013, 15:43:35) 
[GCC 4.4.7 20120313 (Red Hat 4.4.7-4)]

If you cannot solve this problem yourself, please go to 
the yum faq at:
 http://yum.baseurl.org/wiki/Faq

因?yàn)閏entos 6.4 下yum默認(rèn)使用的是python2.6

vi /usr/bin/yum
----------------------------------------------------
#!/usr/bin/python
import sys
try:
  import yum
except ImportError:
.......

修改為

#!/usr/bin/python2.6
........

4. 安裝python-pip工具

先安裝setup-tools

wget https://pypi.python.org/packages/2.7/s/setuptools/setuptools-0.6c11-py2.7.egg --no-check-certificate
chmod +x setuptools-0.6c11-py2.7.egg
sh setuptools-0.6c11-py2.7.egg

安裝pip

wget https://pypi.python.org/packages/source/p/pip/pip-1.3.1.tar.gz --no-check-certificate
cp pip-1.3.1.tar.gz /usr/src/
tar zxvf pip-1.3.1.tar.gz
cd pip-1.3.1
python setup.py install
ln -s /usr/local/python2.7/bin/pip /usr/bin/pip

相關(guān)文章

  • centos下簡(jiǎn)單配置安裝Squid 3.0反向代理

    centos下簡(jiǎn)單配置安裝Squid 3.0反向代理

    以下安裝及配置均為Sudu所在公司應(yīng)用中使用的腳本,希望高手們能指正我的一些不足。如果測(cè)試過(guò)程中發(fā)現(xiàn)了問(wèn)題請(qǐng)回復(fù)或者聯(lián)系我。
    2010-12-12
  • 詳解Lamp環(huán)境搭建Linux CentOS6.5編譯安裝mysql5.6

    詳解Lamp環(huán)境搭建Linux CentOS6.5編譯安裝mysql5.6

    這篇文章主要介紹了詳解Lamp環(huán)境搭建Linux CentOS6.5編譯安裝mysql5.6,具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下
    2017-05-05
  • CentOS+Nginx+PHP+MySQL標(biāo)準(zhǔn)生產(chǎn)環(huán)境配置方法

    CentOS+Nginx+PHP+MySQL標(biāo)準(zhǔn)生產(chǎn)環(huán)境配置方法

    這個(gè)可比網(wǎng)上流傳的什么一鍵安裝包要好得多,強(qiáng)烈推薦此法安裝,適合所有菜鳥和高手。我服務(wù)器上全用的源代碼編譯安裝,也好不到哪去,還很費(fèi)勁。我這個(gè)裝完已經(jīng)包含 php 的一些常用擴(kuò)展, PDO,eaccelerator,memcache,tidy等等。
    2010-02-02
  • linux 入侵常用命令匯編

    linux 入侵常用命令匯編

    掌握這些命令也有助于配置linux的安全,大家可以看看。
    2009-07-07
  • 詳解在Ubuntu上的Apache配置SSL(https證書)的正確姿勢(shì)

    詳解在Ubuntu上的Apache配置SSL(https證書)的正確姿勢(shì)

    這篇文章主要介紹了詳解在Ubuntu上的Apache配置SSL(https證書)的正確姿勢(shì),小編覺(jué)得挺不錯(cuò)的,現(xiàn)在分享給大家,也給大家做個(gè)參考。一起跟隨小編過(guò)來(lái)看看吧
    2018-12-12
  • Linux中的awk數(shù)組的基本使用方法

    Linux中的awk數(shù)組的基本使用方法

    這篇文章主要介紹了Linux中的awk數(shù)組的基本使用方法,非常不錯(cuò),具有一定的參考借鑒價(jià)值,需要的朋友可以參考下
    2018-08-08
  • Centos8下django項(xiàng)目部署 nginx+uwsgi的教程

    Centos8下django項(xiàng)目部署 nginx+uwsgi的教程

    這篇文章主要介紹了Centos8下django項(xiàng)目部署 nginx+uwsgi的教程,本文給大家介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或工作具有一定的參考借鑒價(jià)值,需要的朋友可以參考下
    2020-05-05
  • Scp如何使用密碼拷貝文件

    Scp如何使用密碼拷貝文件

    在Linux系統(tǒng)中使用scp命令復(fù)制文件的兩種方法:手動(dòng)輸入密碼和使用密鑰拷貝,手動(dòng)輸入密碼時(shí),系統(tǒng)會(huì)提示輸入密碼;使用密鑰拷貝時(shí),需要先生成ssh密鑰對(duì),并將公鑰添加到遠(yuǎn)程服務(wù)器的~/.ssh/authorized_keys文件中
    2025-02-02
  • Apache?Doris基礎(chǔ)簡(jiǎn)介

    Apache?Doris基礎(chǔ)簡(jiǎn)介

    Apache?Doris?是一個(gè)現(xiàn)代化的?MPP(Massively?Parallel?Processing,即大規(guī)模并行處理)分析型數(shù)據(jù)庫(kù)產(chǎn)品,這篇文章主要介紹了Apache-Doris基礎(chǔ)概念,需要的朋友可以參考下
    2024-03-03
  • Apache?Pulsar集群搭建部署詳細(xì)過(guò)程

    Apache?Pulsar集群搭建部署詳細(xì)過(guò)程

    這篇文章主要介紹了Apache?Pulsar集群搭建過(guò)程,搭建Pulsar集群至少需要3個(gè)組件:ZooKeeper集群、BookKeeper集群和Broker集群,本文給大家介紹的非常詳細(xì),需要的朋友可以參考下
    2022-02-02

最新評(píng)論

淅川县| 滨州市| 肥城市| 祁阳县| 伽师县| 林口县| 泰宁县| 区。| 潞城市| 大关县| 广水市| 陈巴尔虎旗| 吐鲁番市| 潞城市| 合肥市| 通化市| 民权县| 卓尼县| 共和县| 康定县| 青海省| 芦山县| 灵台县| 无极县| 台东县| 曲周县| 江津市| 邵阳县| 饶河县| 贺兰县| 峨山| 全椒县| 宝清县| 安丘市| 博湖县| 绵阳市| 山东省| 历史| 台山市| 南涧| 新郑市|