報錯:command not found


 

 

linux中如果是最小化安裝的系統,執行命令的時候很多會出現沒找到命令

[root@localhost ~]# mtr
-bash: mtr: command not found
[root@localhost ~]# tcping
-bash: tcping: command not found

上述中沒找到mtr和tcping命令。

 

解決方法:

運行search命令查找對應包名下載即可。

 

[root@localhost ~]# yum search tcping
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: centos.01link.hk
 * epel: mirror.pregi.net
 * extras: centos.01link.hk
 * updates: centos.01link.hk
============================================ N/S Matched: tcping ============================================ tcping.x86_64 : Check of TCP connection to a given IP/Port

  Name and summary matches only, use "search all" for everything.
[root@localhost ~]# yum search mtr
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: centos.01link.hk
 * epel: mirror.pregi.net
 * extras: centos.01link.hk
 * updates: centos.01link.hk
============================================= N/S Matched: mtr ==============================================
mtr-gtk.x86_64 : The GTK+ interface for mtr
mtr.x86_64 : A network diagnostic tool
pcp-import-mrtg2pcp.x86_64 : Performance Co-Pilot tools for importing MTRG data into PCP archive logs

  Name and summary matches only, use "search all" for everything.
[root@localhost ~]# 

 

上述就是查找出對應包名了。執行對應命令即可

 

yum install -y mtr
yum install -y tcping

 

嗯,可能有人說這兩個包直接yum安裝就行了根本不用搜。其實這個whois試下,直接yum這個是沒有包的。他的正確包名是jwhois,這就體驗搜索的重要性了。

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM