当前位置:网站首页>locate: 无法执行 stat () `/var/lib/mlocate/mlocate.db‘: 没有那个文件或目录
locate: 无法执行 stat () `/var/lib/mlocate/mlocate.db‘: 没有那个文件或目录
2022-07-02 12:13:00 【六位元素】
目录
场景
当我们执行编译时需要使用操作系统的 locate 命令加载库文件时,报错如下:
[[email protected] ~]# locate lselinux
locate: 无法执行 stat () `/var/lib/mlocate/mlocate.db': 没有那个文件或目录
出现问题
locate: 无法执行 stat () `/var/lib/mlocate/mlocate.db': 没有那个文件或目录
问题分析
使用 locate 加载库文件时,由于没有文件索引关系,导致搜索不到库文件,从而报错。
解决方法
更新库文件索引关系
[[email protected] ~]# updatedb
再次执行 locate 成功
其他
通常情况下如果你的操作系统中没有 locate 命令,在你按如下方法安装该工具后,立马执行也会报场景描述中的错误
yum install -y mlocate
边栏推荐
- Bing. Com website
- [leetcode] 19 delete the penultimate node of the linked list
- 夏季高考文化成绩一分一段表
- 2022 college students in Liaoning Province mathematical modeling a, B, C questions (related papers and model program code online disk download)
- 自定义异常
- /bin/ld: 找不到 -lpam
- 【LeetCode】1140-石子游戏II
- Beijing rental data analysis
- 动态规划入门二(5.647.62)
- 15_ Redis_ Redis. Conf detailed explanation
猜你喜欢
Storage read-write speed and network measurement based on rz/g2l | ok-g2ld-c development board
微信支付宝账户体系和支付接口业务流程
[leetcode] 1254 - count the number of closed Islands
Leetcode skimming -- sum of two integers 371 medium
PostgresSQL 流复制 主备切换 主库无读写宕机场景
How to find a sense of career direction
Finally, I understand the event loop, synchronous / asynchronous, micro task / macro task, and operation mechanism in JS (with test questions attached)
How to avoid 7 common problems in mobile and network availability testing
03. Preliminary use of golang
已知兩種遍曆序列構造二叉樹
随机推荐
YOLOV5 代码复现以及搭载服务器运行
终于搞懂了JS中的事件循环,同步/异步,微任务/宏任务,运行机制(附笔试题)
【LeetCode】200-岛屿数量
Cultural scores of summer college entrance examination
How to choose a third-party software testing organization for automated acceptance testing of mobile applications
高考录取分数线爬虫
【LeetCode】877-石子游戏
【Experience Cloud】如何在VsCode中取得Experience Cloud的MetaData
. Net again! Happy 20th birthday
Bing.com网站
损失函数与正负样本分配:YOLO系列
LeetCode刷题——验证二叉树的前序序列化#331#Medium
【LeetCode】1254-统计封闭岛屿的数量
[leetcode] 283 move zero
【LeetCode】1140-石子游戏II
4. Jctree related knowledge learning
How to avoid 7 common problems in mobile and network availability testing
Beijing rental data analysis
6095. 强密码检验器 II
04.进入云原生后的企业级应用构建的一些思考