wget command not found – Install Wget CentOS 7

wget command not found – How to install Wget command on CentOS 7 / RHEL server

Follow the below steps to install wget command on CentOS 7 / RHEL 7 server

 

[root@server ~]# wget http://prdownloads.sourceforge.net/webadmin/webmin-1.820-1.noarch.rpm
-bash: wget: command not found

bash: /usr/bin/wget: No such file or directory

 
Wget command is used on linux servers to download files from the internet. On CentOS and Redhat servers, wget command is provided by wget package.

1. First you must log into your CentOS 7 / RHEL7 server as ‘root’ user to download the package.

2. Run rpm query all command to check whether wget package is installed on your linux server.

[root@server ~]# rpm -qa | grep wget
[root@server ~]#

wget package is not installed on the above server.

3. You can install wget package using yum command

Command: #yum install wget
 

root@server ~]# yum install wget

—> Package wget.x86_64 0:1.14-13.el7 will be installed

Total download size: 546 k
Installed size: 2.0 M
Is this ok [y/d/N]: y (Enter y and hit enter)

Installed:
wget.x86_64 0:1.14-13.el7

Complete

 
Wget is now installed on the above linux server. Type the below command to make sure it is installed correctly.

wget –version – This command will display the version of wget installed on your server.
 

 

How to Download and install wget rpm on CentOS7 / RHEL 7 server

 
1. Log into your Linux server as ‘root’ user

2. You can download wget package from CentOS website.

wget package can be downloaded from the below link:

http://mirror.centos.org/centos/7/os/x86_64/Packages/wget-1.14-18.el7_6.1.x86_64.rpm

3. Use yum or rpm command to install wget package

# yum install wget-1.14-18.el7_6.1.x86_64.rpm

yum command will install wget package and download the dependencies needed by the package.

# rpm -ivh wget-1.14-18.el7_6.1.x86_64.rpm

You must install the dependencies manually if you are installing using yum command.

The below dependencies are required (only install the dependencies that are not installed) :

zlib
libuuid
openssl-libs
glibc
libidn
pcre

Do not install all the dependencies, only install the ones that are not installed on your CentOS 7 server.