【Linux】bash: wget: command not found

问题描述

找不到命令的原因是缺少软件包,可通过查找然后安装对应的软件包即可,适用于所有command not found的情况(前提是软件仓库收录了这个软件包)。

如输入wget提示命令不存在:

【Linux】bash: wget: command not found

解决方法

1. Centos

CentOS可通过yum provides查找对应软件包:

【Linux】bash: wget: command not found

此时再通过yum install安装即可(版本号可省略)。

【Linux】bash: wget: command not found

2. Ubuntu

Ubuntu可根据智能提示安装:

【Linux】bash: wget: command not found

也可以通过apt-cache search查看更详细的介绍:

【Linux】bash: wget: command not found

同理再apt-get install即可。