mosh:dyld:未加载库:/usr/local/lib/libprotobuf.7.dylib

时间:2013-04-01 18:58:15

标签: protocol-buffers homebrew

我非常喜欢moshhttp://mosh.mit.edu/),但在brew upgrade停止工作后,产生以下错误。

> mosh example.com
dyld: Library not loaded: /usr/local/lib/libprotobuf.7.dylib
  Referenced from: /usr/local/bin/mosh-client
  Reason: image not found
Died at /usr/local/bin/mosh line 201. 

3 个答案:

答案 0 :(得分:6)

经过一番挖掘后,我意识到这是由于protobuf已升级且mosh被硬编码以使用protobuf 2.4.1

所以我所要做的就是从protobuf 2.5.0恢复到2.4.1。在使用自制软件的Mac上,可通过以下步骤完成:

> brew versions protobuf
2.5.0    git checkout 019364d /usr/local/Library/Formula/protobuf.rb
2.4.1    git checkout 544209f /usr/local/Library/Formula/protobuf.rb
> git checkout 544209f /usr/local/Library/Formula/protobuf.rb
> brew unlink protobuf
> brew link protobuf

答案 1 :(得分:5)

你应该重新安装使用: https://mosh.mit.edu/#getting

请勿使用brew,它适用于MAC OSX 10.9.5

答案 2 :(得分:1)

您还可以更新brew,然后将mosh升级到1.2.4:

$ brew update

...

$ brew upgrade mobile-shell
==> Upgrading 1 outdated package, with result:
mobile-shell 1.2.4
==> Upgrading mobile-shell
==> Downloading http://mosh.mit.edu/mosh-1.2.4.tar.gz
######################################################################## 100.0%
==> ./configure --prefix=/usr/local/Cellar/mobile-shell/1.2.4
==> make install
  /usr/local/Cellar/mobile-shell/1.2.4: 12 files, 1004K, built in 41 seconds