/bin/thttpd: can't load library 'libcrypt.so.0问题解决

         在arm 的打印信息里面看到如下信息
======try to start thttpd=====
/bin/thttpd: can't load library 'libcrypt.so.0'

看来是找不到这个库文件,百度一下发现如下解决办法
5.出现“cannot load the lib xxxxx”
A:查看thttpd以来的动态库
  arm-9tdmi-linux-gnu-readelf -d thttpd
  ************************************************************************

Dynamic section at offset 0x11368 contains 22 entries:
  Tag        Type                         Name/Value
  0x00000001 (NEEDED)                     Shared library: [libcrypt.so.0]
 0x00000001 (NEEDED)                     Shared library: [libc.so.0]
 0x0000000c (INIT)                       0x9468
 0x0000000d (FINI)                       0x15acc
 0x00000019 (INIT_ARRAY)                 0x2135c
 0x0000001b (INIT_ARRAYSZ)               4 (bytes)
 0x0000001a (FINI_ARRAY)                 0x21360
 0x0000001c (FINI_ARRAYSZ)               4 (bytes)
 0x00000004 (HASH)                       0x8108
 0x00000005 (STRTAB)                     0x8cd0
 0x00000006 (SYMTAB)                     0x84a0
 0x0000000a (STRSZ)                      1022 (bytes)
 0x0000000b (SYMENT)                     16 (bytes)
 0x00000015 (DEBUG)                      0x0
 0x00000003 (PLTGOT)                     0x21440
 0x00000002 (PLTRELSZ)                   872 (bytes)
 0x00000014 (PLTREL)                     REL
 0x00000017 (JMPREL)                     0x9100
 0x00000011 (REL)                        0x90d0
 0x00000012 (RELSZ)                      48 (bytes)
 0x00000013 (RELENT)                     8 (bytes)
 0x00000000 (NULL)                       0x0

  ************************************************************************
可以看出thttpd以来libcrypt和libc lib,将arm-linux-tools的lib目录下的相应库文件拷贝至target的/lib目录
如果依然出现错误,将libnss_files lib拷贝至target的/lib目录,bean个人认为是前两个库依赖libnss_files[未验证]。

当然, 也可以直接使用静态库文件

cd thttpd-2.25b/

vi Makefile
指定静态链接二进制文件
LDFLAGS = static

重新编译

你可能感兴趣的:(/bin/thttpd: can't load library 'libcrypt.so.0问题解决)