本文介绍了libiconv难题:需要版本x.0.0或更高版本,但libiconv.2.dylib提供版本y.0.0的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我陷入了libiconv问题.

I am stuck in a libiconv problem.

环境:Mac OSX Lion/MacBook air

Environment: Mac OSX Lion / MacBook air

问题:我试图为国际管理(intl)安装php扩展.在此过程中,出现了问题.我必须从计算机的实用程序中重新安装MacOSX Lion.

Issue:I tried to install a php extention for international management (intl). During the process, something got wrong. I had to reinstall MacOSX Lion from the utility of the computer.

现在,当我执行几乎任何命令(php -v或make !!)时,都会出现以下错误:

Now and then, I get the following error when I do almost any command (php -v , or make !!):

    dyld: Library not loaded: /opt/local/lib/libiconv.2.dylib
  Referenced from: /opt/local/bin/gawk
  Reason: Incompatible library version: gawk requires version 8.0.0 or later, but libiconv.2.dylib provides version 7.0.0

(这是gawk的示例,与php或其他一些命令相同)

(this is an example for gawk, same happens with php or some other commands)

我试图再次重新安装Macosx lion,但是得到了相同的输出.

I tried to reinstall Macosx lion again, but I got the same output.

我不是那么怕的那种人,所以我想从源代码重新编译libiconv并完成它.安装的Xcode(用于gcc,..)下载了.tar.gz.但是,您猜怎么着……gawk需要版本8.0.0,并且终端再次侮辱我并拒绝创建makefile.

I am not the kind to be scared for so few, so I wanted to recompile libiconv from source and be done with it. installed Xcode (for gcc,..) downloaded the .tar.gz. However, guess what... gawk needs version 8.0.0, and the terminal insults me once again and refuses to create the makefile.

因此,总结起来:我需要libiconv才能重新编译libiconv ...这绝对是我要坚持的地方.

So to sum up: I need libiconv in order to recompile libiconv... That's where I definitely get stuck.

在这一点上,我能想到的唯一解决方案是获取一个编译过的libiconv,它将使我摆脱困境.其他解决方案肯定是转向linux :),但这会浪费macbook的播放空间

The only solution I can think at this point would be to get a compiled libiconv that would get me out of this mess. Other solution is to turn definitely to linux :) but that would waste the macbook air

任何帮助我们都感激不尽,我现在已经挣扎了一天!预先非常感谢;)

Any help greatly appreciated, I have been struggling for a day now ! Many thanks in advance;)

J

NB:我试图考虑一些关于libiconv的东西,这些东西我可以在stackoverflow和其他论坛上找到,但这没有帮助...

NB: I have tried to consider some other stuff about libiconv I could find on stackoverflow and other forums, but it didn't help...

编辑

再见,

我会暂时回答(如果没有更好的答案弹出).确实,我只能通过问一个拥有完全相同的mac的朋友来给我库的编译版本来解决这个问题.

I will answer temporarily (if no better answers pops up). Indeed, I could come around only by asking a friend having the exact same mac to give me the compiled version of the library.

很遗憾,这些编译的库没有正式的存储库,因为我完全不知道如果没有它我将如何做.

To bad there is no official repository for these compiled libraries, as I have absolutely no idea on how I would have done without it.

如果您有更好的建议,请不要犹豫.我等待结束该主题之前,因为我认为它无法正确解决.此外,完成此操作后,我得到libncurses.5.dylib的相同的pb ...

If you have better suggestions, do not hesitate. I wait before closing the subject, as I do not consider it properly solved. Also, once this done, I get the same pb for libncurses.5.dylib ...

J

推荐答案

这看起来像macports.试试

This looks like macports. Try

port rev-upgrade

如果这样做没有帮助:

port -f uninstall iconv
port -f uninstall inactive
port selfupdate
port install iconv
port upgrade outdated
port rev-upgrade

如果需要,可以在每个命令前加上 sudo . (或者只需输入 sudo bash ,然后输入上面的命令来获得root shell.)

Prefix every command with sudo, if you need to. (Or just get a root shell by typing sudo bash, and then the commands above.)

这篇关于libiconv难题:需要版本x.0.0或更高版本,但libiconv.2.dylib提供版本y.0.0的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-19 06:25