首先我觉得这是软件包或者依赖库的版本问题
$ sudo opkg update
$ sudo opkg install bind-dig bind-libs
最终执行 dig 相关命令时得到错误
Error relocating /usr/lib/libisc-9.18.0.so: uv_sleep: symbol not found
google 了一下失望了,在此求助该如何 debug ?
目前我所知道的:
# openwrt 版本 R20.3.19
$ cat /etc/openwrt_release
DISTRIB_ID='OpenWrt'
DISTRIB_RELEASE='SNAPSHOT'
DISTRIB_TARGET='x86/64'
DISTRIB_ARCH='x86_64'
DISTRIB_TAINTS='no-all override'
DISTRIB_REVISION='R20.3.19 / Mask Ver.D200401'
DISTRIB_DESCRIPTION='OpenWrt '
# dig 软件包信息
$ sudo opkg info bind-dig
Package: bind-dig
Version: 9.11.19-1
Depends: libc, bind-libs
Status: unknown ok not-installed
Section: net
Architecture: x86_64
Size: 45662
Filename: bind-dig_9.11.19-1_x86_64.ipk
Description: bind DNS excavation tool
Package: bind-dig
Version: 9.18.0-3
Depends: libc, bind-libs
Status: install user installed
Section: net
Architecture: x86_64
Size: 46031
Filename: bind-dig_9.18.0-3_x86_64.ipk
Description: bind DNS excavation tool
Installed-Time: 1647568447
# openwrt 源
# cat /etc/opkg/distfeeds.conf
src/gz openwrt_core https://openwrt.proxy.ustclug.org/snapshots/targets/x86/64/packages
src/gz openwrt_base https://openwrt.proxy.ustclug.org/snapshots/packages/x86_64/base
src/gz openwrt_luci https://openwrt.proxy.ustclug.org/snapshots/packages/x86_64/luci
src/gz openwrt_packages https://openwrt.proxy.ustclug.org/snapshots/packages/x86_64/packages
src/gz openwrt_routing https://openwrt.proxy.ustclug.org/snapshots/packages/x86_64/routing
# openwrt 定制源 (版本号一开始是 18.06.4 ,两个都不行)
# cat /etc/opkg/customfeeds.conf
# add your custom package feeds here
#
# src/gz example_feed_name http://www.example.com/path/to/files
src/gz core http://mirrors.ustc.edu.cn/lede/releases/19.07.8/targets/x86/64/packages
src/gz base http://mirrors.ustc.edu.cn/lede/releases/19.07.8/packages/x86_64/base
src/gz luci http://mirrors.ustc.edu.cn/lede/releases/19.07.8/packages/x86_64/luci
src/gz packages http://mirrors.ustc.edu.cn/lede/releases/19.07.8/packages/x86_64/packages
src/gz routing http://mirrors.ustc.edu.cn/lede/releases/19.07.8/packages/x86_64/routing
src/gz telephony http://mirrors.ustc.edu.cn/lede/releases/19.07.8/packages/x86_64/telephony
# which dig
/usr/bin/dig
# ldd /usr/bin/dig
/lib/ld-musl-x86_64.so.1 (0x7f3ad0ff6000)
libisc-9.18.0.so => /usr/lib/libisc-9.18.0.so (0x7f3ad0a7f000)
libdns-9.18.0.so => /usr/lib/libdns-9.18.0.so (0x7f3ad08d1000)
libisccfg-9.18.0.so => /usr/lib/libisccfg-9.18.0.so (0x7f3ad089e000)
libirs-9.18.0.so => /usr/lib/libirs-9.18.0.so (0x7f3ad0899000)
libbind9-9.18.0.so => /usr/lib/libbind9-9.18.0.so (0x7f3ad0884000)
libc.so => /lib/ld-musl-x86_64.so.1 (0x7f3ad0ff6000)
libuv.so.1 => /usr/lib/libuv.so.1 (0x7f3ad0861000)
libssl.so.1.1 => /usr/lib/libssl.so.1.1 (0x7f3ad07d0000)
libcrypto.so.1.1 => /usr/lib/libcrypto.so.1.1 (0x7f3ad04f6000)
libz.so.1 => /usr/lib/libz.so.1 (0x7f3ad04e2000)
libnghttp2.so.14 => /usr/lib/libnghttp2.so.14 (0x7f3ad04bd000)
libns-9.18.0.so => /usr/lib/libns-9.18.0.so (0x7f3ad047d000)
libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x7f3ad0469000)
Error relocating /usr/lib/libisc-9.18.0.so: uv_sleep: symbol not found
# musl libc 的版本是 1.1.24
# ldd
musl libc (x86_64)
Version 1.1.24
Dynamic Program Loader
Usage: ldd [options] [--] pathname
问题依然无解。bind-libs 是以下程序的依赖项
尝试更换过 bind-libs 的版本,还是不能正常运行 dig (运行 nslookup 也是一样的问题). 还看到一些说 libc 库版本问题的,这个库版本号不能通过 opkg 进行更新,只能刷写新的固件解决。
重装系统的代价有点大,有没有大佬指点下在不重装系统的情况下该怎么 debug 让 dig 、nslookup 等软件正常运行。
这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。
V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。
V2EX is a community of developers, designers and creative people.