.ibtoolize: error: AC_CONFIG_MACRO_DIRS([m4]) conflicts with ACLOCAL_AMFLAGS=-I m4

问题描述:
从win10下的github desktop git clone protobuf,然后把文件夹穿到linux平台的服务器再运行.sh文件产生如下错误

libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, 'build-aux'.
libtoolize: copying file 'build-aux/ltmain.sh'
.ibtoolize:   error: AC_CONFIG_MACRO_DIRS([m4]) conflicts with ACLOCAL_AMFLAGS=-I m4
autoreconf: libtoolize failed with exit status: 1

解决方法:
参考

https://stackoverflow.com/questions/47582762/ac-config-macro-dirsbuild-aux-m4-conflicts-with-aclocal-amflags-i-build-aux

在终端中运行以下命令

sudo find . -name \*.sh|xargs dos2unix
sudo find . -name \*.m4|xargs dos2unix
sudo find . -name \*.ac|xargs dos2unix
sudo find . -name \*.am|xargs dos2unix

以上方法指标不治本,由于文件夹是在windows下下载的,需要把整个文件夹做一次dos2unix才能保证下面的配置步骤正常

参考

https://stackoverflow.com/questions/11929461/how-can-i-run-dos2unix-on-an-entire-directory

在终端中运行以下命令

find . -type f -print0 | xargs -0 dos2unix

实在不行还可以试试网址里的其他回答

你可能感兴趣的:(git)