微信公众号直接链接网站怎么做,东莞常平做网站公司,农村电商网站设计与发展现状,企业做淘宝客网站有哪些系统更新部分#xff1a; 一、由于系统原有的源无法连接#xff0c;需要更新为新的源。起初#xff0c;首选163的源#xff0c;但是由于更改源以后#xff0c;无法使用yum等问题#xff0c;所以直接使用上海交通大学提供的源。 修改前#xff0c;将原来/etc/yum.repos.d… 系统更新部分 一、由于系统原有的源无法连接需要更新为新的源。起初首选163的源但是由于更改源以后无法使用yum等问题所以直接使用上海交通大学提供的源。 修改前将原来/etc/yum.repos.d下的其他.repo文件先全部备份到另一处目录以防干扰。 二、修改/etc/yum.repos.d/下的CentOS-Base.repo文件全部内容更新为 # CentOS-Base.repo
[base]
nameCentOS-$releasever - Base
#mirrorlisthttp://mirrorlist.centos.org/?release$releaseverarch$basearchrepoos
baseurlhttp://ftp.sjtu.edu.cn/centos/$releasever/os/$basearch/
enable1
gpgcheck1
gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6#released updates
[updates]
nameCentOS-$releasever - Updates
#mirrorlisthttp://mirrorlist.centos.org/?release$releaseverarch$basearchrepoupdates
baseurlhttp://ftp.sjtu.edu.cn/centos/$releasever/updates/$basearch/
enable1
gpgcheck1
gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6#additional packages that may be useful
[extras]
nameCentOS-$releasever - Extras
#mirrorlisthttp://mirrorlist.centos.org/?release$releaseverarch$basearchrepoextras
baseurlhttp://ftp.sjtu.edu.cn/centos/$releasever/extras/$basearch/
enable1
gpgcheck1
gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6#additional packages that extend functionality of existing packages
[centosplus]
nameCentOS-$releasever - Plus
#mirrorlisthttp://mirrorlist.centos.org/?release$releaseverarch$basearchrepocentosplus
baseurlhttp://ftp.sjtu.edu.cn/centos/$releasever/centosplus/$basearch/
enabled0
gpgcheck1
gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6#contrib - packages by Centos Users
[contrib]
nameCentOS-$releasever - Contrib
#mirrorlisthttp://mirrorlist.centos.org/?release$releaseverarch$basearchrepocontrib
baseurlhttp://ftp.sjtu.edu.cn/centos/$releasever/contrib/$basearch/
enabled0
gpgcheck1
gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6 三、更新源以后输入如下命令进行系统更新注意系统更新有风险操作需谨慎最好提前备份。我更新了没出现啥问题 $ sudo yum -y update 升级python部分 一、这里通过编译python的源码进行更新首先下载源码文件https://www.python.org/ftp/python/3.6.2/Python-3.6.2.tgz 可通过如下命令进行下载 $ curl -O https://www.python.org/ftp/python/3.6.2/Python-3.6.2.tgz 二、准备编译环境 1.为python3安装编译环境 $ sudo yum-builddep python 2.安装编译过程中用到的工具包 $ sudo yum install gcc gcc-c zlib-devel 三、开始编译安装 1.配置 $ sudo ./configure 2.编译 $ sudo make 3.安装 $ sudo make install 4.清理 $ sudo make clean 四、后续工作 1.查看当前版本信息 $ sudo /usr/local/bin/python3.6 -V 2.建立软连接使系统默认的python软链接指向python3原来的python改为2.6.6 $ sudo mv /usr/bin/python /usr/bin/python2.6.6
$ sudo ln -s /usr/local/bin/python3.6 /usr/bin/python 3.重新检查python版本 $ sudo python -V 4.解决系统python软连接指向python3.6版本后yum不能正常工作。因为yum是不兼容Python3.6的所以yum无法工作需要帮yum指定它所支持的版本。 $ vim /usr/bin/yum 将文件头部的!/usr/bin/python改为!/usr/bin/python2.6.6 5.将PIP3链接到/usr/bin/pip目录 $ sudo ln -s /usr/local/bin/pip3 /usr/bin/pip 更新后可能引起的问题及解决办法 1.iBus输入法不见了打字没有候选框。 原因iBus写本文的时候还不支持python2.7。 解决方案用vim分别打开/usr/bin/ibus-setup文件和/usr/libexec/ibus-ui-gtk并找到exec python那一行 分别把两个文件的exec python 都改为 exec python2.6保存退出。 iBus在重启之后即可正常显示。 参考链接http://ask.xmodulo.com/install-python3-centos.htmlhttps://www.python.org/ftp/python/3.6.2/http://blog.csdn.net/halazi100/article/details/41311837https://www.quyu.net/info/485.htmlhttp://2860664.blog.51cto.com/2850664/1715533 转载于:https://www.cnblogs.com/drfxiaoliuzi/p/7240436.html