安装Greatsql 的MYSHELL SHELL报错
由于社区中MYSHELL SHELL版本是2.28,我特意安装了一台ORALCE LINUX 8虚拟机。cat /etc/redhat-release
Red Hat Enterprise Linux release 8.9 (Ootpa)
ldd --version
ldd (GNU libc) 2.28
Copyright (C) 2018 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Written by Roland McGrath and Ulrich Drepper.
在使用社区的MYSQL SHELL时,
./mysqlsh
Python path configuration:
PYTHONHOME = '/usr/bin/python3'
PYTHONPATH = (not set)
program name = '/root/greatsql-shell-8.0.32-25-glibc2.28-x86_64/bin/mysqlsh'
isolated = 0
environment = 1
user site = 1
import site = 1
sys._base_executable = '/root/greatsql-shell-8.0.32-25-glibc2.28-x86_64/bin/mysqlsh'
sys.base_prefix = '/usr/bin/python3'
sys.base_exec_prefix = '/usr/bin/python3'
sys.executable = '/root/greatsql-shell-8.0.32-25-glibc2.28-x86_64/bin/mysqlsh'
sys.prefix = '/usr/bin/python3'
sys.exec_prefix = '/usr/bin/python3'
sys.path = [
'/usr/bin/python3/lib64/python38.zip',
'/usr/bin/python3/lib64/python3.8',
'/usr/bin/python3/lib64/python3.8/lib-dynload',
]
Fatal Python error: init_fs_encoding: failed to get the Python codec of the filesystem encoding
Python runtime state: core initialized
ModuleNotFoundError: No module named 'encodings'
Current thread 0x00007f78e3b8ef80 (most recent call first):
<no Python frame>
从上面的报错看,是python有问题。我安装的python3
可以参考这里的说明
# 先安装几个必要的依赖包
$ dnf install -y libssh python38 python38-libs python38-pyyaml
$ pip3.8 install --user certifi pyclamd
# 测试使用
$ /usr/local/greatsql-shell-8.0.32-25-centos-glibc2.28-x86_64/bin/mysqlsh
MySQL Shell 8.0.32
...
Type '\help' or '\?' for help; '\quit' to exit.
MySQLJS > \q
Bye!
yejr 发表于 2024-5-27 08:15
可以参考这里的说明
"192.168.200.136:3306": {
"address": "192.168.200.136:3306",
"memberRole": "ARBITRATOR",
"mode": "R/W",
"readReplicas": {},
"role": "HA",
"status": "ONLINE",
"version": "8.0.32"
安装相关依赖组件后,果然可以了。非常感谢
页:
[1]