Hi friends, In this post I am going to explain about how to install or upgrade WGET in ubuntu or centos. Recently new vulnerability in wget (CVE-2014-4877), we can check in http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2014-4877 for complete information about this vulnerability.
Follow the below steps to install wget in your server.
Step 1:
Go to home directory
Step 2:
1 | CD |
Step 3: Get the latest source code of wget from FTP repository
1 | curl -O http://ftp.gnu.org/gnu/wget/wget-1.16.tar.gz |
Step 4: Extract the file and move into it
1 | tar -xzf wget-1.16.tar.gz |
Step 5:
1 | cd wget-1.16 |
Step 6: Configure and install wget
1 | ./configure |
Step 7: You may get the error in ssl in step 6. then use below command
1 | ./configure --with-ssl=openssl |
Step 8: You may get the error in without ssl in step 6. then use below command
1 | ./configure --without-ssl |
Step 9:
1 | make && make install |
wget will be installed in your server
If you already installed wget then follow the below steps to upgrade wget in your server.
Step 1:
Go to home directory
Step 2:
1 | CD |
Step 3: Get the latest source code of wget from FTP repository
1 | wget http://ftp.gnu.org/gnu/wget/wget-1.16.tar.gz |
Step 4: Extract the file and move into it
1 | tar -xzf wget-1.16.tar.gz |
Step 5:
1 | cd wget-1.16 |
Step 6: Configure and install wget
1 | ./configure |
Step 7: You may get the error in ssl in step 6. then use below command
1 | ./configure --with-ssl=openssl |
Step 8: You may get the error in without ssl in step 6. then use below command
1 | ./configure --without-ssl |
Step 9:
1 | make && make install |
wget will be upgraded in your server
Now we need to logout and login to server and check wget version by below command
1 | wget -V |
3 Comments
rodrigo · April 7, 2016 at 8:24 pm
Thanks! please update the post, the newer version of wget is 1.17
I would comment the
./configure –without-ssl
step is not necessary, in fact, in 1.17 version actually there is a bug in master that don’t keep make if you put this line, works in my case with ./configure –with-ssl=openssl
I first copy paste all lines without much seeing 😛 and it doesn’t work, step 7 and 8 are sub-steps in fact of 5, maybe would more clear if you put it as sub-steps or as an clarification.
Thanks a lot for the post!
raj kumar · August 14, 2020 at 6:29 am
bro its giving error
purushotham · September 7, 2021 at 9:37 am
can you please tell me how to remove this from server.
Getting error “wget: Unknown command ‘check-certificate’ in /root/.wgetrc at line 1.” like this.