This post shows you how to install m4 (macro processor) on CentOS Linux Server.
The easiest way, you can install m4 using the following command:
sudo yum -y install m4
Alternatively, you can download, compile, and install from source as follows:
1. Install requirements packages before you are moving forward.
sudo yum -y install wget gcc perl make
2. Download m4 from the source then extract the downloaded package.
cd /tmp && wget ftp://ftp.gnu.org/gnu/m4/m4-1.4.19.tar.gz
tar -xvzf m4-1.4.19.tar.gz
cd m4-1.4.19
3. Configure, compile then install GNU m4 using the following commands:
Note
Note:Replace above with the directory path where you want to copy the files and folders. Note: check for any error message.
./configure --prefix=/usr/local/m4
sudo make
sudo make install
Note: check for any error messages and that’s it, m4 (general purpose macro processor) has been successfully installed.
All in one bash script:
#/bin/bash
sudo yum -y install wget gcc perl make
cd /tmp && wget ftp://ftp.gnu.org/gnu/m4/m4-1.4.19.tar.gz
tar -xvzf m4-1.4.19.tar.gz
cd m4-1.4.19
./configure --prefix=/usr/local/m4
sudo make
sudo make install
ADVERTISEMENT
5/5 - (1 vote)