GreatSQL社区

搜索

[已解决] 安装Greatsql 的MYSHELL SHELL报错

668 2 2024-5-26 17:00
由于社区中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


全部回复(2)
yejr 2024-5-27 08:15:18
可以参考这里的说明


  1. # 先安装几个必要的依赖包
  2. $ dnf install -y libssh python38 python38-libs python38-pyyaml
  3. $ pip3.8 install --user certifi pyclamd

  4. # 测试使用
  5. $ /usr/local/greatsql-shell-8.0.32-25-centos-glibc2.28-x86_64/bin/mysqlsh
  6. MySQL Shell 8.0.32
  7. ...
  8. Type '\help' or '\?' for help; '\quit' to exit.
  9. MySQL  JS > \q
  10. Bye!
复制代码
reddey 2024-5-27 08:47:06
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"
安装相关依赖组件后,果然可以了。非常感谢
一个学艺不精的国产数据库爱好者
reddey

28

主题

56

博客

1060

贡献

金牌会员

Rank: 6Rank: 6

积分
1362

勤学好问(铜)中肯点评(铜)解惑专家(铜)助人雷锋分享达人

合作电话:010-64087828

社区邮箱:greatsql@greatdb.com

社区公众号
社区小助手
QQ群
GMT+8, 2024-12-4 01:57 , Processed in 0.022316 second(s), 16 queries , Redis On.
快速回复 返回顶部 返回列表