bin/rm: cannot remove `libtoolT': No such file or directory
此錯誤常見於自動化構建工具鏈版本不匹配,導致 libtool 產生的臨時檔案清理失敗。
aclocal
autoconf
automake --add-missing --copy --force-missing
libtoolize --force --copy
./configure
make clean && make
| 指令 | 作用 |
|---|---|
aclocal |
掃描 configure.ac 生成 aclocal.m4,收集巨集定義 |
autoconf |
依 configure.ac 生成 configure 腳本 |
automake --add-missing --copy --force-missing |
生成 Makefile.in,補全缺失模板檔(如 install-sh、missing) |
libtoolize --force --copy |
初始化 libtool 支援,複製 ltmain.sh 等關鍵檔案,修正版本不匹配 |
.tool-versions 或 Dockerfile 固定 autoconf、automake、libtool 版本。git clean -xfd 移除所有構建產物後重新 autoreconf -fiv。--host= 參數時,確保目標平台工具鏈完整。Autotools 鏈條斷裂是開源專案移植常見痛點。標準化「autoreconf -fiv」流程(等同上述四指令),能解決 90% 的 libtoolT、configure.ac 版本衝突問題。