如何在python homebrew中更改boost的链接版本?

时间:2013-04-02 19:51:57

标签: python boost homebrew mapnik

我正在尝试使用mapnik和我的mac os x 10.8.3上由homebrew完成的python安装。这是问题所在:

otool -L $(brew list boost | grep 'python.*.dylib')
/usr/local/Cellar/boost/1.53.0/lib/libboost_python-mt.dylib:
    /usr/local/lib/libboost_python-mt.dylib (compatibility version 0.0.0, current version 0.0.0)
    /usr/local/opt/python/Frameworks/Python.framework/Versions/2.7/Python (compatibility version 2.7.0, current version 2.7.0)
    /usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 56.0.0)
    /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 169.3.0)

正如您所看到的,它指向/usr/local/opt/python ...这是完全错误的(这是Apple提供的defailt python,我不打算使用它)。

我该怎么改变?感谢

1 个答案:

答案 0 :(得分:2)

我终于做到了。方法如下:

我跑了这个命令:

brew rm $(brew deps mapnik --with-cairo)
brew rm mapnik
brew rm boost
brew update
brew doctor
brew install --with-icu --build-from-source boost
brew install mapnik --with-cairo

现在,命令otool -L $(brew list boost | grep 'python.*.dylib')仍显示:

/usr/local/Cellar/boost/1.53.0/lib/libboost_python-mt.dylib:
    /usr/local/lib/libboost_python-mt.dylib (compatibility version 0.0.0, current version 0.0.0)
    /usr/local/Frameworks/Python.framework/Versions/2.7/Python (compatibility version 2.7.0, current version 2.7.0)
    /usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 56.0.0)
    /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 169.3.0)

这是完整的主题:https://github.com/mxcl/homebrew/issues/16144