Now some Linux distributions don't contain the latest version of Wget, you can use -V
(or --version
) option to check your wget version. Some useful options of Wget will not work in the old version. So you can update your Wget manually.
Check your Wget version and decide whether you need to upgrade your Wget.
wget -V
You can download the latest Wget from http://ftp.gnu.org/gnu/wget/
. Also, you can choose an early version. Here I choose wget-1.21.3.tar.gz
.
wget http://ftp.gnu.org/gnu/wget/wget-1.21.3.tar.gz
Before configuring your Wget, you may need to install these dependencies are required, and remove Wget.
CentOS / Fedora
yum install gcc openssl-devel -y
yum remove wget -y
Extract and go to the directory.
tar -zxvf wget-1.21.3.tar.gz
cd wget-1.21.3
Now, you can configure and install wget.
./configure --with-ssl=openssl
make && make install
Finally, re-login your ssh or reboot the server and check your wget version again.
wget -V