起因

这个站点现在是使用的hugo搭建的,本地写完文章后编译完成通过rsync方式同步到一台阿里云的服务器上。

今天在通过shell脚本执行的时候提示了一个错误

1
2
3
4
5
dyld: Library not loaded: /usr/local/opt/ldns/lib/libldns.3.dylib
  Referenced from: /usr/local/bin/ssh
  Reason: Incompatible library version: ssh requires version 4.0.0 or later, but libldns.3.dylib provides version 1.0.0
rsync: connection unexpectedly closed (0 bytes received so far) [Receiver]
rsync error: error in rsync protocol data stream (code 12) at io.c(228) [Receiver=3.2.3]

解决方法

执行brew reinstall ldns

1
2
3
4
5
6
==> Downloading https://homebrew.bintray.com/bottles/ldns-1.7.1_3.big_sur.bottle.tar.gz
==> Downloading from https://d29vzk4ow07wi7.cloudfront.net/998f245038aacbe7e2a953bd4ede86f0175c3c00ea71e3b9a14a134c1d2ca4cd?response-content-disposition
######################################################################## 100.0%
==> Reinstalling ldns
==> Pouring ldns-1.7.1_3.big_sur.bottle.tar.gz
🍺  /usr/local/Cellar/ldns/1.7.1_3: 571 files, 6.1MB

引用

https://github.com/Homebrew/homebrew-core/issues/55625