{"id":220022,"date":"2021-06-18T08:40:46","date_gmt":"2021-06-18T00:40:46","guid":{"rendered":"https:\/\/lrxjmw.cn\/?p=220022"},"modified":"2021-06-04T09:26:26","modified_gmt":"2021-06-04T01:26:26","slug":"centos-yum-python","status":"publish","type":"post","link":"https:\/\/lrxjmw.cn\/centos-yum-python.html","title":{"rendered":"\u5982\u4f55\u89e3\u51b3CentOS\u4e0b\u4f7f\u7528yum\u5b89\u88c5python-pip\u5931\u8d25"},"content":{"rendered":"\n\n\n
\u5bfc\u8bfb<\/td>\n\u7528Ubuntu\u7684\u65f6\u5019\u611f\u89c9\u5f88\u7b80\u5355\u7684\u4e8b\u5230ContOS\u4e0a\u5374\u53d8\u5f97\u5f88\u5934\u75db\uff0cCentOS\u4e0b\u4f7f\u7528yum\u5b89\u88c5python-pip\u5931\u8d25\u7684\u5b8c\u7f8e\u89e3\u51b3\u65b9\u6cd5\u3002<\/strong><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n

\"\"<\/p>\n

\u5728\u6267\u884c\u4ee5\u4e0b\u547d\u4ee4\u5b89\u88c5Python-pip\u5c45\u7136\u4ec0\u4e48\u4e5f\u6ca1\u6267\u884c<\/p>\n

yum install python-pip<\/pre>\n

\u540e\u6765google\u4e86\u4e00\u4e0b\u8bf4\u662f\u8fd9\u4e2a\u5305\u5728EPEL\u6e90\u91cc\uff0c\u8981\u6dfb\u52a0EPEL\u6e90\u624d\u53ef\u4ee5\u3002\u7136\u540e\u6309\u535a\u5ba2\u91cc\u8bf4\u7684\u65b9\u6cd5\u6dfb\u52a0\uff0c\u6267\u884c\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n

sudo rpm -ivh epel-release*<\/pre>\n

\u4f46\u662f\u6700\u540e\u63d0\u793a\u7cfb\u7edf\u91cc\u5df2\u7ecf\u5b89\u88c5\u4e86\u6700\u65b0\u7684epel\u5305\uff0c\u4f46\u4e3a\u4ec0\u4e48\u5374\u7528\u4e0d\u4e86\u5462\uff1fgoogle\u4e86\u4e00\u5929\u591a\u90fd\u6ca1\u6709\u7ed3\u679c\uff0c\u6700\u540e\u5728\u4e00\u4e2a\u535a\u5ba2\u770b\u5230\u4e00\u53e5\u8bdd\u8ba9\u6211\u627e\u5230\u4e86\u65b9\u5411\u3002CentOS\u4e2d\u6709\u7684\u6e90\u662f\u88ab\u7981\u7528\u7684\uff0c\u901a\u8fc7\u4ee5\u4e0b\u547d\u4ee4\u53ef\u4ee5\u67e5\u770b\u542f\u7528\u7684\u6e90\u548c\u7981\u7528\u7684\u6e90\u3002<\/p>\n

\/\/ \u67e5\u770b\u542f\u7528\u7684\u6e90\u5217\u8868<\/p>\n

yum repolist<\/pre>\n

\/\/ \u67e5\u770b\u7981\u7528\u7684\u6e90\u5217\u8868<\/p>\n

yum repolist disabled<\/pre>\n

\u6211\u67e5\u770b\u4e86\u4e00\u4e0b\u679c\u7136epel\u5728\u7981\u7528\u5217\u8868\u91cc\uff0c\u90a3\u600e\u4e48\u542f\u7528\u5462\uff1f\u5176\u5b9e\u53ea\u8981\u4fee\u6539\u4e00\u4e2a\u6587\u4ef6\u5c31\u53ef\u4ee5\u4e86\uff0c\u7528vim\u6253\u5f00\u4e0b\u9762\u7684\u6587\u4ef6<\/p>\n

vim \/etc\/yum.repos.d\/epel.repo <\/pre>\n

\u5c06\u4e0b\u9762\u7b2c\u4e00\u4e2a\u548c\u7b2c\u4e09\u4e2a\u7684enabled=0\u6539\u6210enabled=1\uff0c\u7b2c\u4e8c\u4e2a\u662f\u6d4b\u8bd5\u7248\u7684\u53ef\u80fd\u4e0d\u7a33\u5b9a\u6240\u6709\u522b\u4fee\u6539\u3002<\/p>\n

name=Extra Packages for Enterprise Linux 6 - $basearch\r\n #baseurl=http:\/\/download.Fedoraproject.org\/pub\/epel\/6\/$basearch\r\n  mirrorlist=https:\/\/mirrors.fedoraproject.org\/metalink?repo=epel-6&arch=$base  arch\r\n  failovermethod=priority\r\n  enabled=0\r\n  gpgcheck=1\r\n  gpgkey=file:\/\/\/etc\/pki\/rpm-gpg\/RPM-GPG-KEY-EPEL-6\r\n[epel-debuginfo]\r\n name=Extra Packages for Enterprise Linux 6 - $basearch - Debug\r\n #baseurl=http:\/\/download.fedoraproject.org\/pub\/epel\/6\/$basearch\/debug\r\n mirrorlist=https:\/\/mirrors.fedoraproject.org\/metalink?repo=epel-debug-6&arch  =$basearch\r\n failovermethod=priority\r\n enabled=0\r\ngpgkey=file:\/\/\/etc\/pki\/rpm-gpg\/RPM-GPG-KEY-EPEL-6\r\n gpgcheck=1\r\n[epel-source]\r\n name=Extra Packages for Enterprise Linux 6 - $basearch - Source\r\n#baseurl=http:\/\/download.fedoraproject.org\/pub\/epel\/6\/SRPMS\r\n mirrorlist=https:\/\/mirrors.fedoraproject.org\/metalink?repo=epel-source-6&arc  h=$basearch\r\n failovermethod=priority\r\n enabled=0\r\n gpgkey=file:\/\/\/etc\/pki\/rpm-gpg\/RPM-GPG-KEY-EPEL-6\r\n gpgcheck=1<\/pre>\n

\u73b0\u5728\u53ef\u4ee5\u7528\u4e86\uff0c\u5982\u679c\u4e0d\u4fee\u6539\u4e0a\u9762\u7684\u6587\u4ef6\u4e5f\u53ef\u4ee5\u7528\u5c31\u4e2d\u5728\u5b89\u88c5\u7684\u547d\u4ee4\u91cc\u52a0\u4ee5\u4e0b\u53c2\u6570\u4e5f\u53ef\u4ee5\u3002<\/p>\n

--enablerepo=epel\r\n\r\nyum --enablerepo=epel install python-pip<\/pre>\n","protected":false},"excerpt":{"rendered":"

\u5728\u6267\u884c\u4ee5\u4e0b\u547d\u4ee4\u5b89\u88c5Python-pip\u5c45\u7136\u4ec0\u4e48\u4e5f\u6ca1\u6267\u884c yum install python-pip \u540e\u6765go […]<\/p>\n","protected":false},"author":310,"featured_media":220029,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[55],"tags":[],"class_list":["post-220022","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-thread"],"acf":[],"_links":{"self":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/220022","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/users\/310"}],"replies":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/comments?post=220022"}],"version-history":[{"count":6,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/220022\/revisions"}],"predecessor-version":[{"id":220096,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/220022\/revisions\/220096"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media\/220029"}],"wp:attachment":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media?parent=220022"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/categories?post=220022"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/tags?post=220022"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}