非root安装autoconf和automake

依赖perl,如果没有安装perl,需要先安装perl. 1.安装m4

wget http://mirrors.kernel.org/gnu/m4/m4-1.4.18.tar.gz
tar -xzvf m4-1.4.18.tar.gz
cd m4-1.4.18
./configure --prefix=${PWD}
make -j8 && make install
echo "export PTAH=${PWD}/bin:\$PATH" >>~/.bashrc
source ~/.bashrc
m4 --version

2.安装autoconf 注意一定要安装在不是解压后的目录(即configure后的路径,一定要是其他文件夹),否则编译会失败。因为解压后的文件和编译生成的文件有重名的,会冲突。

wget http://mirrors.kernel.org/gnu/autoconf/autoconf-2.69.tar.gz
tar -xzvf autoconf-2.69.tar.gz
mkdir autoconf
cd autoconf-2.69
./configure --prefix=${PWD}/../autoconf
make -j8 && make install
echo "export PTAH=${PWD}/../autoconf/bin:\$PATH" >>~/.bashrc
source ~/.bashrc
autoconf --version

3.安装automake

wget -c https://ftp.gnu.org/gnu/automake/automake-1.16.1.tar.gz
tar -zxvf automake-1.16.1.tar.gz
mkdir automake
cd automake-1.16.1
./configure --prefix=${PWD}/../automake
make -j8 && make install
echo "export PTAH=${PWD}/../automake/bin:\$PATH" >>~/.bashrc
source ~/.bashrc
automake --version

转载自https://www.codenong.com/cs106479200/,增删了部分内容。

回到页面顶部