搞定这些个command not found

本文详细列举了在Linux环境中遇到的13种常见命令缺失情况及其解决方案,包括使用yum安装所需软件包来修复-bash:commandnotfound错误,如fuser、psmisc、yum-utils等。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

1、-bash: fuser: command not found
yum install psmisc
2、-bash: yum-config-manager: command not found
yum -y install yum-utils
3、-bash: psql: command not found
yum install postgresql 或者 yum install postgresql-server
4、ifconfig: command not found
yum install -y net-tools
5、-bash: netstat: command not found
yum install -y net-tools
6、firewall-cmd: command not found
yum install firewalld -y
7、ntpdate: command not found
yum install -y ntp
8、multipath: command not found
yum install device-mapper-multipath
9、ip: command not found (CentOS Linux release 7.8.2003 (Core) )
yum install initscripts
10、autoreconf: command not found
yum install install autoconf -y
11、autoreconf: failed to run autopoint: No such file or directory
err:

autoreconf: running: autopoint --force
Can't exec "autopoint": No such file or directory at /usr/share/autoconf/Autom4te/FileUtils.pm line 345.
autoreconf: failed to run autopoint: No such file or directory
autoreconf: autopoint is needed because this package uses Gettext

fixed:
yum install -y gettext-devel
12、yum-builddep: command not found
yum install yum-utils -y
13、rpmbuild: command not found
yum install rpm-build -y

### Ubuntu 中 `command not found` 错误解决方案 当遇到命令未找到的情况时,通常是因为环境变量配置不正确或是必要的包尚未安装。 对于特定命令如 `autoreconf` 未能被识别的情形,在Ubuntu环境下可以通过确保已经安装了相应的软件包来解决问题。如果出现了 `autoreconf: command not found` 的情况,则表明可能缺少 automake 工具链的相关组件[^1]。为了修正这个问题,可以尝试执行以下命令: ```bash sudo apt update && sudo apt install -y autoconf automake libtool ``` 上述操作会更新本地的APT仓库索引并安装autoconf、automake以及libtool这三个常用的构建工具,它们包含了 autoreconf 命令所需的资源。 另外一种常见场景是像 `ping` 这样的网络诊断工具无法正常使用。这可能是由于 net-tools 被移除或者是系统的最小化安装版本中并未预装该类实用程序所致[^2]。此时应通过下面的方式获取 ping 功能: ```bash sudo apt-get install inetutils-ping ``` 还有可能出现类似于 `apt: command not found` 或者 `apt-get: command not found` 的状况,尤其是在基于Debian/Ubuntu的新手用户身上更为普遍。然而这种情况较为罕见,因为这些命令属于默认提供的核心管理工具之一。除非进行了特别设置或是在某些精简版发行版里才会碰到这样的问题。一般建议先同步源列表再考虑重新安装APT本身;但在大多数情况下,更有可能的是PATH路径设定有误而非真正丢失了 APT 程序文件[^3]。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值