群主你好:
CentOS7.2安装Python3.6后宝塔linux面板就无法使用了,之前单独是Python2.7的时可以正常打开面板,求指点,谢谢!!
我的操作过程如下:
# yum install openssl-devel bzip2-devel expat-devel gdbm-devel readline-devel sqlite-devel
# wget https://www.python.org/ftp/python/3.6.0/Python-3.6.0.tgz
# tar -xzvf Python-3.6.0.tgz -C /tmp
# cd /tmp/Python-3.6.0/
把Python3.6安装到 /usr/local 目录
# ./configure --prefix=/usr/local
# make
# make altinstall
更改/usr/bin/python 软链
# cd /usr/bin
# mv python python.backup
# ln -s /usr/local/bin/python3.6 /usr/bin/python
# ln -s /usr/local/bin/python3.6 /usr/bin/python3
更改yum脚本的python依赖
# cd /usr/bin
编辑修改yum文件,文件头改为 #!/usr/bin/python 改为 #!/usr/bin/python2
修改urlgrabber配置文件
# vi /usr/libexec/urlgrabber-ext-down
将#!/usr/bin/python 改为 #!/usr/bin/python2
|
|