当前位置: 首页 > news >正文

网站开发有哪些方式东莞网站建设公司

网站开发有哪些方式,东莞网站建设公司,律师网站模版,企业合同管理系统自己编写的动态链接库在Unix规范下一般位于/usr/local/lib,在2023年及之前的MacOS版本中,直接将动态库安装到该位置即可在程序运行时加载,可是升级MacOS版本后,ld就报错。 错误现象 运行程序,报错 dyld[6376]: Libra…

自己编写的动态链接库在Unix规范下一般位于/usr/local/lib,在2023年及之前的MacOS版本中,直接将动态库安装到该位置即可在程序运行时加载,可是升级MacOS版本后,ld就报错。

错误现象

运行程序,报错

dyld[6376]: Library not loaded: libxxx.dylibReferenced from: <BD86A23A-E5C5-35D0-BE6D-F9B966A01280> ..../build/xxxxReason: tried: 'libxxx.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OSlibxxx.dylib' (no such file), 'libxxx.dylib' (no such file), '..../build/libxxx.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/..../build/libxxx.dylib' (no such file), '..../build/libxxx.dylib' (no such file)
zsh: abort      ./xxxx

原因分析

运行

man dyld

可以看到以下文本

DYLD_FALLBACK_LIBRARY_PATHThis is a colon separated list of directories that contain libraries.  If a dylib is not found at itsinstall  path, dyld uses this as a list of directories to search for the dylib.For new binaries (Fall 2023 or later) there is no default.  For older binaries, their is a default fallbacksearch path of: /usr/local/lib:/usr/lib.

意思是说2023年秋之后,/usr/local/lib:/usr/lib不再是DYLD_FALLBACK_LIBRARY_PATH的默认值,所以造成了这个重大的行为改变。

解决方法

将该环境变量export赋值,放到.bashrc/.zshrc在shell开启时自动执行(具体操作略)或在程序启动时手动声明,如

DYLD_FALLBACK_LIBRARY_PATH=/usr/local/lib ./xxxx

即可使程序加载到/usr/local/lib下的动态库,成功运行。

http://www.dt0577.cn/news/9.html

相关文章:

  • 丹阳网站建设咨询百度网址安全检测中心
  • 淘宝网站建设的主要工作深圳专业建站公司
  • 点击立即进入正能量网站网站手机版排名seo
  • 微做网站百度推广获客成本大概多少
  • 用vue做的网站seo教学
  • 建设厅网站账号密码忘记怎么办关键词如何确定
  • 电子商务免费网站建设长春seo外包