{"id":4409,"date":"2013-03-06T00:06:39","date_gmt":"2013-03-05T16:06:39","guid":{"rendered":"https:\/\/webhostinggeeks.com\/howto\/?p=4409"},"modified":"2023-05-11T06:48:24","modified_gmt":"2023-05-11T06:48:24","slug":"how-to-fix-install-sh-line-107-rpmbuild-command-not-found-error-when-install-mailscanner","status":"publish","type":"post","link":"https:\/\/webhostinggeeks.com\/howto\/how-to-fix-install-sh-line-107-rpmbuild-command-not-found-error-when-install-mailscanner\/","title":{"rendered":"How to Fix &#8220;.\/install.sh: line 107: rpmbuild: command not found&#8221; Error When Installing MailScanner"},"content":{"rendered":"<p>MailScanner is an open-source email security and anti-spam package that is widely used to protect email servers. When installing MailScanner on a Linux server, you may encounter an error message that says &#8221; .\/install.sh: line 107: rpmbuild: command not found&#8221;.<\/p>\n<pre>\r\n[root@mx1 MailScanner-4.84.5-3]# .\/install.sh\r\n\r\nI am logging everything into \"install.log\".\r\n\r\nGood. You have the patch command.\r\n\r\n.\/install.sh: line 107: rpmbuild: command not found\r\nYour \/usr\/src\/redhat, \/usr\/src\/RPM or \/usr\/src\/packages\r\ntree is missing.\r\nIf you have access to an RPM called rpm-build or rpmbuild\r\nthen install it first and come back and try again.\r\n<\/pre>\n<p>This error message indicates that the rpmbuild command is not installed on your system, which is required to install MailScanner.<\/p>\n<p>In this guide, we will walk you through the steps to resolve this error and successfully install MailScanner on your Linux server. We will assume that you have root or sudo access to the server and that you are familiar with basic command-line usage.<\/p>\n<h2>Step 1: Install the Required Dependencies<\/h2>\n<p>Before installing MailScanner, you need to ensure that all required dependencies are installed on your system. To do this, run the following command:<\/p>\n<pre>sudo yum install perl-Net-SSLeay perl-IO-Socket-SSL perl-Time-HiRes perl-Net-DNS perl-IO-Socket-INET6<\/pre>\n<p>This command will install the necessary Perl modules that are required to run MailScanner.<\/p>\n<h2>Step 2: Install rpmbuild Command<\/h2>\n<p>To resolve the &#8220;rpmbuild: command not found&#8221; error, you need to install the rpmbuild command. To do this, run the following command:<\/p>\n<pre>sudo yum install rpm-build<\/pre>\n<p>This command will install the rpmbuild command on your system, which is required to build RPM packages.<\/p>\n<pre>\r\n[root@mx1 MailScanner-4.84.5-3]# yum install rpm-build -y\r\nLoaded plugins: fastestmirror\r\nLoading mirror speeds from cached hostfile\r\n * base: mirrors.sin3.sg.voxel.net\r\n * epel: ftp.cuhk.edu.hk\r\n * extras: mirrors.sin3.sg.voxel.net\r\n * updates: ossm.utm.my\r\nSetting up Install Process\r\nResolving Dependencies\r\n--> Running transaction check\r\n---> Package rpm-build.x86_64 0:4.8.0-27.el6 will be installed\r\n--> Processing Dependency: elfutils >= 0.128 for package: rpm-build-4.8.0-27.el6.x86_64\r\n--> Processing Dependency: xz for package: rpm-build-4.8.0-27.el6.x86_64\r\n--> Processing Dependency: unzip for package: rpm-build-4.8.0-27.el6.x86_64\r\n--> Processing Dependency: pkgconfig for package: rpm-build-4.8.0-27.el6.x86_64\r\n--> Processing Dependency: lzma for package: rpm-build-4.8.0-27.el6.x86_64\r\n--> Processing Dependency: \/usr\/bin\/gdb-add-index for package: rpm-build-4.8.0-27.el6.x86_64\r\n--> Running transaction check\r\n---> Package elfutils.x86_64 0:0.152-1.el6 will be installed\r\n--> Processing Dependency: elfutils-libs(x86-64) = 0.152-1.el6 for package: elfutils-0.152-1.el6.x86_64\r\n--> Processing Dependency: libdw.so.1(ELFUTILS_0.149)(64bit) for package: elfutils-0.152-1.el6.x86_64\r\n--> Processing Dependency: libdw.so.1(ELFUTILS_0.148)(64bit) for package: elfutils-0.152-1.el6.x86_64\r\n--> Processing Dependency: libdw.so.1(ELFUTILS_0.138)(64bit) for package: elfutils-0.152-1.el6.x86_64\r\n--> Processing Dependency: libdw.so.1(ELFUTILS_0.127)(64bit) for package: elfutils-0.152-1.el6.x86_64\r\n--> Processing Dependency: libdw.so.1(ELFUTILS_0.126)(64bit) for package: elfutils-0.152-1.el6.x86_64\r\n--> Processing Dependency: libdw.so.1(ELFUTILS_0.122)(64bit) for package: elfutils-0.152-1.el6.x86_64\r\n--> Processing Dependency: libasm.so.1(ELFUTILS_1.0)(64bit) for package: elfutils-0.152-1.el6.x86_64\r\n--> Processing Dependency: libdw.so.1()(64bit) for package: elfutils-0.152-1.el6.x86_64\r\n--> Processing Dependency: libasm.so.1()(64bit) for package: elfutils-0.152-1.el6.x86_64\r\n---> Package gdb.x86_64 0:7.2-56.el6 will be installed\r\n---> Package pkgconfig.x86_64 1:0.23-9.1.el6 will be installed\r\n---> Package unzip.x86_64 0:6.0-1.el6 will be installed\r\n---> Package xz.x86_64 0:4.999.9-0.3.beta.20091007git.el6 will be installed\r\n---> Package xz-lzma-compat.x86_64 0:4.999.9-0.3.beta.20091007git.el6 will be installed\r\n--> Running transaction check\r\n---> Package elfutils-libs.x86_64 0:0.152-1.el6 will be installed\r\n--> Finished Dependency Resolution\r\n\r\nDependencies Resolved\r\n\r\n========================================================================================================================\r\n Package                     Arch                Version                                        Repository         Size\r\n========================================================================================================================\r\nInstalling:\r\n rpm-build                   x86_64              4.8.0-27.el6                                   base              125 k\r\nInstalling for dependencies:\r\n elfutils                    x86_64              0.152-1.el6                                    base              201 k\r\n elfutils-libs               x86_64              0.152-1.el6                                    base              181 k\r\n gdb                         x86_64              7.2-56.el6                                     base              2.3 M\r\n pkgconfig                   x86_64              1:0.23-9.1.el6                                 base               70 k\r\n unzip                       x86_64              6.0-1.el6                                      base              149 k\r\n xz                          x86_64              4.999.9-0.3.beta.20091007git.el6               base              137 k\r\n xz-lzma-compat              x86_64              4.999.9-0.3.beta.20091007git.el6               base               16 k\r\n\r\nTransaction Summary\r\n========================================================================================================================\r\nInstall       8 Package(s)\r\n\r\nTotal download size: 3.1 M\r\nInstalled size: 7.5 M\r\nDownloading Packages:\r\n(1\/8): elfutils-0.152-1.el6.x86_64.rpm                                                           | 201 kB     00:02\r\n(2\/8): elfutils-libs-0.152-1.el6.x86_64.rpm                                                      | 181 kB     00:03\r\n(3\/8): gdb-7.2-56.el6.x86_64.rpm                                                                 | 2.3 MB     00:40\r\n(4\/8): pkgconfig-0.23-9.1.el6.x86_64.rpm                                                         |  70 kB     00:01\r\n(5\/8): rpm-build-4.8.0-27.el6.x86_64.rpm                                                         | 125 kB     00:01\r\n(6\/8): unzip-6.0-1.el6.x86_64.rpm                                                                | 149 kB     00:02\r\n(7\/8): xz-4.999.9-0.3.beta.20091007git.el6.x86_64.rpm                                            | 137 kB     00:02\r\n(8\/8): xz-lzma-compat-4.999.9-0.3.beta.20091007git.el6.x86_64.rpm                                |  16 kB     00:00\r\n------------------------------------------------------------------------------------------------------------------------\r\nTotal                                                                                    58 kB\/s | 3.1 MB     00:55\r\nRunning rpm_check_debug\r\nRunning Transaction Test\r\nTransaction Test Succeeded\r\nRunning Transaction\r\n  Installing : xz-4.999.9-0.3.beta.20091007git.el6.x86_64                                                           1\/8\r\n  Installing : xz-lzma-compat-4.999.9-0.3.beta.20091007git.el6.x86_64                                               2\/8\r\n  Installing : 1:pkgconfig-0.23-9.1.el6.x86_64                                                                      3\/8\r\n  Installing : gdb-7.2-56.el6.x86_64                                                                                4\/8\r\n  Installing : elfutils-libs-0.152-1.el6.x86_64                                                                     5\/8\r\n  Installing : elfutils-0.152-1.el6.x86_64                                                                          6\/8\r\n  Installing : unzip-6.0-1.el6.x86_64                                                                               7\/8\r\n  Installing : rpm-build-4.8.0-27.el6.x86_64                                                                        8\/8\r\n  Verifying  : unzip-6.0-1.el6.x86_64                                                                               1\/8\r\n  Verifying  : xz-lzma-compat-4.999.9-0.3.beta.20091007git.el6.x86_64                                               2\/8\r\n  Verifying  : elfutils-libs-0.152-1.el6.x86_64                                                                     3\/8\r\n  Verifying  : elfutils-0.152-1.el6.x86_64                                                                          4\/8\r\n  Verifying  : gdb-7.2-56.el6.x86_64                                                                                5\/8\r\n  Verifying  : rpm-build-4.8.0-27.el6.x86_64                                                                        6\/8\r\n  Verifying  : xz-4.999.9-0.3.beta.20091007git.el6.x86_64                                                           7\/8\r\n  Verifying  : 1:pkgconfig-0.23-9.1.el6.x86_64                                                                      8\/8\r\n\r\nInstalled:\r\n  rpm-build.x86_64 0:4.8.0-27.el6\r\n\r\nDependency Installed:\r\n  elfutils.x86_64 0:0.152-1.el6                                    elfutils-libs.x86_64 0:0.152-1.el6\r\n  gdb.x86_64 0:7.2-56.el6                                          pkgconfig.x86_64 1:0.23-9.1.el6\r\n  unzip.x86_64 0:6.0-1.el6                                         xz.x86_64 0:4.999.9-0.3.beta.20091007git.el6\r\n  xz-lzma-compat.x86_64 0:4.999.9-0.3.beta.20091007git.el6\r\n\r\nComplete!\r\n<\/pre>\n<h2>Step 3: Re-run MailScanner Installation Script<\/h2>\n<p>Once you have installed the required dependencies and the rpmbuild command, you can re-run the MailScanner installation script. To do this, navigate to the directory where the script is located and run the following command:<\/p>\n<pre>sudo .\/install.sh<\/pre>\n<p>The installation process will begin, and you will be prompted to provide the necessary information such as the path to the MailScanner configuration file and the antivirus scanner to use. Follow the prompts to complete the installation process.<\/p>\n<h2>Conclusion:<\/h2>\n<p>In this guide, we have shown you how to resolve the &#8220;rpmbuild: command not found&#8221; error when installing MailScanner on a Linux server. By installing the required dependencies and the rpmbuild command, you can successfully install MailScanner and protect your email server from spam and malware.<\/p>\n<p>If you have any questions or suggestions for improvements, please feel free to leave a comment below.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>MailScanner is an open-source email security and anti-spam package that is widely used to protect email servers. When installing MailScanner on a Linux server, you may encounter an error message&#8230;<\/p>\n","protected":false},"author":6,"featured_media":4423,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"wds_primary_category":0,"footnotes":""},"categories":[2065],"tags":[1254,1536,1559],"class_list":["post-4409","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-mail","tag-centos-6-3","tag-linux","tag-mailscanner"],"_links":{"self":[{"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/posts\/4409","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/comments?post=4409"}],"version-history":[{"count":0,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/posts\/4409\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/media\/4423"}],"wp:attachment":[{"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/media?parent=4409"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/categories?post=4409"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/tags?post=4409"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}