No such directory:
时间: 2023-12-09 16:45:25 浏览: 28
这个错误提示"ldconfig: Warning: ignoring configuration file that cannot be opened: /etc/ld.so.conf: No such file or directory"通常是由于缺少/etc/ld.so.conf文件导致的。\[1\]在Linux中,共享库的搜索路径有多个,其中之一是通过/etc/ld.so.conf文件指定的。如果系统中没有这个文件,ldconfig命令就会报错。\[2\]解决这个问题的方法有几种。一种是在编译目标代码时指定动态库搜索路径,可以使用-Wl,-rpath=路径的方式来指定。另一种是通过设置环境变量LD_LIBRARY_PATH来指定动态库搜索路径。还有一种是创建/etc/ld.so.conf文件,并在其中指定动态库搜索路径。默认的动态库搜索路径是/lib和/usr/lib。\[2\]另外,ld-linux.so*是一个用来装载其他库的虚拟机,通常放在/lib下,也是系统默认的搜索路径之一。\[3\]所以,如果出现"No such directory"的错误提示,可以检查是否缺少/etc/ld.so.conf文件,或者尝试使用其他方法指定动态库搜索路径。
#### 引用[.reference_title]
- *1* *2* *3* [深入理解linux执行文件提示No such file or directory的背后原因](https://blog.csdn.net/u012230668/article/details/89341542)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insertT0,239^v3^insert_chatgpt"}} ] [.reference_item]
[ .reference_list ]