当前位置:网站首页>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边栏推荐
猜你喜欢

PTA 天梯赛习题集 L2-001 城市间紧急救援

Leetcode skimming -- incremental ternary subsequence 334 medium

Finally, I understand the event loop, synchronous / asynchronous, micro task / macro task, and operation mechanism in JS (with test questions attached)
![[leetcode] 1254 - count the number of closed Islands](/img/84/f888ae0e164951cd9623fb3bf4a984.png)
[leetcode] 1254 - count the number of closed Islands

Thoroughly understand browser strong cache and negotiation cache

Bing.com網站

Two traversal sequences are known to construct binary trees

Leetcode skimming -- sum of two integers 371 medium

SQL transaction

Download blender on Alibaba cloud image station
随机推荐
Libcurl Lesson 13 static library introduces OpenSSL compilation dependency
Oracle primary key auto increment
02.面向容器化后,必须面对golang
16_ Redis_ Redis persistence
How to find a sense of career direction
[development environment] install the Chinese language pack for the 2013 version of visual studio community (install test agents 2013 | install visual studio 2013 simplified Chinese)
[leetcode] 876 intermediate node of linked list
Finally, I understand the event loop, synchronous / asynchronous, micro task / macro task, and operation mechanism in JS (with test questions attached)
Custom exception
Name of institution approved in advance
SQL stored procedure
[leetcode] 977 square of ordered array
【LeetCode】1020-飞地的数量
03. Preliminary use of golang
. Net again! Happy 20th birthday
. Solution to the problem of Chinese garbled code when net core reads files
LeetCode刷题——奇偶链表#328#Medium
【LeetCode】200-岛屿数量
/bin/ld: 找不到 -lgssapi_krb5
Leetcode skimming -- incremental ternary subsequence 334 medium