centos6.8下编译libxml2或者其他文件时报cannot remove `libtoolT': No such file or directory

来源:互联网 发布:10年前你错过了淘宝 编辑:程序博客网 时间:2024/06/07 17:57

因为在centos7中并没有发现这个问题存在,所以猜测7以下版本存在这个问题。

先尝试第一种解决方案:


在执行./configure 之前,先执行:

# autoreconf --force --install
# libtoolize --automake --force
# automake --force --add-missing

后台发现autoreconf未按照:The program 'autoreconf' can be found in the following 

因为没有安装
  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 

将23146行的RM='RM -r' 修改为RM='RM -rf' 即可

行数太多没太看逻辑,因为毕竟在第5754行是设置了RM='rm -f' 的


阅读全文
0 0
原创粉丝点击