How to Fix “./install.sh: line 107: rpmbuild: command not found” Error When Install MailScanner

mailscannerThis guide shows the common error when linux administrator trying to install the mailscanner using ./install.sh script. But you can easily address the problem by reading the error log given and everything is logging into “install.log”. This guide may speed up the troubleshooting time for newbie who not familiar with linux and Mailscanner package and software.

Question : When i try to install MailScanner on CentOS 6.3, i get the following error :

[root@mx1 MailScanner-4.84.5-3]# ./install.sh

I am logging everything into "install.log".


Good. You have the patch command.

./install.sh: line 107: rpmbuild: command not found
Your /usr/src/redhat, /usr/src/RPM or /usr/src/packages
tree is missing.
If you have access to an RPM called rpm-build or rpmbuild
then install it first and come back and try again.

Solution :

From the error above, rpmbuild command not found in the system caused the error. This software is the prerequisite software and if you want to install using install.sh shell scrip.

./install.sh: line 107: rpmbuild: command not found

Just run the following command to install rpmbuild on linux CentOS 6.3 :

[root@mx1 MailScanner-4.84.5-3]# yum install rpm-build -y
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirrors.sin3.sg.voxel.net
 * epel: ftp.cuhk.edu.hk
 * extras: mirrors.sin3.sg.voxel.net
 * updates: ossm.utm.my
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package rpm-build.x86_64 0:4.8.0-27.el6 will be installed
--> Processing Dependency: elfutils >= 0.128 for package: rpm-build-4.8.0-27.el6.x86_64
--> Processing Dependency: xz for package: rpm-build-4.8.0-27.el6.x86_64
--> Processing Dependency: unzip for package: rpm-build-4.8.0-27.el6.x86_64
--> Processing Dependency: pkgconfig for package: rpm-build-4.8.0-27.el6.x86_64
--> Processing Dependency: lzma for package: rpm-build-4.8.0-27.el6.x86_64
--> Processing Dependency: /usr/bin/gdb-add-index for package: rpm-build-4.8.0-27.el6.x86_64
--> Running transaction check
---> Package elfutils.x86_64 0:0.152-1.el6 will be installed
--> Processing Dependency: elfutils-libs(x86-64) = 0.152-1.el6 for package: elfutils-0.152-1.el6.x86_64
--> Processing Dependency: libdw.so.1(ELFUTILS_0.149)(64bit) for package: elfutils-0.152-1.el6.x86_64
--> Processing Dependency: libdw.so.1(ELFUTILS_0.148)(64bit) for package: elfutils-0.152-1.el6.x86_64
--> Processing Dependency: libdw.so.1(ELFUTILS_0.138)(64bit) for package: elfutils-0.152-1.el6.x86_64
--> Processing Dependency: libdw.so.1(ELFUTILS_0.127)(64bit) for package: elfutils-0.152-1.el6.x86_64
--> Processing Dependency: libdw.so.1(ELFUTILS_0.126)(64bit) for package: elfutils-0.152-1.el6.x86_64
--> Processing Dependency: libdw.so.1(ELFUTILS_0.122)(64bit) for package: elfutils-0.152-1.el6.x86_64
--> Processing Dependency: libasm.so.1(ELFUTILS_1.0)(64bit) for package: elfutils-0.152-1.el6.x86_64
--> Processing Dependency: libdw.so.1()(64bit) for package: elfutils-0.152-1.el6.x86_64
--> Processing Dependency: libasm.so.1()(64bit) for package: elfutils-0.152-1.el6.x86_64
---> Package gdb.x86_64 0:7.2-56.el6 will be installed
---> Package pkgconfig.x86_64 1:0.23-9.1.el6 will be installed
---> Package unzip.x86_64 0:6.0-1.el6 will be installed
---> Package xz.x86_64 0:4.999.9-0.3.beta.20091007git.el6 will be installed
---> Package xz-lzma-compat.x86_64 0:4.999.9-0.3.beta.20091007git.el6 will be installed
--> Running transaction check
---> Package elfutils-libs.x86_64 0:0.152-1.el6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

========================================================================================================================
 Package                     Arch                Version                                        Repository         Size
========================================================================================================================
Installing:
 rpm-build                   x86_64              4.8.0-27.el6                                   base              125 k
Installing for dependencies:
 elfutils                    x86_64              0.152-1.el6                                    base              201 k
 elfutils-libs               x86_64              0.152-1.el6                                    base              181 k
 gdb                         x86_64              7.2-56.el6                                     base              2.3 M
 pkgconfig                   x86_64              1:0.23-9.1.el6                                 base               70 k
 unzip                       x86_64              6.0-1.el6                                      base              149 k
 xz                          x86_64              4.999.9-0.3.beta.20091007git.el6               base              137 k
 xz-lzma-compat              x86_64              4.999.9-0.3.beta.20091007git.el6               base               16 k

Transaction Summary
========================================================================================================================
Install       8 Package(s)

Total download size: 3.1 M
Installed size: 7.5 M
Downloading Packages:
(1/8): elfutils-0.152-1.el6.x86_64.rpm                                                           | 201 kB     00:02
(2/8): elfutils-libs-0.152-1.el6.x86_64.rpm                                                      | 181 kB     00:03
(3/8): gdb-7.2-56.el6.x86_64.rpm                                                                 | 2.3 MB     00:40
(4/8): pkgconfig-0.23-9.1.el6.x86_64.rpm                                                         |  70 kB     00:01
(5/8): rpm-build-4.8.0-27.el6.x86_64.rpm                                                         | 125 kB     00:01
(6/8): unzip-6.0-1.el6.x86_64.rpm                                                                | 149 kB     00:02
(7/8): xz-4.999.9-0.3.beta.20091007git.el6.x86_64.rpm                                            | 137 kB     00:02
(8/8): xz-lzma-compat-4.999.9-0.3.beta.20091007git.el6.x86_64.rpm                                |  16 kB     00:00
------------------------------------------------------------------------------------------------------------------------
Total                                                                                    58 kB/s | 3.1 MB     00:55
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : xz-4.999.9-0.3.beta.20091007git.el6.x86_64                                                           1/8
  Installing : xz-lzma-compat-4.999.9-0.3.beta.20091007git.el6.x86_64                                               2/8
  Installing : 1:pkgconfig-0.23-9.1.el6.x86_64                                                                      3/8
  Installing : gdb-7.2-56.el6.x86_64                                                                                4/8
  Installing : elfutils-libs-0.152-1.el6.x86_64                                                                     5/8
  Installing : elfutils-0.152-1.el6.x86_64                                                                          6/8
  Installing : unzip-6.0-1.el6.x86_64                                                                               7/8
  Installing : rpm-build-4.8.0-27.el6.x86_64                                                                        8/8
  Verifying  : unzip-6.0-1.el6.x86_64                                                                               1/8
  Verifying  : xz-lzma-compat-4.999.9-0.3.beta.20091007git.el6.x86_64                                               2/8
  Verifying  : elfutils-libs-0.152-1.el6.x86_64                                                                     3/8
  Verifying  : elfutils-0.152-1.el6.x86_64                                                                          4/8
  Verifying  : gdb-7.2-56.el6.x86_64                                                                                5/8
  Verifying  : rpm-build-4.8.0-27.el6.x86_64                                                                        6/8
  Verifying  : xz-4.999.9-0.3.beta.20091007git.el6.x86_64                                                           7/8
  Verifying  : 1:pkgconfig-0.23-9.1.el6.x86_64                                                                      8/8

Installed:
  rpm-build.x86_64 0:4.8.0-27.el6

Dependency Installed:
  elfutils.x86_64 0:0.152-1.el6                                    elfutils-libs.x86_64 0:0.152-1.el6
  gdb.x86_64 0:7.2-56.el6                                          pkgconfig.x86_64 1:0.23-9.1.el6
  unzip.x86_64 0:6.0-1.el6                                         xz.x86_64 0:4.999.9-0.3.beta.20091007git.el6
  xz-lzma-compat.x86_64 0:4.999.9-0.3.beta.20091007git.el6

Complete!

You can re-run the ./install.sh command when rpmbuild installation completed as above.

How to Reset the Directory Manager Password on RHEL 7 / CentOS 7
How to Reset the Directory Manager Password on RHEL 7 / CentOS 7

It is best practice to remember passwords, but because too many passwords, sometimes we forget. We are not encouraged to write the password on any paper or share the password...

How to Find Big Files Size on Linux RHEL/CentOS
How to Find Big Files Size on Linux RHEL/CentOS

As the linux administrator, sometimes we have to identify which files are most take much space in the linux server resulting in low free space. Low disk space can also...

Why Linux users should worry about malware and what they can do about it
Why Linux users should worry about malware and what they can do about it

Don’t drop your guard just because you’re running Linux. Preventing the spread of malware and/or dealing with the consequences of infection are a fact of life when using computers. If...

How to Reset Forgotten Root Password on Linux RHEL 7 / CentOS 7
How to Reset Forgotten Root Password on Linux RHEL 7 / CentOS 7

This short howto will explain the steps to reset a lost root password or to reset a forgotten root password on Linux RHEL 7 or CentOS 7. Basically, we will...

How to Update CentOS or Upgrade CentOS to the Latest Version
How to Update CentOS or Upgrade CentOS to the Latest Version

Recently, the latest version of CentOS 7.3 was released. All users of CentOS 7.0, 7.1 and 7.2 can upgrade their system to the most recent. This quick guide will explain...

How to Change your WordPress Username, Nickname and Display Name in MySQL
How to Change your WordPress Username, Nickname and Display Name in MySQL

After you create an account log in WordPress, you may want to change your WordPress username, as appropriate or due to security reason. However, you can not do this from...

How to Enable SSH Root Login on Ubuntu 16.04
How to Enable SSH Root Login on Ubuntu 16.04

As what we wrote in the previous article on how to allow SSH root on Ubuntu 14.04, after installing a fresh new copy of Ubuntu 16.04 LTS, we find that...

How to Change UUID of Linux Partition on CentOS 7
How to Change UUID of Linux Partition on CentOS 7

UUID (Universally Unique IDentifier) should be unique and it is used to identify storage devices on a linux system. If you cloned a virtual machine from vCenter, the metadata containing...

Leave a Reply

Your email address will not be published. Required fields are marked *