本人系统是: Centos7.4 _ 1708 _X86_64 (64位系统) + Python-3.6.4
看了很多教程,但是都失败了,用yum install reading-devel 安装,提示没有此包,最后无奈,只能选择其他方式安装。
1. reading-devel rpm包下载
[root@local~]wget http://rpmfind.net/linux/centos/7.4.1708/os/x86_64/Packages/readline-devel-6.2-10.el7.x86_64.rpm
2. 安装reading-devel
[root@local~]rpm -i reading-devel-6.2-10.el7.x86_64.rpm
3. 重新编译安装python3
[[email protected]] ./configure –prefix=/usr/local/python3 (指定安装的路径)
….
[[email protected]] make && make install
4. 建立软链接
[root@local~] ln –s /usr/local/python3/bin/ptyhon3 /usr/bin/python3
[root@local ~] ln –s /usr/local/python3/bin/pip3 /usr/bin/pip3
进入后一般情况就正常了