GreatSQL社区

搜索

[待回复] 麒麟arm平台rpm安装一直报错如何处理,实际上依赖库是存...

42 8 3 天前
[root@kylinV1067247 greatsql26]# uname -a
Linux kylinV1067247 4.19.90-89.11.v2401.ky10.aarch64 #1 SMP Thu Apr 25 18:20:10 CST 2024 aarch64 aarch64 aarch64 GNU/Linux
[root@kylinV1067247 greatsql26]# ll /usr/lib64/libreadline*
lrwxrwxrwx 1 root root     18  9月 22 16:04 /usr/lib64/libreadline.so.7 -> libreadline.so.7.0
-rwxr-xr-x 1 root root 351120  9月 18 11:23 /usr/lib64/libreadline.so.7.0
lrwxrwxrwx 1 root root     18  2月 22  2022 /usr/lib64/libreadline.so.8 -> libreadline.so.8.0
-rwxr-xr-x 1 root root 351160  2月 22  2022 /usr/lib64/libreadline.so.8.0
[root@kylinV1067247 greatsql26]# rpm -i greatsql-client-8.0.32-26.1.el8.aarch64.rpm
错误:依赖检测失败:
        libreadline.so.7()(64bit) 被 greatsql-client-8.0.32-26.1.el8.aarch64 需要
[root@kylinV1067247 greatsql26]#


全部回复(8)
yejr 前天 11:19
执行 ldd --version看下glibc版本号,可能无法兼容。
建议换成二进制包安装,或者自行编译RPM包。
dearhjb 前天 11:33
yejr 发表于 2025-9-23 11:19
执行 ldd --version看下glibc版本号,可能无法兼容。
建议换成二进制包安装,或者自行编译RPM包。 ...

[root@kylinV1067247 ~]#  ldd --version
ldd (GNU libc) 2.28
Copyright (C) 2018 自由软件基金会。
这是一个自由软件;请见源代码的授权条款。本软件不含任何没有担保;甚至不保证适销性
或者适合某些特殊目的。
由 Roland McGrath 和 Ulrich Drepper 编写。
dearhjb 前天 11:35
dearhjb 发表于 2025-9-23 11:33
[root@kylinV1067247 ~]#  ldd --version
ldd (GNU libc) 2.28
Copyright (C) 2018 自由软件基金会。

二进制包安装后启动失败,然后也不提示失败原因
[root@kylinV1067247 greatsql26]# systemctl start greatsql
Job for greatsql.service failed because the control process exited with error code.
See "systemctl status greatsql.service" and "journalctl -xe" for details.
[root@kylinV1067247 greatsql26]# systemctl status greatsql.service
● greatsql.service - GreatSQL Server
   Loaded: loaded (/etc/systemd/system/greatsql.service; disabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Tue 2025-09-23 11:34:19 CST; 5s ago
     Docs: man:mysqld(8)
           http://dev.mysql.com/doc/refman/en/using-systemd.html
  Process: 108327 ExecStartPre=/usr/local/greatesql/bin/mysqld_pre_systemd (code=exited, status=203/EXEC)

9月 23 11:34:19 kylinV1067247 systemd[1]: greatsql.service: Service RestartSec=100ms expired, scheduling restart.
9月 23 11:34:19 kylinV1067247 systemd[1]: greatsql.service: Scheduled restart job, restart counter is at 5.
9月 23 11:34:19 kylinV1067247 systemd[1]: Stopped GreatSQL Server.
9月 23 11:34:19 kylinV1067247 systemd[1]: greatsql.service: Start request repeated too quickly.
9月 23 11:34:19 kylinV1067247 systemd[1]: greatsql.service: Failed with result 'exit-code'.
9月 23 11:34:19 kylinV1067247 systemd[1]: Failed to start GreatSQL Server.
dearhjb 前天 11:37
dearhjb 发表于 2025-9-23 11:35
二进制包安装后启动失败,然后也不提示失败原因
[root@kylinV1067247 greatsql26]# systemctl start grea ...

9月 23 11:35:18 kylinV1067247 systemd[1]: kylin-kms-activation.service: Service RestartSec=30s expired, scheduling restart.
9月 23 11:35:18 kylinV1067247 systemd[1]: kylin-kms-activation.service: Scheduled restart job, restart counter is at 4802.
-- Subject: Automatic restarting of a unit has been scheduled
-- Defined-By: systemd
-- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Automatic restarting of the unit kylin-kms-activation.service has been scheduled, as the result for
-- the configured Restart= setting for the unit.
9月 23 11:35:18 kylinV1067247 systemd[1]: Stopped run kylin_kms_daemon at boot time.
-- Subject: kylin-kms-activation.service 单元已结束停止操作
-- Defined-By: systemd
-- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- kylin-kms-activation.service 单元已结束停止操作。
9月 23 11:35:18 kylinV1067247 systemd[1]: Started run kylin_kms_daemon at boot time.
-- Subject: kylin-kms-activation.service 单元已结束启动
-- Defined-By: systemd
-- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- kylin-kms-activation.service 单元已结束启动。
--
-- 启动结果为“done”。
9月 23 11:36:18 kylinV1067247 systemd[1]: kylin-kms-activation.service: Main process exited, code=exited, status=255/EXCEPTION
-- Subject: Unit process exited
-- Defined-By: systemd
-- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- An ExecStart= process belonging to unit kylin-kms-activation.service has exited.
--
-- The process' exit code is 'exited' and its exit status is 255.
9月 23 11:36:18 kylinV1067247 systemd[1]: kylin-kms-activation.service: Failed with result 'exit-code'.
-- Subject: Unit failed
-- Defined-By: systemd
-- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- The unit kylin-kms-activation.service has entered the 'failed' state with result 'exit-code'.
yejr 前天 12:04
dearhjb 发表于 2025-9-23 11:37
9月 23 11:35:18 kylinV1067247 systemd[1]: kylin-kms-activation.service: Service RestartSec=30s exp ...

估计是初始化阶段没做对,参考这里的文档完整重做一遍:https://greatsql.cn/docs/8.0.32- ... -kylin-install.html

如果还有问题,请把详细操作过程和相应的日志完整发出来
dearhjb 前天 19:59
yejr 发表于 2025-9-23 12:04
估计是初始化阶段没做对,参考这里的文档完整重做一遍:https://greatsql.cn/docs/8.0.32-27/4-install-g ...

1.png 2.png 3.png 4.png 6.png
yejr 昨天 08:06

你的二进制包安装方式不是标准方式,所以初始化时有问题。文档中已有提示:

  1. 提示:如果不是安装到默认的 /usr/local/ 目录下,请编辑 bin/mysqld_pre_systemd 脚本,修改脚本中几处涉及 GreatSQL 安装路径的地方。
复制代码

建议最好是把二进制包解压缩成 /usr/local/GreatSQL-8.0.32-27-Linux-glibc2.28-aarch64 ,然后软链接成 /usr/local/greatsql,这样就不影响 mysqld_pre_systemd 的初始化工作。

还有一种做法,就是自己手动初始化,以你的环境为例

  1. /usr/local/greatsql/bin/mysqld --defaults-file=/etc/greatsql.cnf --initialize
复制代码
dearhjb 昨天 17:56
yejr 发表于 2025-9-24 08:06
你的二进制包安装方式不是标准方式,所以初始化时有问题。文档中已有提示:

建议最好是把二进制包解压缩 ...

初始化成功了,greatsql也能启动了,但是端口一直是0端口,不管是在greatsql.cnf还是在ExecStart中通过--port指定端口,能帮看看吗。日志如下:
2025-09-24T17:28:59.996026+08:00 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
2025-09-24T17:29:00.004270+08:00 1 [Note] [MY-011089] [Server] Data dictionary restarting version '80023'.
2025-09-24T17:29:00.176305+08:00 1 [Note] [MY-012357] [InnoDB] Reading DD tablespace files
2025-09-24T17:29:00.178317+08:00 1 [Note] [MY-012356] [InnoDB] Scanned 10 tablespaces. Validated 10.
2025-09-24T17:29:00.208011+08:00 1 [Note] [MY-010006] [Server] Using data dictionary with version '80023'.
2025-09-24T17:29:00.264115+08:00 0 [Note] [MY-010855] [Server] Recovering after a crash using binlog
2025-09-24T17:29:00.264162+08:00 0 [System] [MY-010229] [Server] Starting XA crash recovery...
2025-09-24T17:29:00.277414+08:00 0 [Note] [MY-013911] [Server] Crash recovery finished in binlog engine. No attempts to commit, rollback or prepare any transactions.
2025-09-24T17:29:00.277491+08:00 0 [Note] [MY-013911] [Server] Crash recovery finished in InnoDB engine. No attempts to commit, rollback or prepare any transactions.
2025-09-24T17:29:00.277512+08:00 0 [System] [MY-010232] [Server] XA crash recovery finished.
2025-09-24T17:29:00.284047+08:00 0 [Note] [MY-012487] [InnoDB] DDL log recovery : begin
2025-09-24T17:29:00.284402+08:00 0 [Note] [MY-012488] [InnoDB] DDL log recovery : end
2025-09-24T17:29:00.286971+08:00 0 [Note] [MY-011946] [InnoDB] Loading buffer pool(s) from /var/db/nms/mysql/data/ib_buffer_pool
2025-09-24T17:29:00.310741+08:00 0 [Note] [MY-011946] [InnoDB] Buffer pool(s) load completed at 250924 17:29:00
2025-09-24T17:29:00.320038+08:00 0 [Note] [MY-010182] [Server] Found ca.pem, server-cert.pem and server-key.pem in data directory. Trying to enable SSL support using them.
2025-09-24T17:29:00.320086+08:00 0 [Note] [MY-010304] [Server] Skipping generation of SSL certificates as certificate files are present in data directory.
2025-09-24T17:29:00.321451+08:00 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.
2025-09-24T17:29:00.321500+08:00 0 [System] [MY-013602] [Server] Channel mysql_main configured to support TLS. Encrypted connections are now supported for this channel.
2025-09-24T17:29:00.321544+08:00 0 [Note] [MY-010308] [Server] Skipping generation of RSA key pair through --sha256_password_auto_generate_rsa_keys as key files are present in data directory.
2025-09-24T17:29:00.321566+08:00 0 [Note] [MY-010308] [Server] Skipping generation of RSA key pair through --caching_sha2_password_auto_generate_rsa_keys as key files are present in data directory.
2025-09-24T17:29:00.341573+08:00 0 [Note] [MY-011025] [Repl] Failed to start slave threads for channel ''.
2025-09-24T17:29:00.342030+08:00 0 [System] [MY-010931] [Server] /usr/local/greatsql/bin/mysqld: ready for connections. Version: '8.0.32-27'  socket: '/usr/local/nms/comp/service/mysql/mysql/run/mysql.sock' port: 0 GreatSQL, Release 27, Revision aa66a385910.

[root@kylinV1067247 greatsql]# more /etc/greatsql.cnf
[client]
socket  = /usr/local/nms/comp/service/mysql/mysql/run/mysql.sock

[mysql]
#default-character-set=utf8mb4
loose-skip-binary-as-hex
prompt="(\\D)[\\u@GreatSQL][\\d]>"
no-auto-rehash

[mysqld]
user    = mysql
port    = 3306
server_id = 3306
basedir = /usr/local/greatsql

datadir = /var/db/nms/mysql/data
innodb_data_home_dir = /var/db/nms/mysql/data
innodb_log_group_home_dir = /var/db/nms/mysql/data
mysqlx=0
log_bin_trust_function_creators=1

socket=/usr/local/nms/comp/service/mysql/mysql/run/mysql.sock
pid-file=mysql.pid
character-set-server=UTF8MB4
skip_name_resolve=ON
default_time_zone="+8:00"
bind_address="0.0.0.0"
secure_file_priv=
lower_case_table_names=1
#secure_file_priv=/path/to/secure_dir/
#secure_log_path=/var/log/nms/mysql/secure.log

# Performance
lock_wait_timeout=3600
open_files_limit=65535
back_log=1024
max_connections=512
max_connect_errors=1000000
table_open_cache=4096
table_definition_cache=2048
thread_stack=512K
sort_buffer_size=4M
join_buffer_size=4M
read_buffer_size=8M
read_rnd_buffer_size=4M
bulk_insert_buffer_size=64M
thread_cache_size=768
interactive_timeout=600
wait_timeout=600
tmp_table_size=32M
max_heap_table_size=32M
max_allowed_packet=64M
net_buffer_shrink_interval=180
sql_generate_invisible_primary_key=ON
loose-lock_ddl_polling_mode=ON
loose-lock_ddl_polling_runtime=200
# Logs
log_timestamps=SYSTEM
log_error=error.log
log_error_verbosity = 3
slow_query_log = ON
log_slow_extra = ON
slow_query_log_file = slow.log
long_query_time = 0.01
log_queries_not_using_indexes = ON
log_throttle_queries_not_using_indexes = 60
min_examined_row_limit = 100
#log_slow_admin_statements = ON
#log_slow_replica_statements = OFF
#log_slow_verbosity = FULL
#log_bin = binlog
#binlog_format = ROW
#sync_binlog = 1
binlog_cache_size = 4M
max_binlog_cache_size = 2G
max_binlog_size = 1G
binlog_space_limit = 500G
binlog_rows_query_log_events = ON
binlog_expire_logs_seconds = 604800
binlog_checksum = CRC32
binlog_order_commits = OFF
gtid_mode = ON
enforce_gtid_consistency = ON

# InnoDB
innodb_buffer_pool_size = 2G #如果是专用的数据库服务器,则可以设置为物理内存的50%-70%,视实际情况而定
innodb_buffer_pool_instances = 8
innodb_data_file_path = ibdata1:12M:autoextend
innodb_flush_log_at_trx_commit = 1
innodb_log_buffer_size = 64M
innodb_redo_log_capacity = 6G
innodb_doublewrite_files = 2
innodb_doublewrite_pages = 128
innodb_max_undo_log_size = 4G
innodb_io_capacity = 10000
innodb_io_capacity_max = 20000
innodb_open_files = 65535
innodb_flush_method = O_DIRECT
innodb_use_fdatasync = ON
innodb_lru_scan_depth = 4000
innodb_lock_wait_timeout = 10
innodb_rollback_on_timeout = ON
innodb_print_all_deadlocks = ON
innodb_online_alter_log_max_size = 4G
innodb_print_ddl_logs = ON
innodb_status_file = ON
innodb_status_output = OFF
innodb_status_output_locks = ON
innodb_sort_buffer_size = 64M
innodb_adaptive_hash_index = OFF
innodb_numa_interleave = OFF
innodb_spin_wait_delay = 20
innodb_print_lock_wait_timeout_info = ON
innodb_change_buffering = none
kill_idle_transaction = 300
innodb_data_file_async_purge = ON

#innodb monitor settings
#innodb_monitor_enable = "module_innodb,module_server,module_dml,module_ddl,module_trx,module_os,module_purge,module_log,module_lock,module_buffer,module_index,module_ibuf_system,module_buffer_page,module_adapti
ve_hash"

#pfs settings
performance_schema = 1
#performance_schema_instrument = '%memory%=on'
performance_schema_instrument = '%lock%=on'
skip-grant-tables
#[mysqld_safe]
#log-error=/var/log/nms/mysql/mysqld.log
[root@kylinV1067247 greatsql]# more /etc/systemd/system/greatsql.service
[Unit]
Description=GreatSQL Server
Documentation=man:mysqld(8)
Documentation=http://dev.mysql.com/doc/refman/en/using-systemd.html
After=network.target
After=syslog.target
[Install]
WantedBy=multi-user.target
[Service]
RestartSec=5
#StartLimitInterval=200ms  # 放宽时间窗口

# some limits
# file size
LimitFSIZE=infinity
# cpu time
LimitCPU=infinity
# virtual memory size
LimitAS=infinity
# open files
LimitNOFILE=65535
# processes/threads
LimitNPROC=65535
# locked memory
LimitMEMLOCK=infinity
# total threads (user+kernel)
TasksMax=infinity
TasksAccounting=false

User=mysql
Group=mysql
#如果是GreatSQL 5.7版本,此处需要改成simple模式,否则可能服务启用异常
#如果是GreatSQL 8.0版本则可以使用notify
#如果启动时my.cnf中增加daemonize=1参数(以daemon方式启动GreatSQL),则可以采用forking模式
#Type=simple
Type=notify
TimeoutSec=10
PermissionsStartOnly=true
ExecStartPre=/usr/local/greatsql/bin/mysqld_pre_systemd
ExecStart=/usr/local/greatsql/bin/mysqld --defaults-file=/etc/greatsql.cnf --port=33360
EnvironmentFile=-/etc/sysconfig/mysql
Restart=on-failure
RestartPreventExitStatus=1
Environment=MYSQLD_PARENT_PID=1
PrivateTmp=false
dearhjb

1

主题

0

博客

7

贡献

新手上路

Rank: 1

积分
13

合作电话:010-64087828

社区邮箱:greatsql@greatdb.com

社区公众号
社区小助手
QQ群
GMT+8, 2025-9-25 02:32 , Processed in 0.021956 second(s), 19 queries , Redis On.
快速回复 返回顶部 返回列表