wget command not found on CentOS 8 Server

wget command not found CentOS 8

 

I got the error wget command not found on my CentOS 8 server while trying to download a package. On CentOS 8 servers, wget command is provided by wget package.
 

[root@centos8 /]# wget https://domain.com/file.tgz
bash: wget: command not found

 
Do the below steps to install wget.
 

Step 1 : Log into CentOS 8 server as ‘root’ user

Steps 2 : Run the command ‘dnf install wget’ to install wget package

 

[root@centos8 /]# dnf install wget
Dependencies resolved.
===================================================================================================
Package Architecture Version Repository Size
===================================================================================================
Installing:
wget x86_64 1.19.5-8.el8_1.1 AppStream 735 k
Installing dependencies:
libpsl x86_64 0.20.2-5.el8 BaseOS 61 k
publicsuffix-list-dafsa noarch 20180723-1.el8 BaseOS 56 k

Transaction Summary
===================================================================================================
Install 3 Packages

Total download size: 852 k
Installed size: 3.0 M
Is this ok [y/N]: y
Downloading Packages:
(1/3): publicsuffix-list-dafsa-20180723-1.el8.noarch.rpm 5.1 kB/s | 56 kB 00:11
(2/3): libpsl-0.20.2-5.el8.x86_64.rpm 5.5 kB/s | 61 kB 00:11
(3/3): wget-1.19.5-8.el8_1.1.x86_64.rpm 52 kB/s | 735 kB 00:14
—————————————————————————————————
Total 25 kB/s | 852 kB 00:33
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
Preparing : 1/1
Installing : publicsuffix-list-dafsa-20180723-1.el8.noarch 1/3
Installing : libpsl-0.20.2-5.el8.x86_64 2/3
Installing : wget-1.19.5-8.el8_1.1.x86_64 3/3
Running scriptlet: wget-1.19.5-8.el8_1.1.x86_64 3/3
Verifying : wget-1.19.5-8.el8_1.1.x86_64 1/3
Verifying : libpsl-0.20.2-5.el8.x86_64 2/3
Verifying : publicsuffix-list-dafsa-20180723-1.el8.noarch 3/3

Installed:
wget-1.19.5-8.el8_1.1.x86_64 libpsl-0.20.2-5.el8.x86_64
publicsuffix-list-dafsa-20180723-1.el8.noarch

Complete!

 

Steps 3 : Enter ‘y’ and press enter if dnf ask for confirmation while installing wget

Steps 4 : dnf command will install wget and the dependencies ‘libpsl’ and ‘publicsuffix-list-dafsa’

 
Now wget package is installed on your CentOS 8 Server.
 

Fix wget command not found error

Fix wget command not found error


 
 

How to download and install wget rpm on CentOS server

 

Step 1 : Log into your CentOS 8 server via SSH as ‘root’ user

Step 2 : You can download wget package from the below URL

 

http://mirror.centos.org/centos/8/AppStream/x86_64/os/Packages/wget-1.19.5-8.el8_1.1.x86_64.rpm

 

Step 3 : Install the required dependencies for wget command

Step 4 : Install wget package using rpm command

 

[root@centos8 src]# rpm -Uvh wget-1.19.5-8.el8_1.1.x86_64.rpm
Verifying… ################################# [100%]
Preparing… ################################# [100%]
Updating / installing…
1:wget-1.19.5-8.el8_1.1 ################################# [100%]