虚拟机安装Linux,Linux再安装MySQL,缺少依赖libcrypt.so.1的解决办法

报错:

      root@localhost:/usr/local/mysql/mysql-5.7.24#  ./bin/mysqld: error while loading shared libraries: libcrypt.so.1: cannot open shared object file: No such file or directory

解决方案:直接执行 dnf install libxcrypt-compat.x86_64

root@localhost:/usr/local/mysql/mysql-5.7.24# dnf install libxcrypt-compat.x86_64
正在更新 Subscription Management 软件仓库。
上次元数据过期检查:0:36:52 前,执行于 2024年12月26日 星期四 09时09分56秒。
依赖关系解决。
====================================================================================================================
 软件包                          架构                  版本                          仓库                      大小
====================================================================================================================
安装:
 libxcrypt-compat                x86_64                4.4.36-10.el10                appstream                 91 k

事务概要
====================================================================================================================
安装  1 软件包

总下载:91 k
安装大小:193 k
确定吗?[y/N]: y
下载软件包:
libxcrypt-compat-4.4.36-10.el10.x86_64.rpm                                          166 kB/s |  91 kB     00:00    
--------------------------------------------------------------------------------------------------------------------
总计                                                                                 49 kB/s |  91 kB     00:01     
运行事务检查
事务检查成功。
运行事务测试
事务测试成功。
运行事务
  准备中  :                                                                                                     1/1 
  安装    : libxcrypt-compat-4.4.36-10.el10.x86_64                                                              1/1 
  运行脚本: libxcrypt-compat-4.4.36-10.el10.x86_64                                                              1/1 
已更新安装的产品。

已安装:
  libxcrypt-compat-4.4.36-10.el10.x86_64                                                                            

完毕!
root@localhost:/usr/local/mysql/mysql-5.7.24# ./bin/mysqld --user=mysql --basedir=/usr/local/mysql --datadir=/usr/local/mysql/data --initialize
2024-12-26T01:47:03.889221Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2024-12-26T01:47:03.889426Z 0 [ERROR] Can't find error-message file '/usr/local/mysql/share/errmsg.sys'. Check error-message file location and 'lc-messages-dir' configuration directive.
2024-12-26T01:47:03.944307Z 0 [Warning] InnoDB: New log files created, LSN=45790
2024-12-26T01:47:03.960921Z 0 [Warning] InnoDB: Creating foreign key constraint system tables.
2024-12-26T01:47:04.014350Z 0 [Warning] No existing UUID has been found, so we assume that this is the first time that this server has been started. Generating a new UUID: 4e854bbb-c32b-11ef-8fec-000c29d12d69.
2024-12-26T01:47:04.014833Z 0 [Warning] Gtid table is not ready to be used. Table 'mysql.gtid_executed' cannot be opened.
2024-12-26T01:47:04.015359Z 1 [Note] A temporary password is generated for root@localhost: :fGpdib8f+4;
root@localhost:/usr/local/mysql/mysql-5.7.24# 

虚拟机安装Linux来源:

2024版全新虚拟机与Linux安装 VMware与GentOS下载安装详细版附图_vmware for linux下载-优快云博客


Linux安装mysql5.7(超级详细)来源:

Linux安装mysql5.7(超级详细)-优快云博客

注:mysql初始化操作后,一定要记得再次更改mysql目录下所有的目录及文件夹所属的用户组和用户,以及权限

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值