在 macOS 中,与 “ldconfig -p” 相当的命令是 “otool -L”。

huangapple go评论52阅读模式
英文:

ldconfig -p(not ldconfig) equivalent command in Mac

问题

I want to list the dynamic libs and their paths available on Mac OS 13. Like in Linux, we can do as:

ldconfig -p | grep ssl
libssl3.so (libc6,x86-64) => /lib/x86_64-linux-gnu/libssl3.so
libssl.so.1.1 (libc6,x86-64) => /lib/x86_64-linux-gnu/libssl.so.1.1
libssl.so.1.1 (libc6) => /lib/i386-linux-gnu/libssl.so.1.1
libssl.so (libc6,x86-64) => /lib/x86_64-linux-gnu/libssl.so

And I want to select the latest SSL version, like in this case, it is libssl3.

How to do this on Mac 13.

The update_dyld_shared_cache command doesn't have any options. And the below dyld command doesn't work:

DYLD_PRINT_LIBRARIES=YES /usr/bin/true
英文:

I want to list the dynamic libs and there paths available on the Mac OS 13. Like in linux we can do as:

ldconfig -p | grep ssl
libssl3.so (libc6,x86-64) => /lib/x86_64-linux-gnu/libssl3.so
libssl.so.1.1 (libc6,x86-64) => /lib/x86_64-linux-gnu/libssl.so.1.1
libssl.so.1.1 (libc6) => /lib/i386-linux-gnu/libssl.so.1.1
libssl.so (libc6,x86-64) => /lib/x86_64-linux-gnu/libssl.so

And I want to select the latest ssl version like in this case it is libssl3.

How to do this on Mac 13.

update_dyld_shared_cache command doesn't have any options.
And the below dyld command doens'nt work.

`DYLD_PRINT_LIBRARIES=YES /usr/bin/true`

答案1

得分: 1

我自己解决了。我使用了以下命令来使用最新版本:

crypto_path=`brew list openssl | grep "libcrypto.dylib$"`
ln -s $crypto_path /usr/local/lib/libcrypto.dylib
英文:

I fixed it my self. I used the following commands to use the latest one:

crypto_path=`brew list openssl | grep "libcrypto.dylib$"`
ln -s $crypto_path /usr/local/lib/libcrypto.dylib 

huangapple
  • 本文由 发表于 2023年2月8日 17:43:20
  • 转载请务必保留本文链接:https://go.coder-hub.com/75383864.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定