/usr/lib/libstdc++.6.dylib: mach-o, but wrong architecture

匿名 (未验证) 提交于 2019-12-03 01:45:01

问题:

I've just update my MAC OS Mountain Lion's compiler to gcc 4.8.1, the configure & install process is:

./configure --prefix=/usr make sudo make install 

the GCC 4.8.1 was installed completely, but then I found I cannot open my Chrome, as well as several other programs. I've check the error report, the most important information is:

Dyld Error Message:     Library not loaded: /usr/lib/libstdc++.6.dylib     Referenced from: /Applications/Google Chrome.app/Contents/MacOS/Google Chrome     Reason: no suitable image found.  Did find:     /usr/lib/libstdc++.6.dylib: mach-o, but wrong architecture     /usr/lib/libstdc++.6.dylib: mach-o, but wrong architecture 

So what should I do to solve this? Recompile GCC with proper architecture? But how to do this?

回答1:

You have overwritten several system libraries with incompatible versions. You will need to reinstall Mac OS X.

Don't install software with --prefix=/usr. That prefix is reserved for software distributed with the operating system. Use /usr/local for software you install yourself. You may want to try Homebrew instead once you've reinstalled.



回答2:

Since libstdc is deprecated and removed in iOS12, you need to update your dependencies to use libc++ or manually add libstdc. For manually adding refer this - answer



标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!