我弄乱了 Mac OS X 上的终端环境,想知道如何修复它
当我打开终端窗口时,我立即得到以下结果:
dyld:未加载库:/usr/lib/libiconv.2.dylib
引用自:/bin/bash
原因:库版本不兼容:bash需要7.0.0或更高版本,但libiconv.2.dylib提供6.0.0版本[流程已完成]
When I open a terminal window this is what I get immediately:
dyld: Library not loaded: /usr/lib/libiconv.2.dylib
Referenced from: /bin/bash
Reason: Incompatible library version: bash requires version 7.0.0 or later, but libiconv.2.dylib provides version 6.0.0[Process completed]
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以尝试删除文件 ~/.bash_profile、~/.profile、~/.bashrc 和 ~/Library/Preferences/com.apple.Terminal.plist(如果存在),但很可能这实际上是所描述的问题错误:libiconv 已被旧版本替换。在这种情况下,有两种方法可以替换它:下载源代码,通过 ssh-ing 构建并安装到计算机中,或者从安装程序 DVD 重新安装库。如果您选择从 DVD 安装,我建议您下载 Pacifist,这样您就可以只安装 libiconv 而不是整个系统(当然,可能还有其他文件也需要替换)。
You could try removing the files ~/.bash_profile, ~/.profile, ~/.bashrc, and ~/Library/Preferences/com.apple.Terminal.plist, if they exist, but most likely this is actually the problem as described by the error: libiconv got replaced with an older version. In this case, there are two methods to replace it: download the source code, build and install by ssh-ing into the computer, or reinstall the library from your installer DVD. If you choose to install from the DVD, I would suggest downloading Pacifist so that you can install just libiconv instead of the whole system (of course, there might be other files that need replacing too).