因为在centos7中并没有发现这个问题存在,所以猜测7以下版本存在这个问题。
先尝试第一种解决方案:
在执行./configure 之前,先执行:
# autoreconf --force --install
# libtoolize --automake --force
# automake --force --add-missing
因为没有安装
automake 工具,
yim install autoconf automake libtool -y
如果第一个方案无法解决问题,那么,放大招:
拿我碰到的libxml2编译时的问题来说:
先注意如下行:
5752 : ${CP="cp -f"}
5753 : ${MV="mv -f"}
5754 : ${RM="rm -f"}
这里其实定义了RM 命令为rm -f的,但就是报错了,没招儿啊,所以只能放大:往下看:
编辑所需要编译文件的 configure文件,找到造成报错问题的所在行,然后#号注释掉
如我遇到的libtoolT
23143 PACKAGE='$PACKAGE'
23144 VERSION='$VERSION'
23145 TIMESTAMP='$TIMESTAMP'
23146 RM='$RM -r'
23147 ofile='$ofile'
23968 "libtool":C)
23969
23970 # See if we are running on zsh, and set the options which allow our
23971 # commands through without removal of \ escapes.
23972 if test -n "${ZSH_VERSION+set}" ; then
23973 setopt NO_GLOB_SUBST
23974 fi
23975
23976 cfgfile="${ofile}T"
23977 trap "$RM \"$cfgfile\"; exit 1" 1 2 15
23978 $RM "$cfgfile"
23979
行数太多没太看逻辑,因为毕竟在第5754行是设置了RM='rm -f' 的