isingh
February 7, 2015, 2:13am
1
Hi
I was trying to use the Python client library.
I am on a Macbook, Yosemite with lua51 installed via brew. I did pip install. However I cant get the client to load.
import aerospike
Traceback (most recent call last):
File “”, line 1, in
ImportError: dlopen(/Library/Python/2.7/site-packages/aerospike.so, 2): Symbol not found: _luaL_loadbuffer
Referenced from: /Library/Python/2.7/site-packages/aerospike.so
Expected in: flat namespace
in /Library/Python/2.7/site-packages/aerospike.so
I get the above error, when I try to do an import aerospike
in the python console/script.
Any ideas?
Hi,
I’ve had to manually link to the brew ‘cellar’, because that wasn’t in the library path. Try use ln -s
For example:
$ ls -lh /usr/local/lib/|grep lua
lrwxr-xr-x 1 rbotzer admin 42B Sep 5 16:01 liblua.5.1.5.dylib -> ../Cellar/lua/5.1.5/lib/liblua.5.1.5.dylib
lrwxr-xr-x 1 rbotzer admin 40B Sep 5 16:01 liblua.5.1.dylib -> ../Cellar/lua/5.1.5/lib/liblua.5.1.dylib
-rw-r--r--+ 1 root admin 298K Jun 18 2014 liblua.a
lrwxr-xr-x 1 rbotzer admin 36B Sep 5 16:01 liblua.dylib -> ../Cellar/lua/5.1.5/lib/liblua.dylib
Then call pip install
once more.
Let me know if that works.
isingh
February 9, 2015, 10:45pm
3
Thanks! My cellar is already linked.
$ ls -lh /usr/local/lib/|grep lua [ruby-2.0.0p481]
lrwxr-xr-x 1 inderpreetsingh admin 44B Feb 6 17:57 liblua.5.1.5.dylib -> ../Cellar/lua51/5.1.5/lib/liblua.5.1.5.dylib
lrwxr-xr-x 1 inderpreetsingh admin 42B Feb 6 17:57 liblua.5.1.dylib -> ../Cellar/lua51/5.1.5/lib/liblua.5.1.dylib
lrwxr-xr-x 1 inderpreetsingh admin 44B Feb 4 17:24 liblua.5.2.3.dylib -> ../Cellar/lua/5.2.3_1/lib/liblua.5.2.3.dylib
lrwxr-xr-x 1 inderpreetsingh admin 42B Feb 4 17:24 liblua.5.2.dylib -> ../Cellar/lua/5.2.3_1/lib/liblua.5.2.dylib
lrwxr-xr-x 1 inderpreetsingh admin 38B Feb 4 17:24 liblua.dylib -> ../Cellar/lua/5.2.3_1/lib/liblua.dylib
lrwxr-xr-x 1 inderpreetsingh admin 41B Feb 6 17:57 liblua5.1.dylib -> ../Cellar/lua51/5.1.5/lib/liblua5.1.dylib
It seems to me that I do not have the .a file. I got this working on CentOS, but cant get it to work on the Mac.
scompto
February 12, 2015, 10:44pm
4
I am having the same issue. I have installed Lua via Brew, and Pip for Aerospike. Everything installed properly but I run into the error when trying to import the library in python. I am thinking that it could be the Lua version since i noticed brew grabbed 5.2.3
scompto
February 12, 2015, 10:50pm
5
I have just confirmed that this was the case. Remove Lua using brew and manually grab and compile it using the instructions on the aerospike installation page, then just reinstall aerospike with pip.
rbotzer
February 17, 2015, 1:59am
6
Just a note, the dependency on a Lua prerequisite will be removed in the next release of the Python client. The necessary module will be bundled with the C client.