我们有Centos 7。尝试使用“locate”命令不会产生任何结果,即使搜索的文件实际存在。不打印错误。还执行了“sudo updatedb”以更新“locate”索引。有什么想法吗?谢谢你
e5njpo681#
要安装locate软件包,请使用yum:
$ yum install mlocate
要更新其“内部数据库”,请运行以下命令。
$ updatedb
6bc51xsx2#
步骤1:转到/etc/yum.repos.d/目录。
cd /etc/yum.repos.d/
步骤2:运行以下命令
sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-* sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-*
步骤3:现在运行yum更新
yum update -y
2条答案
按热度按时间e5njpo681#
要安装locate软件包,请使用yum:
要更新其“内部数据库”,请运行以下命令。
6bc51xsx2#
步骤1:转到/etc/yum.repos.d/目录。
步骤2:运行以下命令
步骤3:现在运行yum更新