最近在自动化构建toolchain的时候,在shell脚本中运行 binary 时,提示如下错误:

No such file or directory while executing existing binary

刚开始感觉很奇怪,在目录下能查看到对应的可执行文件,为什么就不能执行呢。而且用ldd $binary 的时候,显示this is not an executing binary 类似的语句,最后在archlinux上看到如下解释:

The file you'retrying to execute (…/lmutil) exists but its “loader” doesn't exist, where

the loader of a nativeexecutable is its dynamic loader, for example /lib/ld-linux.so.2;

the loader of a script is theprogram mentioned on its shebang line, e.g., /bin/sh if the script begins with#!/bin/sh

大概的意思就是,这个excuting binary是存在,但是执行这个binary的解释器没有找到,shell脚本对应的解释器就是/bin/sh, 而binary的话对应的加载器就是/lib64/ld-linux-x86_64.so.2。

最后查找到的原因也是如此,发现我在构建toolchain过程中在/lib64下没有找到加载器,默认的加载器安装在了$prefix/usr/lib64下,然而用readelf $binary | grep interpreter, 发现需要的加载器路径为/lib64/ld-linux-x86_64.so.2。这个问题怎么办呢?

最后的解决办法是在编译glibc过程中指定shared library dir, 采用如下方法可以解决:

echo "slibdri=/lib64" > configparms , 强行指定共享库路径,然后对应的共享库便会安装在slibdir下。

No such file or directory while executing existing binary相关推荐

  1. xend: No such file or directory. Is xend running? 问题

    昨天下午升级 一台 Xen 服务器后发现 xend 服务无法启动,启动系统后运行 xen 工具报错: # xm list Error: Error connecting to xend: No suc ...

  2. python执行脚本失败恢复环境_Textmate 执行python脚本的错误:env: python3: No such file or directory...

    在 macos 中使用 textmate 执行脚本如下: #!/usr/bin/env python3 # -*- coding:utf-8 -*- print("hello, world! ...

  3. libgstreamer-1.0.so.0: cannot open shared object file: No such file or directory

    1. 问题现象 error while loading shared libraries: libgstreamer-1.0.so.0: cannot open shared object file: ...

  4. pip 升级之后提示 bash: /usr/bin/pip3: No such file or directory

    1. 问题现象 pip 升级之后使用时报错: $ pip3 -V bash: /usr/bin/pip3: No such file or directory 通过命令查找 pip 位置 $ whic ...

  5. pip install faiss-gpu失败unable to execute ‘swig‘: No such file or directory

    1. 安装报错 unable to execute 'swig': No such file or directory error: command 'swig' failed with exit s ...

  6. GCC 链接 xxx:No such file or directory 及运行可执行文件 error while loading shared libraries: xxx.so 解决方案

    关于 GCC 提示找不到指定库文件的这个问题,通常出现在以下 2 个场景中: 利用静态库或者动态库文件实现链接操作(生成可执行文件)时,·GCC 可能会提示 xxx:No such file or d ...

  7. npm install遇到ENOENT: no such file or directory, rename错误

    问题描述 npm 安装模块时遇到ENOENT: no such file or directory, rename错误 解决办法 1.删除根目录下package-lock.json文件 2.删除根目录 ...

  8. docker load 出错 open /var/lib/docker/tmp/docker-import-837327978/bin/json: no such file or directory

    1. 问题现象 使用 docker load 加载镜像包的时候出现如下错误: open /var/lib/docker/tmp/docker-import-837327978/bin/json: no ...

  9. 【Qt】错误GL/gl.h: No such file or directory的解决方法(以及cannot find -lGL解决方法)

    1.问题描述 QtCreator第一次编译时,报错GL/gl.h: No such file or directory 错误信息如下: /home/Qt5.6.3/5.6.3/gcc_64/inclu ...

最新文章

  1. pykafka连接重要使用pykafka,kafka-python的api开发kafka生产者和消费者
  2. 服务端异步IO配合协程浅析
  3. 0417 jsBom操作+Dom再次整理
  4. 10个顶级的CSS UI开源框架
  5. python3 字符串 转 ascii码
  6. Android从放弃到精通 第二天 我还好
  7. hibernate jpa_JPA /Hibernate刷新策略初学者指南
  8. Android之创建选项菜单
  9. UVA10696 f91【数学函数+打表】
  10. python中seth是啥意思_python中的seth是什么意思
  11. jmeter 登录用户并发压力测试案例_用jmeter进行多用户并发压力测试 [转]
  12. 2020年Java面试100题
  13. 【Codecs系列】AVS1参考代码RM在Windows下编译以及AVS1编解码器的使用方法
  14. 什么是seo外链工具
  15. python关键字保留字
  16. 【GitHub前端练手项目--50天50个项目---商品加载效果-----day08】
  17. 洞见(1): zig 编程语言
  18. 小米手机开启“启用MIUI优化”,导致Android Studio无法成功直接安装
  19. 最新架构amd服务器cpu,AMD第一款ARM处理器正式发布!
  20. IT学习的网站和工具

热门文章

  1. linux下usb 抓包方法和数据分析
  2. 泰凌微8258入门教程 BLE篇②——BLE Single Connection 蓝牙BLE 软件架构
  3. java和c语言的语法区别_c语言和java的语法区别是什么?
  4. ps转手绘课程基础day01--学习笔记
  5. 微信小程序项目搭建医生挂号健康管理网站+后台管理系统|前后分离VUE.js
  6. 苹果Mac专业级 RAW 编辑工具:RAW Power 照片编辑器
  7. 暴雪曾要求网易支付 5 亿美元才能续约;暂停 GPT-5 研发呼吁引激战;Midjourney 停止免费试用|极客头条
  8. 计算机运行程序时声音特别大,为什么我的电脑在运行程序的时候机箱的声音非常大?...
  9. 【Spring】专栏目录
  10. 跑跑卡丁车刚进入游戏时很卡,跑一圈或两圈后就不卡了?