python - Error with pylibmc on Mac OS Lion -
i have problem pylibmc on mac os lion.
libmemcached — 1.0.4
pylibmc — 1.2.3
$ python python 2.7.1 (r271:86832, jun 25 2011, 05:09:01) [gcc 4.2.1 (based on apple inc. build 5658) (llvm build 2335.15.00)] on darwin type "help", "copyright", "credits" or "license" more information. >>> import pylibmc traceback (most recent call last): file "<stdin>", line 1, in <module> file "/library/python/2.7/site-packages/pylibmc/__init__.py", line 70, in <module> import _pylibmc importerror: dlopen(/library/python/2.7/site-packages/_pylibmc.so, 2): symbol not found: _memcached_add referenced from: /library/python/2.7/site-packages/_pylibmc.so expected in: flat namespace in /library/python/2.7/site-packages/_pylibmc.so but works sudo!
$ sudo python password: python 2.7.1 (r271:86832, jun 25 2011, 05:09:01) [gcc 4.2.1 (based on apple inc. build 5658) (llvm build 2335.15.00)] on darwin type "help", "copyright", "credits" or "license" more information. >>> import pylibmc >>> any ideas?
installation in 32-bit mode solved problem.
you need install libevent in 32-bit mode
brew install --universal libeventnext download libmemcached source (1.0.8 version works me) , configure force 32 bit arch:
./configure --build=i386-apple-darwin11.4.2 "cflags=-m32" "cxxflags=-m32" "ldflags=-m32" make sudo make installwhere 11.4.2 version of kernel
reinstall pylibmc
sudo pip uninstall pylibmc sudo pip install pylibmcnow works
$ python -c 'import pylibmc' $
Comments
Post a Comment