{"id":3261,"date":"2024-04-29T19:40:28","date_gmt":"2024-04-29T14:10:28","guid":{"rendered":"https:\/\/www.veeble.org\/kb\/?p=3261"},"modified":"2025-03-13T11:10:04","modified_gmt":"2025-03-13T05:40:04","slug":"nginx-installation-repo","status":"publish","type":"post","link":"https:\/\/www.veeble.com\/kb\/nginx-installation-repo\/","title":{"rendered":"&#8220;Unable to find a match&#8221; Nginx Error &amp; Fix"},"content":{"rendered":"\n<figure class=\"wp-block-gallery has-nested-images columns-default is-cropped wp-block-gallery-1 is-layout-flex wp-block-gallery-is-layout-flex\">\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/www.veeble.org\/kb\/wp-content\/uploads\/2024\/04\/Screenshot-2024-04-27-114750.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" width=\"728\" height=\"103\" data-id=\"3262\" src=\"https:\/\/www.veeble.org\/kb\/wp-content\/uploads\/2024\/04\/Screenshot-2024-04-27-114750.png\" alt=\"No match for argument: nginx Error: Unable to find a match: nginx\" class=\"wp-image-3262\" srcset=\"https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/04\/Screenshot-2024-04-27-114750.png 728w, https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/04\/Screenshot-2024-04-27-114750-300x42.png 300w\" sizes=\"auto, (max-width: 728px) 100vw, 728px\" \/><\/a><\/figure>\n<\/figure>\n\n\n\n<p>The error message indicating that there is &#8220;No match for argument: nginx Error Unable to find a match: nginx&#8221; suggests that the repository containing the <a href=\"https:\/\/nginx.org\/en\/linux_packages.html\" target=\"_blank\" rel=\"noopener\">Nginx package<\/a> isn&#8217;t properly configured or enabled.<\/p>\n\n\n\n<p>This tutorial will help you fix this issue and will allow you to install Nginx on your system.<\/p>\n\n\n<h4 class=\"wp-block-heading\" id=\"verify-and-fix-the-nginx-repository\">Verify and Fix the Nginx Repository<\/h4>\n\n\n<p>Given the problem with loading the <code>nginx.repo<\/code> file, let&#8217;s ensure it&#8217;s properly configured and enabled. Open or edit nginx.repo file by executing the below command:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo vi \/etc\/yum.repos.d\/nginx.repo<\/code><\/pre>\n\n\n\n<p>Ensure it contains the correct information for your Operating System version. Here\u2019s an example configuration:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;nginx-stable]\nname=nginx stable repo\nbaseurl=http:\/\/nginx.org\/packages\/<em>$os<\/em>\/<em>$releasever<\/em>\/<em>$basearch<\/em>\/\ngpgcheck=1\nenabled=1\ngpgkey=https:\/\/nginx.org\/keys\/nginx_signing.key\nmodule_hotfixes=true<\/code><\/pre>\n\n\n\n<p>Make sure <code>$os<\/code>, <code>$releasever<\/code> and <code>$basearch<\/code> are correctly replaced with your OS name, OS version and architecture. If not, replace them manually with the correct values.<\/p>\n\n\n\n<figure class=\"wp-block-gallery has-nested-images columns-default is-cropped wp-block-gallery-2 is-layout-flex wp-block-gallery-is-layout-flex\">\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/www.veeble.org\/kb\/wp-content\/uploads\/2024\/04\/Screenshot-2024-04-29-185227.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" width=\"793\" height=\"165\" data-id=\"3264\" src=\"https:\/\/www.veeble.org\/kb\/wp-content\/uploads\/2024\/04\/Screenshot-2024-04-29-185227.png\" alt=\"NGINX repo for centos 7\" class=\"wp-image-3264\" srcset=\"https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/04\/Screenshot-2024-04-29-185227.png 793w, https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/04\/Screenshot-2024-04-29-185227-300x62.png 300w, https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/04\/Screenshot-2024-04-29-185227-768x160.png 768w\" sizes=\"auto, (max-width: 793px) 100vw, 793px\" \/><\/a><\/figure>\n<\/figure>\n\n\n\n<p>The <code>$releasever<\/code> and <code>$basearch<\/code> variables in repository configuration files are placeholders that <code>dnf<\/code> or <code>yum<\/code> replaces based on the running version of the operating system and the architecture of the hardware, respectively.<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>$releasever<\/strong>: This represents the release version of the distribution. For example, in CentOS 8, <code>$releasever<\/code> would be replaced by <code>8<\/code>.<\/li>\n\n\n\n<li><strong>$basearch<\/strong>: This represents the architecture of your processor, such as <code>x86_64<\/code> for 64-bit systems commonly used in desktops and servers, <code>i386<\/code> for 32-bit systems, <code>armhfp<\/code> for ARM hard float, and others depending on the hardware.<\/li>\n<\/ol>\n\n\n\n<p>If you want to determine what these values are set to on your system, you can manually check them using the <code>dnf<\/code> command:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>echo \"Release version: $(rpm -E %rhel)\"<br>echo \"Base architecture: $(uname -m)\"<\/code><\/pre>\n\n\n\n<p>Example Output:<\/p>\n\n\n\n<figure class=\"wp-block-gallery has-nested-images columns-default is-cropped wp-block-gallery-3 is-layout-flex wp-block-gallery-is-layout-flex\">\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/www.veeble.org\/kb\/wp-content\/uploads\/2024\/04\/Screenshot-2024-04-29-184841.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" width=\"727\" height=\"108\" data-id=\"3263\" src=\"https:\/\/www.veeble.org\/kb\/wp-content\/uploads\/2024\/04\/Screenshot-2024-04-29-184841.png\" alt=\"How to check Linux Release version and Architecture\" class=\"wp-image-3263\" srcset=\"https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/04\/Screenshot-2024-04-29-184841.png 727w, https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/04\/Screenshot-2024-04-29-184841-300x45.png 300w\" sizes=\"auto, (max-width: 727px) 100vw, 727px\" \/><\/a><\/figure>\n<\/figure>\n\n\n\n<p>From the above example output, your OS release version is 7 and the architecture is x86_64. You can configure the <code>nginx.repo<\/code> file to use these values directly or allow the system to dynamically replace the <code>$releasever<\/code> and <code>$basearch<\/code> placeholders as usual.<\/p>\n\n\n<h4 class=\"wp-block-heading\" id=\"correct-permissions-for-repo-file\"><strong>Correct Permissions<\/strong> for Repo File<\/h4>\n\n\n<p>Make sure that the file has the appropriate permissions. You can set read permissions for the root user (which should be sufficient) with:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo chmod 644 \/etc\/yum.repos.d\/nginx.repo<\/code><\/pre>\n\n\n<h4 class=\"wp-block-heading\" id=\"import-the-gpg-key-for-repo\">Import the GPG key for Repo<\/h4>\n\n\n<p>If GPG key is not present for the nginx repo, there will be still some errors when installing nginx. To avoid it, execute the following command to add the key:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo rpm --import https:\/\/nginx.org\/keys\/nginx_signing.key<\/code><\/pre>\n\n\n<h4 class=\"wp-block-heading\" id=\"clean-and-rebuild-the-dnf-cache\">Clean and rebuild the DNF cache<\/h4>\n\n\n<p>Cleaning and rebuilding the DNF cache can be an essential step in ensuring your package manager is working with the most current and consistent data. To do it before installing NGINX, execute:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo dnf clean all<br>sudo dnf makecache<\/code><\/pre>\n\n\n<h4 class=\"wp-block-heading\" id=\"install-nginx\">Install NGINX<\/h4>\n\n\n<p>If the repo file is correctly configured as mentioned in this tutorial, you will be able to install nginx finally with the below command without any errors: <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo dnf install nginx<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-gallery has-nested-images columns-default is-cropped wp-block-gallery-4 is-layout-flex wp-block-gallery-is-layout-flex\">\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/www.veeble.org\/kb\/wp-content\/uploads\/2024\/04\/Screenshot-2024-04-27-115230.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" width=\"795\" height=\"320\" data-id=\"3265\" src=\"https:\/\/www.veeble.org\/kb\/wp-content\/uploads\/2024\/04\/Screenshot-2024-04-27-115230.png\" alt=\"sudo dnf install nginx\" class=\"wp-image-3265\" srcset=\"https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/04\/Screenshot-2024-04-27-115230.png 795w, https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/04\/Screenshot-2024-04-27-115230-300x121.png 300w, https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/04\/Screenshot-2024-04-27-115230-768x309.png 768w\" sizes=\"auto, (max-width: 795px) 100vw, 795px\" \/><\/a><\/figure>\n<\/figure>\n\n\n<h4 class=\"wp-block-heading\" id=\"alternate-method\">Alternate Method<\/h4>\n\n\n<p>If setting up the Nginx repository directly continues to pose challenges, consider using the <a href=\"https:\/\/www.redhat.com\/en\/blog\/whats-epel-and-how-do-i-use-it\" target=\"_blank\" rel=\"noopener\">EPEL repository<\/a>, which also contains the Nginx package, and then execute the Nginx install command:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo dnf install epel-release<br>sudo dnf install nginx<\/code><\/pre>\n\n\n\n<p><\/p>\n\n\n\n<p>In this guide, we&#8217;ve successfully resolved the &#8220;No match for argument: nginx Error: Unable to find a match: nginx&#8221; error, which was preventing the installation of NGINX. Additionally, we&#8217;ve ensured that NGINX was installed correctly on the system. \ud83c\udf89<\/p>\n\n\n\n<div style=\"height:35px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<div class=\"wp-block-uagb-call-to-action uagb-block-8b751c98 wp-block-button\"><div class=\"uagb-cta__wrap\"><h3 class=\"uagb-cta__title\">Unleash Your Website&#8217;s Potential<\/h3><p class=\"uagb-cta__desc\">Experience lightning-fast speeds and unparalleled performance with our powerful VPS hosting solutions.<\/p><\/div><div class=\"uagb-cta__buttons\"><a href=\"https:\/\/www.veeble.com\/in\/vps-hosting\/\" class=\"uagb-cta__button-link-wrapper wp-block-button__link\" target=\"_blank\" rel=\"noopener noreferrer\">Choose Your Plan<svg xmlns=\"https:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 512 512\"><path d=\"M504.3 273.6l-112.1 104c-6.992 6.484-17.18 8.218-25.94 4.406c-8.758-3.812-14.42-12.45-14.42-21.1L351.9 288H32C14.33 288 .0002 273.7 .0002 255.1S14.33 224 32 224h319.9l0-72c0-9.547 5.66-18.19 14.42-22c8.754-3.809 18.95-2.075 25.94 4.41l112.1 104C514.6 247.9 514.6 264.1 504.3 273.6z\"><\/path><\/svg><\/a><\/div><\/div>\n","protected":false},"excerpt":{"rendered":"<p>The error message indicating that there is &#8220;No match for argument: nginx Error Unable to find a match: nginx&#8221; suggests that the repository containing [&hellip;]<\/p>\n","protected":false},"author":7,"featured_media":8032,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_uag_custom_page_level_css":"","site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"set","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[5,3],"tags":[],"class_list":["post-3261","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-linux","category-installation"],"uagb_featured_image_src":{"full":["https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/04\/Unable-to-find-a-match-Nginx-Error-Fix.jpg",1366,768,false],"thumbnail":["https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/04\/Unable-to-find-a-match-Nginx-Error-Fix-150x150.jpg",150,150,true],"medium":["https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/04\/Unable-to-find-a-match-Nginx-Error-Fix-300x169.jpg",300,169,true],"medium_large":["https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/04\/Unable-to-find-a-match-Nginx-Error-Fix-768x432.jpg",768,432,true],"large":["https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/04\/Unable-to-find-a-match-Nginx-Error-Fix-1024x576.jpg",1024,576,true],"1536x1536":["https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/04\/Unable-to-find-a-match-Nginx-Error-Fix.jpg",1366,768,false],"2048x2048":["https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/04\/Unable-to-find-a-match-Nginx-Error-Fix.jpg",1366,768,false]},"uagb_author_info":{"display_name":"Adrian Antony","author_link":"https:\/\/www.veeble.com\/kb\/author\/adrian\/"},"uagb_comment_info":0,"uagb_excerpt":"The error message indicating that there is &#8220;No match for argument: nginx Error Unable to find a match: nginx&#8221; suggests that the repository containing [&hellip;]","_links":{"self":[{"href":"https:\/\/www.veeble.com\/kb\/wp-json\/wp\/v2\/posts\/3261","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.veeble.com\/kb\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.veeble.com\/kb\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.veeble.com\/kb\/wp-json\/wp\/v2\/users\/7"}],"replies":[{"embeddable":true,"href":"https:\/\/www.veeble.com\/kb\/wp-json\/wp\/v2\/comments?post=3261"}],"version-history":[{"count":8,"href":"https:\/\/www.veeble.com\/kb\/wp-json\/wp\/v2\/posts\/3261\/revisions"}],"predecessor-version":[{"id":7736,"href":"https:\/\/www.veeble.com\/kb\/wp-json\/wp\/v2\/posts\/3261\/revisions\/7736"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.veeble.com\/kb\/wp-json\/wp\/v2\/media\/8032"}],"wp:attachment":[{"href":"https:\/\/www.veeble.com\/kb\/wp-json\/wp\/v2\/media?parent=3261"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.veeble.com\/kb\/wp-json\/wp\/v2\/categories?post=3261"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.veeble.com\/kb\/wp-json\/wp\/v2\/tags?post=3261"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}