在Centos中本来准备搭建swoole运行环境,发现需要先提前安装automake, autoconf,所以记录下安装过程。
注:在安装过程中发现automake,autoconf存在依赖关系,automake->autoconf->perl & m4,故我的安装顺序: perl->m4->autoconf->automake
make 报错:Failed to search for file: Cannot update read-only repo
#安装make命令的命令 yum -y install gcc automake autoconf libtool make#查看是否安装成功(在Xshell下) make -v
一、安装perl(yum -y install perl perl-devel)
1.下载安装包 wget http://search.cpan.org/CPAN/authors/id/S/SH/SHAY/perl-5.26.1.tar.gz
2. 解压安装包 tar -zxvf perl-5.26.1.tar.gz
3. 进入安装目录 cd perl-5.26.1
4. 编译并安装 make && make install
5. 验证 perl -v,如下图则安装成功
二、安装m4
1.下载安装包 wget http://mirrors.kernel.org/gnu/m4/m4-1.4.18.tar.gz
2. 解压安装包 tar -xzvf m4-1.4.18.tar.gz
3. 进入安装目录 cd m4-1.4.18
4. 配置安装目录 ./configure --prefix=/usr/local
5. 编译并安装 make && make install
6. 编译并安装 m4 --version
在CentOS 8.1中,configure 会报如下图错误
解决方法 yum install gcc,安装gcc即可
在CentOS 8.1 make的时候会报如下图错误
解决方法 NUC980开源项目24-Please port gnulib freadahead.c to your platform
sed -i ‘s/IO_ftrylockfile/IO_EOF_SEEN/’ lib/*.c
echo “#define _IO_IN_BACKUP 0x100” >> lib/stdio-impl.h
三、安装autoconf
1.下载安装包 wget http://mirrors.kernel.org/gnu/autoconf/autoconf-2.69.tar.gz
2. 解压安装包 tar -xzvf autoconf-2.69.tar.gz
3. 进入安装目录 cd autoconf-2.69
4. 配置安装目录 ./configure --prefix=/usr/local
5. 编译并安装 make && make install
6. 编译并安装 autoconf --version
执行step 5,可能会报如下错误:
Can’t locate Data/Dumper.pm in @INC (@INC contains: /usr/local/lib64/perl5……
提示这个是缺失perl 的插件,可以通过yum的方式来安装下插件.yum install 'perl(Data::Dumper)'
四、安装automake
1.下载安装包 wget http://mirrors.kernel.org/gnu/automake/automake-1.16.tar.gz
2. 解压安装包 tar xzvf automake-1.16.tar.gz
3. 进入安装目录 cd automake-1.16
4. 配置安装目录 ./configure --prefix=/usr/local
5. 编译并安装 make && make install
6. 编译并安装 automake --version
执行step5,可能会报错:
help2man: can’t get `–help’ info from automake-1.16……
解决办法:可以通过vi Makefile,在3694行的末尾加上 --no-discard-stderr
执行step5, 可能会报错
Can’t locate Thread/Queue.pm in @INC (@INC contains: /usr/share/automake-1.15 /usr/local/lib64/perl5 ……
解决办法:缺少perl环境依赖 “perl-Thread-Queue”,下载并安装 yum install perl-Thread-Queue
执行step5,可能会报错
“none” is not exported by the “List::Util module”
Can’t continue after import errors at ./bin/automake line 76
解决办法:vi /usr/local/bin/automake 第76行,将use List::Util ‘none’; 改为 use List::Util;
参考文档:
CentOS7.4 安装 perl 环境
RPM 安装 mysql 出现 Can‘t locate Data/Dumper.pm in @INC (@INC contains
Help2man: can’t get `–help’ info from automake-1.16
Centos7安装autoconf常见错误解决办法
automake --version报错
Linux下的Autoconf和AutoMake