Wget 升级 1.9 修复安全漏洞


  • 今天集团运维检测到有台服务器上存在 wget 安全漏洞:

  • wget 安全漏洞:https://www.linuxprobe.com/linux-wget-bug.html

  • 查阅后发现 1.18 以下版本的会存在此问题,而服务器上正好是 1.17 版本,所以参考下网上的资料并分享下这次升级修复的过程
sudo mkdir /install
cd /install
sudo wget ftp://ftp.gnu.org/gnu/wget/wget-1.19.tar.gz
sudo tar -zxvf wget-1.19.tar.gz
cd wget-1.19
sudo ./configure --prefix=/usr --sysconfdir=/etc --with-ssl=openssl
sudo make
sudo make install
wget -V
  • 报错:
configure: error: in `/install/wget-1.19':
configure: error: The pkg-config script could not be found or is too old. Make sure it
is in your PATH or set the PKG_CONFIG environment variable to the full
path to pkg-config.
  • 解决:
cd /install
sudo wget http://pkgconfig.freedesktop.org/releases/pkg-config-0.29.2.tar.gz
sudo tar -zxvf pkg-config-0.29.2.tar.gz
cd pkg-config-0.29.2
sudo ./configure --with-internal-glib
sudo make
sudo make install
  • 报错:
configure: error: Package requirements (openssl) were not met:
No package 'openssl' found
Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.
Alternatively, you may set the environment variables OPENSSL_CFLAGS
and OPENSSL_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
  • 解决:
# 查找目录位置
sudo find / -name pkgconfig -d
# 编译检查时添加位置
sudo ./configure PKG_CONFIG_PATH="/usr/lib/i386-linux-gnu/pkgconfig/" --prefix=/usr --sysconfdir=/etc --with-ssl=openssl
评论

您还未登录,请先登录

Github