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 Matlab问题解答有两个问题
  • ¥50 Oracle Kubernetes服务器集群主节点无法访问,工作节点可以访问
  • ¥15 LCD12864中文显示
  • ¥15 在使用CH341SER.EXE时不小心把所有驱动文件删除了怎么解决
  • ¥15 gsoap生成onvif框架
  • ¥15 有关sql server business intellige安装,包括SSDT、SSMS。
  • ¥15 stm32的can接口不能收发数据
  • ¥15 目标检测算法移植到arm开发板
  • ¥15 利用JD51设计温度报警系统
  • ¥15 快手联盟怎么快速的跑出建立模型