初始化mysql数据库提示缺少Data:dumper模块解决方法
admin
2023-05-28 13:01:30
0

初始化mysql数据库时出现下面错误,原因是缺少Data:dumper模块

[root@bogon mysql]# ./scripts/mysql_install_db --user=mysql
FATAL ERROR: please install the following Perl modules before executing ./scripts/mysql_install_db:
Data::Dumper

解决方法 :安装autoconf库

命令:yum -y install autoconf   //此包安装时会安装Data:Dumper模块

[root@bogon mysql]# yum -y install autoconf
已加载插件:fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirror.bit.edu.cn
 * extras: mirror.bit.edu.cn
 * updates: mirror.bit.edu.cn
正在解决依赖关系
--> 正在检查事务
---> 软件包 autoconf.noarch.0.2.69-11.el7 将被 安装
--> 正在处理依赖关系 m4 >= 1.4.14,它被软件包 autoconf-2.69-11.el7.noarch 需要
--> 正在处理依赖关系 perl(Data::Dumper),它被软件包 autoconf-2.69-11.el7.noarch 需要
--> 正在检查事务
---> 软件包 m4.x86_64.0.1.4.16-10.el7 将被 安装
---> 软件包 perl-Data-Dumper.x86_64.0.2.145-3.el7 将被 安装
--> 解决依赖关系完成

依赖关系解决

================================================================================================================================
 Package                             架构                      版本                               源                       大小
================================================================================================================================
正在安装:
 autoconf                            noarch                    2.69-11.el7                        base                    701 k
为依赖而安装:
 m4                                  x86_64                    1.4.16-10.el7                      base                    256 k
 perl-Data-Dumper                    x86_64                    2.145-3.el7                        base                     47 k

事务概要
================================================================================================================================
安装  1 软件包 (+2 依赖软件包)

总下载量:1.0 M
安装大小:2.8 M
Downloading packages:
(1/3): perl-Data-Dumper-2.145-3.el7.x86_64.rpm                                                           |  47 kB  00:00:00     
(2/3): autoconf-2.69-11.el7.noarch.rpm                                                                   | 701 kB  00:00:00     
(3/3): m4-1.4.16-10.el7.x86_64.rpm                                                                       | 256 kB  00:00:02     
--------------------------------------------------------------------------------------------------------------------------------
总计                                                                                            455 kB/s | 1.0 MB  00:00:02     
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  正在安装    : m4-1.4.16-10.el7.x86_64                                                                                     1/3 
  正在安装    : perl-Data-Dumper-2.145-3.el7.x86_64                                                                         2/3 
  正在安装    : autoconf-2.69-11.el7.noarch                                                                                 3/3 
  验证中      : perl-Data-Dumper-2.145-3.el7.x86_64                                                                         1/3 
  验证中      : m4-1.4.16-10.el7.x86_64                                                                                     2/3 
  验证中      : autoconf-2.69-11.el7.noarch                                                                                 3/3 

已安装:
  autoconf.noarch 0:2.69-11.el7                                                                                                 

作为依赖被安装:
  m4.x86_64 0:1.4.16-10.el7                                perl-Data-Dumper.x86_64 0:2.145-3.el7                               

完毕!


安装完autoconf库,再运行./scripts/mysql_install_db --user=mysql,问题消失!!!


------------------------------------------------------------


下面再备上源码安装autoconf

下载地址:http://ftp.gnu.org/gnu/autoconf/

我这里选择的是2.69版本下载http://ftp.gnu.org/gnu/autoconf/autoconf-2.69.tar.gz

[root@bogon liuzhen]# tar -zxvf autoconf-2.69.tar.gz
[root@bogon liuzhen]# cd autoconf-2.69
[root@bogon autoconf-2.69]# ./configure 
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
configure: autobuild project... GNU Autoconf
configure: autobuild revision... 2.69
configure: autobuild hostname... bogon
configure: autobuild timestamp... 20170115T063135Z
checking whether /bin/sh -n is known to work... yes
checking for characters that cannot appear in file names... none
checking whether directories can have trailing spaces... yes
checking for expr... /usr/bin/expr
checking for GNU M4 that supports accurate traces... configure: error: no acceptable m4 could be found in $PATH.
GNU M4 1.4.6 or later is required; 1.4.16 or newer is recommended.
GNU M4 1.4.15 uses a buggy replacement strstr on some systems.
Glibc 2.9 - 2.12 and GNU M4 1.4.11 - 1.4.15 have another strstr bug.

执行./configure时出现下面错误: 

checking for GNU M4 that supports accurate traces... configure: error: no acceptable m4 could be found in $PATH.

GNU M4 1.4.6 or later is required; 1.4.16 or newer is recommended.

原因是需要安装M4


打开m4下载地址:

http://ftp.gnu.org/gnu/m4/

我这里下载的是最新版本http://ftp.gnu.org/gnu/m4/m4-1.4.18.tar.gz

[root@bogon liuzhen]# tar -zxvf m4-1.4.18.tar.gz
[root@bogon liuzhen]# cd m4-1.4.18
[root@bogon m4-1.4.18]# ./configure
[root@bogon m4-1.4.18]# make
[root@bogon m4-1.4.18]# make install

m4安装完成之后再次执行再次切换到autoconf目录继续安装

[root@bogon liuzhen]# cd autoconf-2.69
[root@bogon autoconf-2.69]# ./configure 
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
configure: autobuild project... GNU Autoconf
configure: autobuild revision... 2.69
configure: autobuild hostname... bogon
configure: autobuild timestamp... 20170115T064711Z
checking whether /bin/sh -n is known to work... yes
checking for characters that cannot appear in file names... none
checking whether directories can have trailing spaces... yes
checking for expr... /usr/bin/expr
checking for GNU M4 that supports accurate traces... /usr/local/bin/m4
checking whether /usr/local/bin/m4 accepts --gnu... yes
checking how m4 supports trace files... --debugfile
checking for perl... no
configure: error: perl is not found

发现了新的错误:

checking for perl... no

configure: error: perl is not found

是因为没有安装perl

可以快速yum安装,也可以向下看源码安装

[root@bogon liuzhen]# yum -y install perl perl-devel

下载地址:https://www.perl.org/get.html

源码包地址:http://www.cpan.org/src/5.0/perl-5.24.0.tar.gz

[root@bogon liuzhen]# tar -zxvf perl-5.24.0.tar.gz
[root@bogon liuzhen]# cd perl-5.24.0
[root@bogon perl-5.24.0]# ./Configure
[root@bogon perl-5.24.0]# make
[root@bogon perl-5.24.0]# make install

perl安装完成之后再次执行再次切换到autoconf目录继续安装

[root@bogon liuzhen]# cd autoconf-2.69
[root@bogon autoconf-2.69]# ./configure 
[root@bogon autoconf-2.69]# make
[root@bogon autoconf-2.69]# make install

至此autoconf通过源码方式安装完成

相关内容

热门资讯

房主任塌房,互联网装不下“农村... 作者/富十几 编辑/章鱼房主任,塌房了。这些天,只要你打开社交平台就会发现,这位50岁脱口秀演员风评...
美媒爆料:特朗普与美防长爆发激... 据《华盛顿邮报》8月5日报道,在上周末戴维营峰会上,特朗普总统就弹药库存极度短缺一事怒火难平,向美防...
马桶水箱烂了能补吗 解决方法:当然是可以修补的,首先你把水箱的水放干,用卫生纸把洞口水渍污垢擦干,如果洞口很小的话,直接...
九牧马桶冲水无力怎么处理 进水阀的水位比较低,冲水压力小导致。将进水阀拆掉,把里面的卡扣逆时针旋转到适当的调整高度,再拧紧连接...
海尔油烟机好用吗 你好,个人觉得海尔油烟机还是非常不错的,我家目前也是选择购买的海尔油烟机,目前使用了这么久基本没有出...
智能马桶漏水的原因和处理方法有... 1、可能是因为异物进入智能马桶中,建议寻找专业的维修人员进行维修,在维修之前一定要先断电,避免发生危...
toto智能马桶漏水怎么修 TOTO 智能马桶漏水可能是由多种原因引起的,以下是一些常见的修复方法:1. 检查水箱:确保水箱内的...
周杰伦被传有私生子,公司发声明 8月5日,知名狗仔卓伟通过视频爆料称,一位华语乐坛三字歌唱天王疑有十余岁私生子,但全程未点名、未出示...
中方接连出手反制 商务部5日公布多项对美反制和出口管制措施:对7家美国实体采取反制措施,加强无人机相关两用物项对美国出...
美国司法部被起诉:交出爱泼斯坦... 据路透社8月6日报道,美国新墨西哥州政府日前起诉美国司法部,要求获取涉及已故性犯罪者杰弗里·爱泼斯坦...