Simple_learner 2017-11-29 07:29 采纳率: 0%
浏览 1155

应用程序在zedboard运行时出错,错误提示缺少动态库,但动态库存在且已装载

在将Igh EtherCAT Master安装在zedboard平台后,测试该软件运行与内核注册成功,但在编写通信程序进行测试时出错。
错误代码如下,ectesthello1为该测试程序。

 $ ./ectesthello1 
./ectesthello1: error while loading shared libraries: libethercat.so.1: cannot open shared object file: No such file or directory

根据小工具,得到具体信息如下

 $ ldd ectesthello1 
        libethercat.so.1 => not found
        libc.so.6 => /lib/arm-linux-gnueabihf/libc.so.6 (0xb6e7d000)
        /lib/ld-linux-armhf.so.3 (0x7f5d5000)

$ file ./ectesthello1 
./ectesthello1: ELF 32-bit LSB  executable, ARM, EABI5 version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.32, BuildID[sha1]=b96348b42ca3108234cb1389878043f184477d94, not stripped

$ readelf -l ectesthello1 
[Requesting program interpreter: /lib/ld-linux-armhf.so.3

$ file /lib/libethercat.so.1
/lib/libethercat.so.1: symbolic link to `libethercat.so.1.0.0' 

$ file /lib/ld-linux-armhf.so.3 
/lib/ld-linux-armhf.so.3: symbolic link to `arm-linux-gnueabihf/ld-2.19.so'

求大神帮助分析解决。

  • 写回答

1条回答 默认 最新

  • 关注

    我出现了跟你一样的问题,应该是动态链接库没有被搜索到的原因
    配置库:
    gedit /etc/ld.so.conf
    添加
    /opt/etherlab/lib
    /usr/local/lib
    执行
    source edit_file_path
    sudo ldconfig

    这样就可以正常使用了

    评论

报告相同问题?

悬赏问题

  • ¥15 链接问题 C++LNK2001 无法解析的外部符号
  • ¥50 安装pyaudiokits失败
  • ¥15 计组这些题应该咋做呀
  • ¥60 更换迈创SOL6M4AE卡的时候,驱动要重新装才能使用,怎么解决?
  • ¥15 让node服务器有自动加载文件的功能
  • ¥15 jmeter脚本回放有的是对的有的是错的
  • ¥15 r语言蛋白组学相关问题
  • ¥15 Python时间序列如何拟合疏系数模型
  • ¥15 求学软件的前人们指明方向🥺
  • ¥50 如何增强飞上天的树莓派的热点信号强度,以使得笔记本可以在地面实现远程桌面连接